CVE-2024-55881: KVM: x86: Play nice with protected guests in complete_hypercall_exit()
In the Linux kernel, the following vulnerability has been resolved:
KVM: x86: Play nice with protected guests in completehypercallexit()
Use is64bithypercall() instead of is64bitmode() to detect a 64-bit hypercall when completing said hypercall. For guests with protected state, e.g. SEV-ES and SEV-SNP, KVM must assume the hypercall was made in 64-bit mode as the vCPU state needed to detect 64-bit mode is unavailable.
Hacking the sevsmoketest selftest to generate a KVMHCMAPGPARANGE hypercall via VMGEXIT trips the WARN:
------------[ cut here ]------------ WARNING: CPU: 273 PID: 326626 at arch/x86/kvm/x86.h:180 completehypercallexit+0x44/0xe0 [kvm] Modules linked in: kvmamd kvm ... [last unloaded: kvm] CPU: 273 UID: 0 PID: 326626 Comm: sevsmoketest Not tainted 6.12.0-smp--392e932fa0f3-feat #470 Hardware name: Google Astoria/astoria, BIOS 0.20240617.0-0 06/17/2024 RIP: 0010:completehypercallexit+0x44/0xe0 [kvm] Call Trace: <TASK> kvmarchvcpuioctlrun+0x2400/0x2720 [kvm] kvmvcpuioctl+0x54f/0x630 [kvm] sesysioctl+0x6b/0xc0 dosyscall64+0x83/0x160 entrySYSCALL64afterhwframe+0x76/0x7e </TASK> ---[ end trace 0000000000000000 ]---
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-55881?
CVE-2024-55881 is considered to have a medium severity due to its impact on the Linux kernel's handling of hypercalls.
How do I fix CVE-2024-55881?
To fix CVE-2024-55881, update your Linux kernel to the latest version that contains the relevant patch.
What software is affected by CVE-2024-55881?
CVE-2024-55881 affects the Linux Kernel, particularly in interaction with protected guests.
What is the nature of the vulnerability CVE-2024-55881?
CVE-2024-55881 involves an improper check within the complete_hypercall_exit() function related to detecting 64-bit hypercalls.
What does CVE-2024-55881 affect in the virtualization context?
CVE-2024-55881 affects the KVM virtualization environment, specifically its interaction with protected guest systems.