deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Linux KVM use-after-free on AMD let a guest VM read 127 GB of host memory

A use-after-free in KVM's AMD nested virtualization code let a root guest read about 127 GB of host RAM and write into host kernel memory. Upstream fixes exist but most distribution kernels are unpatched.

Linux KVM use-after-free on AMD let a guest VM read 127 GB of host memory

A use-after-free in the Linux kernel's KVM hypervisor let a guest virtual machine on an AMD host read roughly 127 GB of the host's physical memory, according to a RedEye Threat Intelligence report republished on dev.to. On a shared server that memory can include other tenants' virtual machines, making the flaw, tracked as CVE-2026-99312, a serious risk for multi-tenant clouds.

Oren Yomtov of Terra Security found the bug and reported it through DigitalOcean's bug bounty program. DigitalOcean reproduced the exploit on its own hosts, rated it critical, live-patched its fleet and told Droplet customers they needed to do nothing. KVM maintainers were notified on October 21 and merged a fix on November 2.

What the researchers demonstrated

Two tests established the reach of the bug. In the read test on a DigitalOcean Droplet, the memory dump began with the host's kernel version banner and continued with about 127 GB of host RAM exposed to the guest as read-only. In a write test on Terra's own bare-metal AMD server, the guest overwrote 32 selected bytes in a live host kernel page, and a kernel module loaded on the host as a witness verified the modification.

Both tests started from root inside a VM the researchers controlled. That is the required attacker position: network access to the host is not enough, though on a public cloud renting a root-level VM is trivial.

A stale page table pointer

KVM isolates each VM with a nested page table that maps guest addresses to host physical memory, and the processor finds that table through a pointer stored per virtual CPU. When an INIT reset stops a nested VM, KVM fails to restore the outer VM's page table pointer, leaving it aimed at a page the host kernel has already released. Once the kernel reuses that page, the guest can populate it with page table entries of its own, which the processor then interprets as the genuine table. Since forged entries may target any physical page on the host, the guest can read memory far outside its allocation. The corrected code resets this management state on every INIT.

The bug was itself introduced by a security fix: a 2022 patch for CVE-2022-3344, another nested virtualization flaw, changed a reset path but missed the pointer. The report says the error entered kernel 6.1 and was backported into 5.15.81 and 6.0.11, leaving the flaw in the kernel for just under four years.

Scope and patching status

AMD KVM hosts with nested virtualization enabled in kvm_amd are affected, and that setting is on by default. Intel hosts are not affected because the vulnerable code lives only in KVM's AMD support. Several cloud providers Terra surveyed were not exposed because they had not enabled nested virtualization on AMD.

Upstream fixes are in kernels 7.3.5, 6.18.64 and 6.12.118, per the kernel CVE team's announcement. Distribution coverage lags: Debian lists kernels in all releases as vulnerable with a fix only in unstable, Ubuntu rates the issue High with no fixed package yet, and Red Hat's Enterprise Linux 9 and 10 are affected with the fix deferred, while Enterprise Linux 8 is not.

The fix lives in the host kernel, so patching guest operating systems accomplishes nothing, and a host keeps its old kernel until it reboots. Until a fixed kernel is running, the only mitigation is disabling nested virtualization in kvm_amd. That fully blocks this attack route but prevents tenants from running VMs of their own, such as Docker Desktop-style environments, Android emulators or CI sandboxes, and the option cannot be toggled while VMs are running, so either route requires a maintenance window.

Severity ratings disagree

The Linux kernel CVE team scores the flaw at 8.8 with high impact on confidentiality, integrity and availability. Red Hat's preliminary assessment rates it Moderate at 5.6 and describes the impact as denial of service only, while DigitalOcean called it critical for its shared cloud. The report argues Red Hat's rating understates the risk for multi-tenant AMD hosts given the demonstrated read and confirmed write. VirtFusion, which tracks the issue for its operators, reports no use outside research and no published exploit code, but there is also no known way to detect past exploitation, an absence the report attributes to missing telemetry rather than confirmed safety.

Why it matters

This is the third KVM isolation failure disclosed this year, after a 16-year-old flaw in KVM's shadow memory management affecting both Intel and AMD and the PwnEscape flaw in Linux networking code that let a guest read host memory in Vercel's live sandboxes in October. The pattern matters to anyone whose security model relies on the hypervisor boundary. Operators hosting untrusted or semi-trusted workloads on AMD KVM should prioritise host patches, teams on third-party AMD infrastructure should check their provider's status, and triage should follow demonstrated impact rather than the lowest vendor score.

  • #linux-kernel
  • #kvm
  • #security
  • #virtualization
  • #amd
  • #cloud

Related posts