In the Linux kernel, the following vulnerability has been resolved:
x86/fpu: Keep xfdstate in sync with MSRIA32_XFD
Commit 672365477ae8 ("x86/fpu: Update XFD state where required") and commit 8bf26758ca96 ("x86/fpu: Add XFD state to fpstate") introduced a per CPU variable xfdstate to keep the MSRIA32_XFD value cached, in order to avoid unnecessary writes to the MSR.
On CPU hotplug MSRIA32XFD is reset to the init_fpstate.xfd, which wipes out any stale state. But the per CPU cached xfd value is not reset, which brings them out of sync.
As a consequence a subsequent xfdupdatestate() might fail to update the MSR which in turn can result in XRSTOR raising a #NM in kernel space, which crashes the kernel.
To fix this, introduce xfdsetstate() to write xfdstate together with MSRIA32XFD, and use it in all places that set MSRIA32_XFD.
{ "vanir_signatures": [ { "deprecated": false, "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/xstate.c" }, "id": "CVE-2024-35801-01c1374f", "digest": { "line_hashes": [ "291583493542846734036414194535777825514", "157656198078159594721686154018905089163", "174348405582751909604609879796673209084", "50768081441458774891866627870798007697", "267712571857700298879259155586776259612" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@92b0f04e937665bde5768f3fcc622dcce44413d8" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/xstate.c" }, "id": "CVE-2024-35801-05ff60d5", "digest": { "line_hashes": [ "291583493542846734036414194535777825514", "157656198078159594721686154018905089163", "174348405582751909604609879796673209084", "50768081441458774891866627870798007697", "267712571857700298879259155586776259612" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1acbca933313aa866e39996904c9aca4d435c4cd" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/xstate.h", "function": "xfd_update_state" }, "id": "CVE-2024-35801-071508d3", "digest": { "length": 207.0, "function_hash": "51396344188808079612302711146785400998" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1acbca933313aa866e39996904c9aca4d435c4cd" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/xstate.h", "function": "xfd_update_state" }, "id": "CVE-2024-35801-5ca96955", "digest": { "length": 207.0, "function_hash": "51396344188808079612302711146785400998" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@10e4b5166df9ff7a2d5316138ca668b42d004422" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/xstate.h" }, "id": "CVE-2024-35801-636ea329", "digest": { "line_hashes": [ "10494364186457743636570203024680208465", "5700508811504713253796363268145613722", "27061859337643628784964715552010682773", "289933165477708546681190453307270958700", "330446207991533581229010815897906867771", "97327645538464623426917525447305095003", "270971261372913486217463172489590008382", "60350486317905754581965752861525663026", "145293915764217819387342952931947616892", "4286181829424971857104453566726706768", "318458493278749825395736175686898230566", "153373712550219950092245017263235473936", "34499167068403319502220140430788456587", "133981285248789886521039770814137762635", "15967256431962215060483165417730408060", "255781432187350002699401686357359385407" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1acbca933313aa866e39996904c9aca4d435c4cd" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/xstate.h" }, "id": "CVE-2024-35801-783ff062", "digest": { "line_hashes": [ "10494364186457743636570203024680208465", "5700508811504713253796363268145613722", "27061859337643628784964715552010682773", "289933165477708546681190453307270958700", "330446207991533581229010815897906867771", "97327645538464623426917525447305095003", "270971261372913486217463172489590008382", "60350486317905754581965752861525663026", "145293915764217819387342952931947616892", "4286181829424971857104453566726706768", "318458493278749825395736175686898230566", "153373712550219950092245017263235473936", "34499167068403319502220140430788456587", "133981285248789886521039770814137762635", "15967256431962215060483165417730408060", "255781432187350002699401686357359385407" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@92b0f04e937665bde5768f3fcc622dcce44413d8" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/xstate.h", "function": "xfd_update_state" }, "id": "CVE-2024-35801-87b88395", "digest": { "length": 207.0, "function_hash": "51396344188808079612302711146785400998" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@92b0f04e937665bde5768f3fcc622dcce44413d8" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/xstate.h" }, "id": "CVE-2024-35801-a1118a1a", "digest": { "line_hashes": [ "10494364186457743636570203024680208465", "5700508811504713253796363268145613722", "27061859337643628784964715552010682773", "289933165477708546681190453307270958700", "330446207991533581229010815897906867771", "97327645538464623426917525447305095003", "270971261372913486217463172489590008382", "60350486317905754581965752861525663026", "145293915764217819387342952931947616892", "4286181829424971857104453566726706768", "318458493278749825395736175686898230566", "153373712550219950092245017263235473936", "34499167068403319502220140430788456587", "133981285248789886521039770814137762635", "15967256431962215060483165417730408060", "255781432187350002699401686357359385407" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@21c7c00dae55cb0e3810d5f9506b58f68475d41d" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/xstate.h", "function": "xfd_update_state" }, "id": "CVE-2024-35801-a37855fa", "digest": { "length": 207.0, "function_hash": "51396344188808079612302711146785400998" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b61e3b7055ac6edee4be071c52f48c26472d2624" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/xstate.c" }, "id": "CVE-2024-35801-ae8c3f09", "digest": { "line_hashes": [ "291583493542846734036414194535777825514", "157656198078159594721686154018905089163", "174348405582751909604609879796673209084", "50768081441458774891866627870798007697", "267712571857700298879259155586776259612" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b61e3b7055ac6edee4be071c52f48c26472d2624" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/xstate.h", "function": "xfd_update_state" }, "id": "CVE-2024-35801-aeb34803", "digest": { "length": 207.0, "function_hash": "51396344188808079612302711146785400998" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@21c7c00dae55cb0e3810d5f9506b58f68475d41d" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/xstate.h" }, "id": "CVE-2024-35801-af58488a", "digest": { "line_hashes": [ "10494364186457743636570203024680208465", "5700508811504713253796363268145613722", "27061859337643628784964715552010682773", "289933165477708546681190453307270958700", "330446207991533581229010815897906867771", "97327645538464623426917525447305095003", "270971261372913486217463172489590008382", "60350486317905754581965752861525663026", "145293915764217819387342952931947616892", "4286181829424971857104453566726706768", "318458493278749825395736175686898230566", "153373712550219950092245017263235473936", "34499167068403319502220140430788456587", "133981285248789886521039770814137762635", "15967256431962215060483165417730408060", "255781432187350002699401686357359385407" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@10e4b5166df9ff7a2d5316138ca668b42d004422" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/xstate.c", "function": "fpu__init_cpu_xstate" }, "id": "CVE-2024-35801-b1ac3a82", "digest": { "length": 400.0, "function_hash": "121568362011218496855972049723897403534" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1acbca933313aa866e39996904c9aca4d435c4cd" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/xstate.c", "function": "fpu__init_cpu_xstate" }, "id": "CVE-2024-35801-ba84d73e", "digest": { "length": 400.0, "function_hash": "121568362011218496855972049723897403534" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b61e3b7055ac6edee4be071c52f48c26472d2624" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/xstate.c", "function": "fpu__init_cpu_xstate" }, "id": "CVE-2024-35801-dd656c00", "digest": { "length": 400.0, "function_hash": "121568362011218496855972049723897403534" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@21c7c00dae55cb0e3810d5f9506b58f68475d41d" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/xstate.c", "function": "fpu__init_cpu_xstate" }, "id": "CVE-2024-35801-dee20da9", "digest": { "length": 400.0, "function_hash": "121568362011218496855972049723897403534" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@10e4b5166df9ff7a2d5316138ca668b42d004422" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/xstate.h" }, "id": "CVE-2024-35801-ebe9644b", "digest": { "line_hashes": [ "10494364186457743636570203024680208465", "5700508811504713253796363268145613722", "27061859337643628784964715552010682773", "289933165477708546681190453307270958700", "330446207991533581229010815897906867771", "97327645538464623426917525447305095003", "270971261372913486217463172489590008382", "60350486317905754581965752861525663026", "145293915764217819387342952931947616892", "4286181829424971857104453566726706768", "318458493278749825395736175686898230566", "153373712550219950092245017263235473936", "34499167068403319502220140430788456587", "133981285248789886521039770814137762635", "15967256431962215060483165417730408060", "255781432187350002699401686357359385407" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b61e3b7055ac6edee4be071c52f48c26472d2624" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/xstate.c", "function": "fpu__init_cpu_xstate" }, "id": "CVE-2024-35801-f9b9a300", "digest": { "length": 400.0, "function_hash": "121568362011218496855972049723897403534" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@92b0f04e937665bde5768f3fcc622dcce44413d8" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/xstate.c" }, "id": "CVE-2024-35801-fcc5cf35", "digest": { "line_hashes": [ "291583493542846734036414194535777825514", "157656198078159594721686154018905089163", "174348405582751909604609879796673209084", "50768081441458774891866627870798007697", "267712571857700298879259155586776259612" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@10e4b5166df9ff7a2d5316138ca668b42d004422" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/xstate.c" }, "id": "CVE-2024-35801-fdf764b0", "digest": { "line_hashes": [ "291583493542846734036414194535777825514", "157656198078159594721686154018905089163", "174348405582751909604609879796673209084", "50768081441458774891866627870798007697", "267712571857700298879259155586776259612" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@21c7c00dae55cb0e3810d5f9506b58f68475d41d" } ] }