CVE
CVE-2026-99312
CWE
CWE-416
Affected Surface
- Linux kernel 6.1 and later (since commit `ed129ec9057f`) before 6.12.118, 6.18.64 and 7.3.5, plus 5.15.81+ and 6.0.11+ through backports of the same commit; no upstream fix yet in the 6.6, 6.1 and 5.15 longterm lines
- Only KVM hosts on AMD CPUs (SVM) with `kvm_amd` nested virtualization enabled, which is the module default; Intel (VMX) hosts are not affected
- Debian bookworm, trixie and forky (vulnerable on 20 November; sid fixed in `7.3.5-1`); Ubuntu jammy, noble, resolute and stonking (fix needed)
TL;DR
CVE-2026-99312 is a use-after-free in KVM, the hypervisor built into the Linux kernel. It only exists on AMD hosts with nested virtualization turned on. When an INIT signal stops a nested guest, KVM forgets to reset the outer guest’s MMU context, so the outer guest comes back with its nested page table (NPT) pointer aimed at a host page the kernel has already freed. Once the kernel reuses that page, an attacker with root inside the VM can get the CPU to walk a page table the attacker wrote, and that table can point at any physical page on the host.
Oren Yomtov of Terra Security used it to read about 127 GB of host RAM from inside a DigitalOcean Droplet, and to write 32 chosen bytes into a live host kernel page on Terra’s own bare-metal AMD server. On a shared host that memory includes other tenants’ VMs. DigitalOcean live-patched its fleet. Stefan Teodorescu of Google and Chris Mason are also credited as reporters on the fix commit.
The kernel CVE team scores it CVSS 8.8. Red Hat’s preliminary rating is Moderate. No exploit code is public, nobody has reported exploitation outside research, and EPSS was 0.0015 on 20 November.
What to do now:
- If you run KVM on AMD (your own hypervisors, Proxmox, OpenStack, CI runners that host VMs, Firecracker or Kata hosts that use
kvm_amd), check whether nested virtualization is on. - Move to Linux 7.3.5, 6.18.64 or 6.12.118 or later, or a distro kernel that carries commit
c7c288d178cb. The 6.6, 6.1 and 5.15 longterm lines had no fix on 20 November. - If you can’t reboot into a fixed kernel yet, load
kvm_amdwithnested=0. That closes the path completely, but it breaks any guest that runs its own VMs. - Cloud tenants don’t need to do anything. The fix lives in the provider’s host kernel.
Affected packages and projects
| Ecosystem | Package | Affected versions | Fixed or safe version |
|---|---|---|---|
| Linux kernel (upstream) | arch/x86/kvm (kvm_amd, nested SVM) | 6.1 through 7.3.4 (since ed129ec9057f) | 7.3.5, 6.18.64, 6.12.118, 7.4-rc2 |
| Linux kernel (longterm) | 6.6.y, 6.1.y | All releases | No upstream fix on 20 November 2026 |
| Linux kernel (longterm) | 5.15.y | 5.15.81 and later (backport 6425c590d0cc) | No upstream fix on 20 November 2026 |
| Linux kernel (longterm) | 5.10.y | Not affected | n/a |
| Debian | linux | bookworm 6.1.192-2, trixie 6.12.117-1, forky 7.3.4-1 | sid 7.3.5-1 |
| Ubuntu | linux | jammy, noble, resolute, stonking (needed) | Not yet released |
Only AMD SVM is affected. On Intel VMX, INIT is an unconditional intercept, so KVM never emulates INIT while a nested guest is running. Many providers Terra surveyed were safe because they don’t enable nested virtualization on AMD, but nested=1 is the kvm_amd module default, so self-managed hosts are likely to have it on.
Technical analysis
The bug
KVM keeps a control block per virtual CPU, which AMD calls the VMCB. Its nCR3 field holds the host physical address of the top-level page of the guest’s nested page table, the table that translates guest physical addresses to host physical addresses. The CPU trusts whatever page that field names.
When the outer guest (L1) runs a nested guest (L2), the CPU uses L2’s tables. When L2 exits, KVM switches back to L1’s VMCB and is supposed to reload L1’s MMU state. An INIT, the reset signal one vCPU can send another, is one way to force that exit. In 2022, a fix for CVE-2022-3344 (commit ed129ec9057f, “KVM: x86: forcibly leave nested mode on vCPU reset”) made the reset path leave nested mode first. It switched to vmcb01 but didn’t rewrite nested_cr3, and it relied on kvm_vcpu_reset() to reset the MMU.
That reset only ran when the vCPU had paging on. This is the code before the fix, in arch/x86/kvm/x86.c:
void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
{
/* ... */
kvm_x86_call(set_efer)(vcpu, 0);
kvm_x86_call(update_exception_bitmap)(vcpu);
/*
* ... CR0.WP and the paging-related bits in CR4 and EFER are irrelevant
* if CR0.PG was '0'; ... So we only need to check CR0.PG here.
*/
if (old_cr0 & X86_CR0_PG) {
kvm_make_request(KVM_REQ_TLB_FLUSH_GUEST, vcpu);
kvm_mmu_reset_context(vcpu);
}
/* ... */
}
The comment is right about CR0, CR4 and EFER, but KVM’s shadow page role also encodes guest_mode (whether the vCPU is in L2). If L2 is running with CR0.PG=0 when the INIT lands, old_cr0 & X86_CR0_PG is false, kvm_mmu_reset_context() never runs, and L1 resumes with an MMU context that still belongs to L2.
The kernel CNA record spells out the trigger, all from inside a VM the attacker controls:
- L1 enters L2 with
CR0.PGclear andINTERCEPT_INITclear, so a sibling vCPU’s INIT is taken in-guest instead of being reflected to L1. - A memslot change (
KVM_SET_USER_MEMORY_REGION) with the defaultKVM_X86_QUIRK_SLOT_ZAP_ALLmakeskvm_tdp_mmu_invalidate_roots()drop the TDP root thatvmcb01.control.nested_cr3still names. - The INIT goes through
kvm_apic_accept_events()intokvm_vcpu_reset(), which skips the MMU reset.kvm_mmu_reload()sees a valid-lookingroot.hpaand VM-entry walks the freed page as the NPT root.
Turning a stale pointer into host memory access
Terra’s write-up describes the exploitation in two steps. First, the guest touches fresh memory so KVM allocates new NPT pages. The freed page comes back as one of them, a bottom-level table full of host addresses of the guest’s own pages. The stale nCR3 still treats that page as the top level, so when the CPU reads a top-level entry it gets the host address of an ordinary guest page and uses it as the second-level table. Terra calls that page “Page A”.
Second, Page A is guest memory, so the guest writes its own entries into it. Those entries can name any host physical page. From then on every memory access the guest makes goes through a page table it wrote. On DigitalOcean, Terra mapped about 127 GB of host RAM read-only and found the host kernel’s version banner. On its own server it mapped a host kernel page writable and changed 32 bytes, which a witness module in the host kernel confirmed.
The fix
Commit c7c288d178cb by Sean Christopherson makes the MMU reset unconditional on INIT:
@@ -9731,18 +9731,23 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
kvm_x86_call(set_efer)(vcpu, 0);
kvm_x86_call(update_exception_bitmap)(vcpu);
+ if (old_cr0 & X86_CR0_PG)
+ kvm_make_request(KVM_REQ_TLB_FLUSH_GUEST, vcpu);
+
/*
- * ... So we only need to check CR0.PG here.
+ * ... Subtly, if the vCPU was
+ * in guest mode (L2) or SMM ..., an MMU reset is also necessary as
+ * "guest mode" and "smm" are both encoded in the shadow page role.
*/
- if (old_cr0 & X86_CR0_PG) {
- kvm_make_request(KVM_REQ_TLB_FLUSH_GUEST, vcpu);
- kvm_mmu_reset_context(vcpu);
- }
+ kvm_mmu_reset_context(vcpu);
- The TLB flush keeps its old condition. The commit message notes it’s already redundant with the flush emitted on every INIT.
kvm_mmu_reset_context()now always runs, so L1 gets an MMU context with the right role and a live root no matter what mode L2 was in. The maintainers chose this over a narrower check because SMM is in the page role too, and an MMU reset on INIT is cheap.
The stable backports are f55a3e4e08dc (6.12.118), 24f644ea26c2 (6.18.64) and d47bae9eb33b (7.3.5).
IOCs
There are none to publish. No exploit code is public, and VirtFusion, which is tracking the issue for its operators, has seen no reports of use outside research. Exploitation happens entirely inside the attacker’s own VM and leaves no network traffic, and nobody has published guidance for spotting a past attempt. The one host-side symptom the CNA record describes is a vCPU thread that livelocks in npf_interception until the freed root is reused, which would show up as a guest vCPU pinned at 100% without making progress.
Detection and remediation
Check whether a host is exposed:
# 1. AMD host with KVM loaded?
grep -m1 -o 'AuthenticAMD' /proc/cpuinfo && lsmod | grep -w kvm_amd
# 2. Is nested virtualization on? (1 or Y means exposed)
cat /sys/module/kvm_amd/parameters/nested
# 3. Running kernel version (fixed upstream: 7.3.5, 6.18.64, 6.12.118 or later)
uname -r
# 4. Distro kernels: look for the CVE or the fix title in the package changelog
apt changelog "linux-image-$(uname -r)" 2>/dev/null | grep -E 'CVE-2026-99312|Unconditionally reset MMU context when emulating INIT'
rpm -q --changelog kernel 2>/dev/null | grep -E 'CVE-2026-99312|reset MMU context when emulating INIT'
# 5. libvirt: list guests that get the svm flag (host-passthrough CPUs or an explicit svm feature)
for d in $(virsh list --name); do virsh dumpxml "$d" | grep -qE "mode='host-passthrough'|name='svm'" && echo "$d"; done
If you can’t patch yet, turn nested virtualization off. Every VM on the host has to be stopped first:
echo "options kvm_amd nested=0" | sudo tee /etc/modprobe.d/kvm-nested-disable.conf
sudo modprobe -r kvm_amd && sudo modprobe kvm_amd
cat /sys/module/kvm_amd/parameters/nested # should print 0 or N
Guests that run their own hypervisors (nested CI runners, Android emulators, Windows VBS/WSL2 guests on AMD hosts) stop working until you turn it back on. Hosts that only run untrusted guests without nested needs can leave it off.
From inside a cloud VM you can see whether your provider exposes nested SVM to you (grep -c svm /proc/cpuinfo), but you can’t tell whether the host kernel is patched. Ask the provider.
Credentials to rotate: none by default. If you ran a multi-tenant AMD KVM host with nested virtualization on and untrusted tenants had root in their guests, treat secrets held in host memory and in co-located guests (TLS keys, cloud credentials, disk encryption keys) as potentially exposed between 2022 and your patch date. No exploitation has been reported, so weigh that against how much you trust your tenants.
Timeline
- 2022: Commit
ed129ec9057f(“KVM: x86: forcibly leave nested mode on vCPU reset”), the fix for CVE-2022-3344, lands in Linux 6.1 and is backported to 5.15.81 and 6.0.11. It introduces this bug. - 2026-10-21: Terra reports the issue to the Linux KVM maintainers after DigitalOcean validated it through its bug bounty program.
- 2026-10-22: Sean Christopherson posts the fix to the KVM list (01:54 UTC).
- 2026-11-02: Fix merged to mainline.
- 2026-11-09: First tagged release with the fix, v7.4-rc2.
- 2026-11-17: Fix ships in stable 7.3.5 and longterm 6.18.64 and 6.12.118.
- 2026-11-18: Kernel CVE team publishes CVE-2026-99312 (CVSS 8.8). Terra publishes its technical write-up.
- 2026-11-19: DigitalOcean publishes its disclosure post. Ubuntu marks the CVE High priority.
- 2026-11-20: Debian sid has
7.3.5-1. Debian stable releases, Ubuntu, and the 6.6, 6.1 and 5.15 longterm kernels are still unfixed.
From research to remediation
Check whether this pattern exists in your codebase
Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.
References
- Terra Security (18 November 2026): CVE-2026-99312, KVM guest-to-host escape, by Oren Yomtov
- DigitalOcean: Virtualization, responsible disclosure, and CVE-2026-99312
- Upstream fix torvalds/linux@c7c288d178cb: KVM: x86: Unconditionally reset MMU context when emulating INIT
- linux-cve-announce (18 November 2026): CVE-2026-99312
- Red Hat Customer Portal: CVE-2026-99312
- Debian security tracker: CVE-2026-99312
- Ubuntu CVE tracker: CVE-2026-99312
- The Hacker News: Linux KVM flaw CVE-2026-99312 lets guest VMs access host memory on AMD hosts