Skip to main content

CVE-2024-55881: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-55881cvecve-2024-55881
Published: Sat Jan 11 2025 (01/11/2025, 12:35:44 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Play nice with protected guests in complete_hypercall_exit() Use is_64_bit_hypercall() instead of is_64_bit_mode() 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 sev_smoke_test selftest to generate a KVM_HC_MAP_GPA_RANGE hypercall via VMGEXIT trips the WARN: ------------[ cut here ]------------ WARNING: CPU: 273 PID: 326626 at arch/x86/kvm/x86.h:180 complete_hypercall_exit+0x44/0xe0 [kvm] Modules linked in: kvm_amd kvm ... [last unloaded: kvm] CPU: 273 UID: 0 PID: 326626 Comm: sev_smoke_test Not tainted 6.12.0-smp--392e932fa0f3-feat #470 Hardware name: Google Astoria/astoria, BIOS 0.20240617.0-0 06/17/2024 RIP: 0010:complete_hypercall_exit+0x44/0xe0 [kvm] Call Trace: <TASK> kvm_arch_vcpu_ioctl_run+0x2400/0x2720 [kvm] kvm_vcpu_ioctl+0x54f/0x630 [kvm] __se_sys_ioctl+0x6b/0xc0 do_syscall_64+0x83/0x160 entry_SYSCALL_64_after_hwframe+0x76/0x7e </TASK> ---[ end trace 0000000000000000 ]---

AI-Powered Analysis

AILast updated: 06/28/2025, 11:25:27 UTC

Technical Analysis

CVE-2024-55881 is a vulnerability identified in the Linux kernel's KVM (Kernel-based Virtual Machine) subsystem, specifically affecting the x86 architecture. The issue arises in the function complete_hypercall_exit(), which handles the completion of hypercalls made by virtual machines (VMs) running on KVM. The vulnerability is due to improper detection of 64-bit hypercalls. The kernel code incorrectly uses is_64_bit_mode() to detect 64-bit hypercalls, but for guests with protected states such as SEV-ES (Secure Encrypted Virtualization - Encrypted State) and SEV-SNP (Secure Nested Paging), the vCPU state required to determine 64-bit mode is unavailable. The correct approach is to use is_64_bit_hypercall(), which assumes hypercalls are made in 64-bit mode for these protected guests. This flaw can cause the kernel to trigger warnings and potentially unstable behavior when handling hypercalls, as demonstrated by the sev_smoke_test selftest generating a KVM_HC_MAP_GPA_RANGE hypercall via VMGEXIT that triggers a kernel warning and trace. While no known exploits are currently reported in the wild, the vulnerability could lead to denial of service or instability in virtualized environments using KVM with SEV-ES or SEV-SNP enabled guests. The issue affects Linux kernel versions prior to the patch and is relevant for environments leveraging AMD SEV technologies for VM protection. The vulnerability was published on January 11, 2025, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, especially those utilizing virtualization technologies with AMD SEV-ES or SEV-SNP for enhanced VM security, this vulnerability poses a risk of hypervisor instability or denial of service. Organizations running cloud infrastructure, data centers, or private clouds with Linux KVM hypervisors on AMD hardware could experience unexpected VM crashes or degraded service availability. This could disrupt critical services, impact business continuity, and increase operational costs due to troubleshooting and remediation efforts. Confidentiality and integrity impacts appear limited as the vulnerability relates primarily to hypercall handling and does not directly expose guest memory or allow privilege escalation. However, the availability impact on virtualized workloads could be significant, particularly for sectors relying on high availability such as finance, healthcare, and government services. Additionally, the complexity of SEV-ES and SEV-SNP environments means that failure to patch could undermine trust in hardware-based VM protections, potentially affecting compliance with data protection regulations like GDPR if service disruptions lead to data unavailability.

Mitigation Recommendations

1. Apply the Linux kernel patch that corrects the hypercall detection logic by replacing is_64_bit_mode() with is_64_bit_hypercall() in complete_hypercall_exit(). Ensure all KVM-related kernel modules are updated accordingly. 2. Conduct thorough testing of virtualized environments with SEV-ES and SEV-SNP enabled guests after patching to verify stability and correct hypercall handling. 3. Monitor kernel logs for WARN messages related to complete_hypercall_exit() or KVM hypercalls as indicators of potential exploitation or instability. 4. For organizations using custom or older Linux kernels, backport the patch or upgrade to a supported kernel version that includes the fix. 5. Coordinate with hardware vendors and cloud providers to confirm that firmware and microcode updates complement the kernel patch for SEV technologies. 6. Implement robust VM monitoring and automated recovery mechanisms to minimize downtime in case of hypervisor crashes. 7. Limit access to hypervisor management interfaces and restrict VM configurations to trusted administrators to reduce risk of triggering the vulnerability through crafted hypercalls.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-01-09T09:51:32.450Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9823c4522896dcbdf11a

Added to database: 5/21/2025, 9:08:51 AM

Last enriched: 6/28/2025, 11:25:27 AM

Last updated: 8/12/2025, 5:19:19 AM

Views: 18

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats