CVE-2024-35801 x86/fpu: Keep xfd_state in sync with MSR_IA32_XFD

High 7.8 Published Updated

A kernel crash occurs due to state desynchronization in x86 FPU handling, leading to a denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-35801?

CVE-2024-35801 is a high-severity vulnerability in Linux kernel, published on 17 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

x86/fpu: Keep xfd_state in sync with MSR_IA32_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 xfd_state to keep the MSR_IA32_XFD value cached, in order to avoid unnecessary writes to the MSR.

On CPU hotplug MSR_IA32_XFD 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 xfd_update_state() 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 xfd_set_state() to write xfd_state together with MSR_IA32_XFD, and use it in all places that set MSR_IA32_XFD.

Weakness: CWE-416

Which versions are affected by CVE-2024-35801?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-35801?

Apply the vendor's patch.

Is CVE-2024-35801 being exploited?

There is no known exploitation of CVE-2024-35801 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-35801, DEBIAN-CVE-2024-35801, GHSA-r4ww-r2x2-fj39, ROOT-OS-UBUNTU-2204-CVE-2024-35801, UBUNTU-CVE-2024-35801.

Is CVE-2024-35801 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free