CVE-2023-52874·Kernel vulnerability
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.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.6.2
- Published
- 2024-05-21
Affected versions
From: 6.6
Until: 6.6.2
Fixed in: 6.6.2
How to fix this CVE
Update your Linux kernel to version 6.6.2 or later to address a register-clearing issue in the TDX hypercall interface. This vulnerability affects Intel TDX guest systems running kernels 6.6 to 6.6.1, where the RSI register is not properly zeroed after VMM interactions, potentially exposing it to speculative execution attacks. Patching requires a kernel upgrade and system reboot.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check installed kernel version: uname -r — verify if version is between 6.6.0 and 6.6.1
- Confirm TDX capability: cat /proc/cpuinfo | grep -i tdx or dmesg | grep -i tdx — check if system is running as TDX guest
- Review kernel dmesg for TDX initialization: dmesg | grep -i 'tdx\|hypercall' — look for TDX feature registration
- Verify patch applied: grep -r 'xor.*rsi.*rsi' /boot/config-$(uname -r) or compare kernel version after update with uname -r showing 6.6.2 or higher
FAQ
What is CVE-2023-52874?
This vulnerability is a missing register-clearing operation in the x86 TDX hypercall macro that fails to zero the RSI register after returning from untrusted VMM code, potentially allowing speculative execution of VMM-controlled values on Intel TDX guest systems.
Is CVE-2023-52874 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2023-52874?
Linux kernel versions 6.6.0, 6.6.1, and 6.6.2-rc releases are affected. Kernel 6.6.2 and later contain the fix.
How do I check if my server is vulnerable to CVE-2023-52874?
Run uname -r to check your kernel version — if it shows 6.6.0 or 6.6.1 and your system supports Intel TDX, it is vulnerable. TDX support can be verified with dmesg | grep -i tdx.
Does Defensia detect CVE-2023-52874?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Linux kernel is installed on a monitored server, CVE-2023-52874 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/2191950d35d8f81620ea8d4e04d983f664fe3a8a
- https://git.kernel.org/stable/c/5d092b66119d774853cc9308522620299048a662
- https://git.kernel.org/stable/c/de4c5bacca4f50233f1f791bec9eeb4dee1b14cd
- https://git.kernel.org/stable/c/2191950d35d8f81620ea8d4e04d983f664fe3a8a
- https://git.kernel.org/stable/c/5d092b66119d774853cc9308522620299048a662
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2023-52874. Free for 1 server.
Get started free