CVE-2023-52874

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-52874
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-52874.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-52874
Downstream
Related
Published
2024-05-21T15:32:07Z
Modified
2025-10-14T08:18:38.919430Z
Summary
x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro
Details

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 _tdxhypercall() to handle more arguments"), but was later removed in commit 1e70c680375a ("x86/tdx: Do not corrupt frame-pointer in _tdxhypercall()"), which was correct because %rsi is later restored in the "pop %rsi". However a later commit 7a3a401874be ("x86/tdx: Drop flags from _tdxhypercall()") removed that "pop %rsi" but forgot to add the "xor %rsi, %rsi" back.

Fix by adding it back.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7a3a401874bea02f568aa416ac29170d8cde0dc2
Fixed
2191950d35d8f81620ea8d4e04d983f664fe3a8a
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7a3a401874bea02f568aa416ac29170d8cde0dc2
Fixed
de4c5bacca4f50233f1f791bec9eeb4dee1b14cd
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7a3a401874bea02f568aa416ac29170d8cde0dc2
Fixed
5d092b66119d774853cc9308522620299048a662

Affected versions

v6.*

v6.3
v6.3-rc4
v6.3-rc5
v6.3-rc6
v6.3-rc7
v6.4
v6.4-rc1
v6.4-rc2
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.5
v6.5-rc1
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.5.1
v6.5.10
v6.5.11
v6.5.2
v6.5.3
v6.5.4
v6.5.5
v6.5.6
v6.5.7
v6.5.8
v6.5.9
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.4.0
Fixed
6.5.12
Type
ECOSYSTEM
Events
Introduced
6.6.0
Fixed
6.6.2