Cloud computing runs on one promise – your virtual machine is yours alone. On November 18, 2026, Terra Security published research that breaks that promise for a specific, narrow configuration. On an ordinary DigitalOcean droplet, researcher Oren Yomtov got a guest VM to read the physical host’s memory. He first pulled the host kernel’s version banner, a string that has no business appearing inside a guest, then mapped roughly 127 GB of host RAM read-only from inside the VM. On a shared host, that memory belongs to every other tenant running there.
The write half of the exploit was demonstrated separately, on a bare-metal AMD server the researchers controlled themselves. The guest placed 32 chosen bytes into a live host kernel page while a witness module running in the host kernel watched its own page change underneath it.
The vulnerability, tracked as CVE-2026-99312, is a use-after-free in KVM’s nested SVM handling. It affects AMD hosts with nested virtualization enabled, and the only thing an attacker needs is a VM and root inside it.
What makes this bug interesting isn’t just the escape. It’s where the bug came from. It was introduced in November 2022, inside the fix for a different vulnerability, CVE-2022-3344, and sat there for almost four years. The fix for that fix landed in mainline on November 2, 2026, shipped in v7.4-rc2, and reached users on November 17 in stable kernels 7.3.5, 6.18.64, and 6.12.118.
This article reconstructs the bug and the exploit chain from Terra’s write-up, the upstream commits, and the stable changelogs, because the mechanics are a useful case study in how a narrowly scoped patch can leave the underlying invariant broken.
How Nested Page Tables Are Supposed to Keep a Guest Confined
To see how a guest reaches memory it was never given, you first need to know what actually confines it. On AMD’s SVM virtualization, three players matter: the guest VM, KVM (the hypervisor built into the host’s Linux kernel), and the physical processor.
The guest keeps its own page tables, translating its virtual addresses to what it believes are physical addresses. Those “physical” addresses are a fiction. A second translation layer, the nested page table (NPT), converts guest-physical addresses into real host-physical addresses, and this table is what actually enforces isolation. KVM builds the NPT in host kernel memory, out of the guest’s reach, and the processor walks it in hardware whenever it needs a translation that isn’t already cached in the TLB. The root of the table is named by a field in the VM’s control block, called nCR3, which holds the host-physical address of the top-level page-table page.
The walk itself is mechanical. With four-level paging, the processor splits the guest-physical address into four groups of nine bits plus a twelve-bit page offset. Each nine-bit group indexes one of 512 entries at successive levels, each entry supplies the host address of the next table page, and the bottom entry supplies the final memory page.
Here’s the detail the whole exploit rests on: a page-table page carries no record of its own level. An entry is just an address and some flag bits. What makes a page “the top level” is simply that nCR3 points at it. The hardware treats whatever page the pointer names as the root of the walk and reads its entries positionally, with complete trust. KVM builds the tables, but the processor does the walking, and the processor has no way to check whether the page it was handed is actually the kind of page KVM intended it to be.
That trust is normally fine, because nCR3 always names a live, correctly leveled table that KVM maintains. The bug in CVE-2026-99312 is that one code path in KVM forgot to keep that guarantee. After the bug fires, nCR3 still names a page that no longer holds a page table at all, because KVM already freed it. The processor keeps following the pointer anyway, so whatever the kernel reallocates that page for becomes, from the hardware’s point of view, the top of the guest’s memory map. That’s the use-after-free. Everything that follows is the art of choosing what the freed page becomes.
📬 Stay Ahead of Cyber Threats
Get the latest cybersecurity news, critical vulnerabilities, threat intelligence, tutorials, and exclusive giveaways delivered straight to your inbox. No spam. Unsubscribe anytime.

