CVE-2024-56761
x86/fred: Clear WFE in missing-ENDBRANCH #CPs
Check your servers for CVE-2024-56761
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-56761 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
x86/fred: Clear WFE in missing-ENDBRANCH #CPs
An indirect branch instruction sets the CPU indirect branch tracker (IBT) into WAIT_FOR_ENDBRANCH (WFE) state and WFE stays asserted across the instruction boundary. When the decoder finds an inappropriate instruction while WFE is set ENDBR, the CPU raises a #CP fault.
For the "kernel IBT no ENDBR" selftest where #CPs are deliberately triggered, the WFE state of the interrupted context needs to be cleared to let execution continue. Otherwise when the CPU resumes from the instruction that just caused the previous #CP, another missing-ENDBRANCH #CP is raised and the CPU enters a dead loop.
This is not a problem with IDT because it doesn't preserve WFE and IRET doesn't set WFE. But FRED provides space on the entry stack (in an expanded CS area) to save and restore the WFE state, thus the WFE state is no longer clobbered, so software must clear it.
Clear WFE to avoid dead looping in ibt_clear_fred_wfe() and the !ibt_fatal code path when execution is allowed to continue.
Clobbering WFE in any other circumstance is a security-relevant bug.
[ dhansen: changelog rewording ]
Exploitation
EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 13.8% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from a5f6c2ace9974adf92ce65dacca8126d90adabfe, before 151447859d6fb0dcce8259f0971c6e94fb801661 affected from a5f6c2ace9974adf92ce65dacca8126d90adabfe, before b939f108e86b76119428a6fa4e92491e09ac7867 affected from a5f6c2ace9974adf92ce65dacca8126d90adabfe, before dc81e556f2a017d681251ace21bf06c126d5a192
Other versions: unaffected
|
| Linux |
affected 6.6 unaffected before 6.6 unaffected from 6.6.70 up to and including 6.6.* unaffected from 6.12.8 up to and including 6.12.* unaffected 6.13 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-56761 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-56761
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-56761
trivy image --scanners vuln IMAGE | grep CVE-2024-56761
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/151447859d6fb0dcce8259f0971c6e94fb801661 git.kernel.org
- https://git.kernel.org/stable/c/b939f108e86b76119428a6fa4e92491e09ac7867 git.kernel.org
- https://git.kernel.org/stable/c/dc81e556f2a017d681251ace21bf06c126d5a192 git.kernel.org
Source: the record CVE-2024-56761 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse