CVE-2024-35791

7.8 HIGH

📋 TL;DR

This is a use-after-free vulnerability in the Linux kernel's KVM SVM (Secure Virtual Machine) subsystem. It allows a malicious user with access to a KVM virtual machine to potentially crash the host kernel or execute arbitrary code. The vulnerability affects systems running Linux kernels with KVM SVM support enabled.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not explicitly stated in CVE description; typically affects multiple stable kernel versions before the fix commits.
Operating Systems: Linux distributions with KVM SVM support
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if KVM is enabled and SVM (AMD Secure Encrypted Virtualization) features are being used. Systems without virtualization support or using only Intel VT-x are not affected.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Privilege escalation to kernel-level code execution, allowing complete host system compromise and potential escape from the KVM virtual machine.

🟠

Likely Case

Kernel panic or denial of service causing host system crash and disruption of all virtual machines running on the host.

🟢

If Mitigated

Limited impact if KVM is not enabled or SVM features are not used; systems without virtualization support are unaffected.

🌐 Internet-Facing: LOW - This vulnerability requires local access to a KVM virtual machine and cannot be exploited remotely over the network.
🏢 Internal Only: HIGH - Malicious users or compromised virtual machines on the same host can exploit this vulnerability to affect the host system.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires access to a KVM virtual machine and knowledge of the specific memory management operations. The race condition nature makes timing-dependent exploitation challenging.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel versions containing commits: 12f8e32a5a389a5d58afc67728c76e61beee1ad4, 2d13b79640b147bd77c34a5998533b2021a4122d, 4868c0ecdb6cfde7c70cf478c46e06bb9c7e5865, 5ef1d8c1ddbf696e47b226e11888eaf8d9e8e807, e126b508ed2e616d679d85fca2fbe77bb48bbdd7

Vendor Advisory: https://git.kernel.org/stable/c/12f8e32a5a389a5d58afc67728c76e61beee1ad4

Restart Required: Yes

Instructions:

1. Update Linux kernel to a version containing the fix commits. 2. Check with your distribution vendor for specific patched kernel packages. 3. Reboot the system to load the new kernel.

🔧 Temporary Workarounds

Disable KVM SVM support

linux

Disable AMD Secure Encrypted Virtualization (SEV) features in KVM if not required

echo 0 > /sys/module/kvm_amd/parameters/sev
Add 'kvm_amd.sev=0' to kernel boot parameters

🧯 If You Can't Patch

  • Restrict KVM access to trusted users only using appropriate SELinux/AppArmor policies or user permissions
  • Monitor system logs for KVM-related crashes or unusual behavior and isolate affected systems

🔍 How to Verify

Check if Vulnerable:

Check if KVM is enabled and SVM features are active: 'lsmod | grep kvm' and check dmesg for SEV initialization

Check Version:

uname -r

Verify Fix Applied:

Check kernel version against patched versions from your distribution vendor; verify the specific git commits are present in your kernel source

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages related to KVM or memory management
  • Use-after-free warnings in kernel logs (dmesg)
  • Unexpected virtual machine crashes or host system instability

Network Indicators:

  • No network-based indicators as this is a local vulnerability

SIEM Query:

Search for kernel panic events or KVM-related error messages in system logs

🔗 References

📤 Share & Export