Two Control Blocks and a Reset That Skipped One of Them
The vulnerable path lives in nested virtualization, the feature that lets a guest run a guest of its own. When an L1 guest (the droplet you rented) runs an L2 guest through its own KVM, the host’s KVM maintains two control blocks, vmcb01 for L1 and vmcb02 for L2, each with its own nested page-table pointer. The researchers wrote their own L2 and ran it with paging disabled, which means KVM can’t just hand L2 the page table it built for L1; it has to build a second nested page table for the L2 context. KVM tags these MMU contexts with a “page role,” metadata that encodes, among other things, whether the context belongs to a nested guest (guest_mode) and whether the vCPU is in System Management Mode. That metadata matters, because the fix turns on it.
Every time L2 exits back to L1 through the normal nested-VMEXIT path, KVM does the housekeeping that makes the world consistent again: it switches the active control block back to vmcb01 and refreshes L1’s MMU context so vmcb01’s nCR3 names L1’s live page table before L1 runs again.
But there’s another way out of L2: INIT, the architectural reset signal. A second virtual CPU belonging to the attacker’s VM sends an INIT inter-processor interrupt to the vCPU running L2, and on AMD this doesn’t force the normal exit path. As Maxim Levitsky put it in the 2022 commit at the center of this story, INITs aren’t latched in SVM non-root mode the way they are on Intel’s VMX, so KVM ends up emulating the reset itself, through kvm_vcpu_reset(), while the vCPU is still logically in guest mode.
KVM does have a safety net for exactly this situation. Inside kvm_vcpu_reset(), a full MMU rebuild, kvm_mmu_reset_context(), would discard the stale context and rebuild L1’s map from scratch, incidentally repairing nCR3. Before the 2026 fix, though, that rebuild only ran conditionally, gated on whether paging had been enabled before the reset. The CR0 value checked at that point is whatever the vCPU was actually running with, which in this attack is L2’s CR0, with the paging bit deliberately cleared. So the normal exit path never runs, the conditional rebuild declines to fire, and neither path refreshes the pointer. The vCPU resumes as L1 with vmcb01’s nCR3 still holding whatever address it held before.
To turn that stale pointer into a use-after-free, the attacker arranges for the page it names to be freed while L2 is running. While the nested guest executes, the researchers change their VM’s memory map in a way that makes KVM invalidate the guest’s nested page tables and free the page at the root of L1’s table. Then the INIT arrives from the second vCPU. KVM switches the control block back to vmcb01, which is the 2022 security fix working exactly as designed, but the page-table pointer inside vmcb01 goes back into service still naming the page that was just freed. The control block got fixed. The map it points to didn’t.

Winning the Freed Page Back
A dangling pointer is only useful if you can control what gets allocated into the hole it leaves behind. Here the exploit relies on a well-known property of the kernel’s page allocator: the per-CPU page cache behaves roughly last-in, first-out for single pages. The root page was just freed by the same CPU that will service the next allocation, so it sits near the top of that CPU’s free list.
The attacker touches memory in the guest that KVM hasn’t mapped yet, forcing a nested page fault. KVM responds by allocating a fresh page-table page, a bottom-level table, and filling it with the host-physical addresses of the guest’s own pages. The page that comes back is the freed root. It’s a live, kernel-built, kernel-owned page table again, but it’s the wrong level: the stale nCR3 still names it, so the processor reads what is actually a bottom-level table as if it were the top level of the walk.
This is where the processor’s blind positional trust pays off for the attacker. It takes an entry from what it believes is the top level and follows it, expecting to find the second level. The entries in the recycled page are perfectly legitimate bottom-level entries, each one the host address of a page belonging to the attacker’s VM, so the walk lands in ordinary guest memory. The attacker picks guest-physical addresses whose top-level index hits a populated entry, and the page the processor then reads as the second level of the page table turns out to be a data page the attacker owns and can write freely.
The exploit never actually corrupts anything KVM built. The kernel-owned page stays exactly as KVM left it. The control comes entirely from the level below it, where the hardware’s misreading promotes attacker-owned data into page-table structure.

