// For flags

CVE-2023-52874

x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro

Severity Score

"-"
*CVSS v-

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

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

x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro

In the TDX_HYPERCALL asm, after the TDCALL instruction returns from the
untrusted VMM, the registers that the TDX guest shares to the VMM need
to be cleared to avoid speculative execution of VMM-provided values.

RSI is specified in the bitmap of those registers, but it is missing
when zeroing out those registers in the current TDX_HYPERCALL.

It was there when it was originally added in commit 752d13305c78
("x86/tdx: Expand __tdx_hypercall() to handle more arguments"), but was
later removed in commit 1e70c680375a ("x86/tdx: Do not corrupt
frame-pointer in __tdx_hypercall()"), which was correct because %rsi is
later restored in the "pop %rsi". However a later commit 7a3a401874be
("x86/tdx: Drop flags from __tdx_hypercall()") removed that "pop %rsi"
but forgot to add the "xor %rsi, %rsi" back.

Fix by adding it back.

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: x86/tdx: Ponga a cero el RSI que falta en la macro TDX_HYPERCALL. En el conjunto TDX_HYPERCALL, después de que la instrucción TDCALL regresa del VMM que no es de confianza, los registros que el invitado TDX comparte con el VMM necesitan debe borrarse para evitar la ejecución especulativa de los valores proporcionados por VMM. RSI se especifica en el mapa de bits de esos registros, pero falta al poner a cero esos registros en el TDX_HYPERCALL actual. Estaba allí cuando se agregó originalmente en la confirmación 752d13305c78 ("x86/tdx: Expand__tdx_hypercall() to handle more arguments"), pero luego se eliminó en la confirmación 1e70c680375a ("x86/tdx: Do not corrupt frame-pointer in __tdx_hypercall( )"), lo cual era correcto porque %rsi se restaura posteriormente en el "pop %rsi". Sin embargo, una confirmación posterior 7a3a401874be ("x86/tdx: Drop flags from __tdx_hypercall()") eliminó ese "pop %rsi" pero olvidó volver a agregar "xor %rsi, %rsi". Solucionadlo volviéndolo a agregar.

*Credits: N/A
CVSS Scores
Attack Vector
-
Attack Complexity
-
Privileges Required
-
User Interaction
-
Scope
-
Confidentiality
-
Integrity
-
Availability
-
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-05-21 CVE Reserved
  • 2024-05-21 CVE Published
  • 2024-05-22 EPSS Updated
  • 2024-12-19 CVE 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.4 < 6.5.12
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.4 < 6.5.12"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.4 < 6.6.2
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.4 < 6.6.2"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 6.4 < 6.7
Search vendor "Linux" for product "Linux Kernel" and version " >= 6.4 < 6.7"
en
Affected