CVE-2024-56761

x86/fred: Clear WFE in missing-ENDBRANCH #CPs

State
Published
Severity
Not scored
Published
Jan 6, 2025
Updated
May 11, 2026
Reserved
Dec 29, 2024

Read the record on cve.org

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 ]

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • a5f6c2ace9974adf92ce65dacca8126d90adabfe to before 151447859d6fb0dcce8259f0971c6e94fb801661Affected
  • a5f6c2ace9974adf92ce65dacca8126d90adabfe to before b939f108e86b76119428a6fa4e92491e09ac7867Affected
  • a5f6c2ace9974adf92ce65dacca8126d90adabfe to before dc81e556f2a017d681251ace21bf06c126d5a192Affected
LinuxLinux
  • 6.6Affected
  • before 6.6Not affected
  • 6.6.70 through 6.6.*Not affected
  • 6.12.8 through 6.12.*Not affected
  • 6.13 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.