This step is a race, and it can fail if the freed page gets consumed by something else before KVM reallocates it as a page table. On a cloud host, the researchers report getting roughly one real attempt per boot. On the large droplet where they ran the full chain, it succeeded on 6 of 12 boots. A coin flip per boot isn’t a reliable exploit by academic standards, but it’s entirely workable for an attacker who can reboot a droplet as many times as they like.
Building a Read Oracle Out of the CPU’s Accessed Bit
The attacker now controls a page the processor reads as the second level of the nested page table, but that alone isn’t enough. To forge a working table, you need entries that point at real host-physical addresses, and a guest, by design, has no idea where its own pages actually live in host memory. The exploit solves this with a side channel built from a single hardware behavior: whenever the processor uses a page-table entry, it sets the Accessed bit (bit 5) in that entry, including in nested page tables. The bit exists for the kernel’s page-aging logic. Here it becomes a read oracle that reports which pages the hardware walker has touched.
The researchers stack the deck first. At the start of 262,144 of their own guest pages, exactly one gigabyte of guest RAM, they plant a valid entry with the Accessed bit clear and the page-size bit set, so that if the walker ever reads one of these pages as a table, it stops at that entry and treats it as a large-page mapping instead of walking further. With a gigabyte of marked pages resident, a meaningful fraction of plausible host addresses now belong to the attacker.
The first use of the oracle is identification: when the processor reads one of the guest’s pages as the second-level table, it sets the Accessed bit in the planted entry at the top of that page. Scanning the marked pages for a flipped bit reveals which page, call it Page A, the walker is currently treating as table structure. That tells the attacker which page to edit, though not yet its host address.
The second use extracts the addresses themselves. The attacker writes a guessed host-physical address into a different entry of Page A, one the processor would read as a pointer to a third-level table, with the page-size bit clear so the walk continues. If the guess happens to match the real host address of another marked guest page, the processor reads that page as the third level, sets the Accessed bit in its planted entry, and stops. The attacker scans again, finds the flipped bit, and now knows something the hypervisor never meant to reveal: this specific guest page lives at exactly that host-physical address. A wrong guess costs only microseconds, so the attacker just tries again. On the researchers’ bare-metal server, a few hundred guesses yielded the host addresses of two of their pages. With a gigabyte of sprayed targets, this isn’t brute force against a 64-bit address space; it’s a lottery the attacker has already rigged in their own favor.

From Forged Page Table to Reading and Writing Host Memory
Two known host addresses turn out to be enough. One guest page, whose host location is now known, becomes the forged table structure: its entries can point wherever the attacker likes in host-physical memory, and because the walk already runs through attacker-controlled structure, those entries take effect as real translations. The second known page serves as the oracle’s receipt, confirming the mechanism worked before anything riskier is attempted. From that point on, the guest’s memory accesses flow through a page table the guest wrote itself, and every access lands wherever the attacker decides.
On DigitalOcean, the researchers pointed their forged table at roughly 127 GB of host RAM and mapped it read-only, a deliberate choice to demonstrate impact without touching other customers’ data. The host’s kernel version banner came back, a string no droplet should ever see, along with the readable contents of a shared machine whose memory belongs to whoever else happens to be running there.
The write primitive was demonstrated separately, on a bare-metal AMD server under the researchers’ own control: the guest dropped 32 chosen bytes into a live host kernel page, and a witness module running in that kernel, the legitimate owner of the page, reported that something other than itself had modified it.

