x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro
Published May 21, 2024
7.1
HIGHCVSS 3.1
EPSS 0.26%
Description
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.
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 6.4StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<6.4
- Version 6.5.12StatusunaffectedConstraints<=6.5.*
- Version 6.6.2StatusunaffectedConstraints<=6.6.*
- Version 6.7StatusunaffectedConstraints<=*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
- ≥ 6.4 · < 6.5.12
- ≥ 6.6 · < 6.6.2
No data.
Red Hat Enterprise Linux 6
kernel
Out of support scope
Red Hat Enterprise Linux 7
kernel
Not affected
Red Hat Enterprise Linux 7
kernel-rt
Not affected
Red Hat Enterprise Linux 8
kernel
Not affected
Red Hat Enterprise Linux 8
kernel-rt
Not affected
Red Hat Enterprise Linux 9
kernel
Not affected
Red Hat Enterprise Linux 9
kernel-rt
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 6 | kernel | Out of support scope | n/a |
| Red Hat Enterprise Linux 7 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Not affected | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
References (8)
- https://access.redhat.com/security/cve/CVE-2023-52874 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2282630 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2023-59587 Advisory
- https://git.kernel.org/stable/c/2191950d35d8f81620ea8d4e04d983f664fe3a8a Patch
- https://git.kernel.org/stable/c/5d092b66119d774853cc9308522620299048a662 Patch
- https://git.kernel.org/stable/c/de4c5bacca4f50233f1f791bec9eeb4dee1b14cd Patch
- https://nvd.nist.gov/vuln/detail/CVE-2023-52874
- https://www.cve.org/CVERecord?id=CVE-2023-52874
Change history (0)
No recorded changes yet.