// For flags

CVE-2024-56761

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

Severity Score

7.1
*CVSS v3

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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 ]

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: x86/fred: Borrar WFE en #CPs de ENDBRANCH faltantes Una instrucción de bifurcación indirecta establece el rastreador de bifurcación indirecta (IBT) de la CPU en estado WAIT_FOR_ENDBRANCH (WFE) y WFE permanece afirmado a través del límite de instrucción. Cuando el decodificador encuentra una instrucción inapropiada mientras WFE está establecido en ENDBR, la CPU genera un error #CP. Para la autoprueba "IBT del kernel sin ENDBR" donde los #CP se activan deliberadamente, el estado WFE del contexto interrumpido debe borrarse para permitir que la ejecución continúe. De lo contrario, cuando la CPU se reanuda desde la instrucción que acaba de causar el #CP anterior, se genera otro #CP de ENDBRANCH faltante y la CPU entra en un bucle muerto. Esto no es un problema con IDT porque no preserva WFE e IRET no establece WFE. Pero FRED proporciona espacio en la pila de entrada (en un área CS expandida) para guardar y restaurar el estado WFE, por lo que el estado WFE ya no se ve afectado, por lo que el software debe limpiarlo. Limpie WFE para evitar bucles muertos en ibt_clear_fred_wfe() y la ruta de código !ibt_fatal cuando se permite que la ejecución continúe. Afectar a WFE en cualquier otra circunstancia es un error relevante para la seguridad. [ dhansen: reformulación del registro de cambios ]

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 ]

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High
Attack Vector
Local
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
None
Availability
Complete
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2024-12-29 CVE Reserved
  • 2025-01-06 CVE Published
  • 2025-01-06 CVE Updated
  • 2025-01-07 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.6 < 6.12.8
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.6 < 6.12.8"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.6 < 6.13-rc5
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.6 < 6.13-rc5"
en
Affected