It’s worth being precise about the scope here. Terra demonstrated arbitrary read and arbitrary write of host physical memory, not a fully weaponized host takeover. Arbitrary write to host kernel memory is still the standard raw ingredient for code execution on the host, and on a multi-tenant machine, arbitrary read alone already reaches every neighbor’s secrets.
The 2022 Fix That Planted the Bug
The origin story is the most useful part of this whole case. In 2022, Maxim Levitsky of Red Hat found and fixed CVE-2022-3344, a use-after-free in the same corner of KVM. Back then, kvm_vcpu_reset() left nested mode by clearing vcpu->arch.hflags, but without the housekeeping that should have gone with it. On SVM, a vCPU could be reset while in guest mode, because INITs aren’t latched in SVM non-root mode and L1 isn’t required to intercept a triple fault happening inside L2, so KVM would keep using vmcb02 while no longer believing it was in guest mode. Later in the reset, EFER gets cleared, which disables virtualization and correctly triggers the freeing of the nested guest state, including vmcb02. Since KVM was still running on the now-freed vmcb02, the result was a use-after-free and a host kernel crash, a denial-of-service bug scored 5.5 by NVD.
Levitsky’s fix, commit ed129ec9057f (“KVM: x86: forcibly leave nested mode on vCPU reset”), merged for v6.1 in November 2022, added the missing step: if the vCPU is in guest mode when a reset arrives, call kvm_leave_nested() first, switching cleanly back to vmcb01 before anything gets freed. That fixed the control block. It did not refresh the page-table pointer inside the control block being switched back to. That repair was left to the existing conditional rebuild later in kvm_vcpu_reset(), the one gated on the paging bit of a CR0 that, in the nested case, belongs to L2. Run L2 with paging off, and the gate never opens.
The 2022 patch closed the crash it was written for, and left a deeper invariant unenforced: a resumed L1 has to run on a live, current memory map, no matter how it got resumed.
This isn’t even the first follow-on bug the 2022 fix has needed. In May 2025, CVE-2025-37957 (“KVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception”) patched the analogous gap for System Management Mode: the 2022 commit hadn’t handled a vCPU being force-INIT’d after SHUTDOWN interception while in SMM, a case syzkaller at the Linux Verification Center reproduced by entering SMM via the KVM_SMI ioctl and then triple-faulting.
CVE-2026-99312 is the second follow-on, and the more severe one. Terra’s PatchSlop research, published in October 2026, puts a number on exactly this pattern: 3.2% of kernel CVEs were introduced by the fix for another CVE, rising to roughly 10% in busy subsystems like fs/smb and net/sched. Fixes for bugs on CISA’s known-exploited list get reported broken again about four times as often as other fixes. A patch that treats the reported symptom instead of the underlying invariant leaves behind a map of exactly where the next attacker should look.
Disclosure Timeline, Patch, and Affected Kernel Versions
The upstream fix is commit c7c288d178cb (“KVM: x86: Unconditionally reset MMU context when emulating INIT”), written by Sean Christopherson on October 21, 2026, the same day Terra reported the bug, and committed by Paolo Bonzini on November 2 as part of a seven-patch series of KVM fixes that also tightened TLB flushing on emulated RESET.
The fix itself is almost anticlimactic: inside kvm_vcpu_reset(), the call to kvm_mmu_reset_context() moves out of the conditional check on CR0’s paging bit and simply runs every time, while the guest TLB flush request stays conditional for now. The commit message is refreshingly direct about why: the MMU’s page role encodes guest_mode and SMM state as well as paging state, so gating the reset on CR0.PG alone was always too narrow. The only real case where a reset is unnecessary is an INIT arriving in real mode or unpaged protected mode, and since INIT is far from a hot path and KVM already skips most of the reconfiguration when the role hasn’t changed, there was never a performance reason for the shortcut that caused the bug. The commit credits three reporters, Stefan Teodorescu of Google, Oren Yomtov, and Chris Mason, and notes that this bug only affects nested SVM, because INIT is an unconditional intercept on Intel’s VMX; emulating INIT while L2 is active simply can’t happen there.

The disclosure moved fast by kernel standards: reported to KVM maintainers on October 21, merged to mainline on November 2, first tagged in v7.4-rc2 the following week, and released on November 17 in stable 7.3.5 alongside the 6.18.64 and 6.12.118 long-term kernels, a three-tree batch carrying 1,863 fixes in total.
One detail matters for anyone running older long-term kernels: the 2022 commit that introduced this bug was itself widely backported, shipping in stable releases as far back as 5.15.81 and 6.0.11. This isn’t confined to recent kernels. If you maintain another long-term branch, check whether your tree actually carries the new fix rather than assuming its age puts it out of scope.
Who Is Affected and How to Mitigate CVE-2026-99312
The exposure is narrower than the headline suggests, and the narrowing comes down to configuration. Intel hosts aren’t affected, and neither are AMD hosts running KVM without nested virtualization. Terra’s survey of cloud providers found plenty that were out of reach for exactly that reason: they’d never enabled nested virtualization on AMD in the first place.
If you run KVM on AMD with nested virtualization enabled, update to a kernel carrying the fix. If you can’t update right away, set the nested parameter of the kvm_amd module to 0 by reloading it with modprobe kvm_amd nested=0. That turns nested virtualization off and closes this path entirely, the same mitigation that worked for CVE-2022-3344 before it.
Cloud customers can’t mitigate this from inside the guest. The boundary that failed is the one the provider operates, and the only question worth asking a provider is whether nested virtualization is enabled on its AMD fleet.
The Real Lesson for Kernel and Hypervisor Maintainers
KVM isn’t unusually fragile. The lesson is that a reset path in a hypervisor carries an invariant far broader than any single crash report describes. A vCPU reset has to re-establish every piece of context the next VMRUN will trust: the control block, the memory map, the role metadata, the TLB state, all of it. The 2022 fix repaired the one component that had demonstrably crashed, and left the rest to a conditional written for a simpler world. The hardware’s positional trust in nCR3 did the rest. Four years later, a gigabyte of sprayed guest pages and a few hundred microsecond guesses turned that leftover condition into read and write access to the host’s entire physical memory.







