Linux · Linux Kernel · CVE-2024-35801
**Name of the Vulnerable Software and Affected Versions**
Linux kernel (affected versions not specified)
**Description**
The issue is related to the use of memory after it has been freed in the Linux kernel, specifically in the x86/fpu component. This can lead to a crash of the kernel when the `xfd update state()` function fails to update the MSR IA32 XFD, resulting in XRSTOR raising a #NM in kernel space. The problem arises because the per CPU variable `xfd state` is not reset when MSR IA32 XFD is reset to the `init fpstate.xfd` on CPU hotplug, bringing them out of sync.
**Recommendations**
To fix this issue, introduce `xfd set state()` to write `xfd state` together with MSR IA32 XFD, and use it in all places that set MSR IA32 XFD. As a temporary workaround, consider disabling the `xfd update state()` function until a patch is available. Restrict access to the vulnerable `x86/fpu` component to minimize the risk of exploitation. Avoid using the `xfd state` variable in the affected kernel space until the issue is resolved. At the moment, there is no information about a newer version that contains a fix for this vulnerability.