CVE-2026-98717: KVM: x86/mmu: Bail from shadow walks if the root is invalid or a dummy
In the Linux kernel, the following vulnerability has been resolved:
KVM: x86/mmu: Bail from shadow walks if the root is invalid or a dummy
When walking shadow page tables, immediately terminate the walk if the root is a "dummy" root, i.e. a root whose top-level page table is backed by the zero page, but otherwise doesn't exist. If memslot creation races with a stage-2 page fault (EPT violation or #NPF) from L2, then if the stars align, KVM will attempt to walk shadow page tables using the zero page and hit a NULL pointer deref.
BUG: kernel NULL pointer dereference, address: 0000000000000021 #PF: supervisor read access in kernel mode #PF: errorcode(0x0000) - not-present page PGD 0 P4D 0 Oops: Oops: 0000 [#1] SMP CPU: 30 UID: 1000 PID: 941 Comm: qemu Not tainted 7.2.0-rc2-1b731e5ded48-next-vm #1741 PREEMPTLAZY Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:kvmmmuinvalidateaddr+0xea/0x210 [kvm] Call Trace: <TASK> kvmmmuinvalidateaddr+0x92/0xe0 [kvm] kvminjectemulatedpagefault+0x67/0x80 [kvm] eptpagefault+0x160/0x850 [kvm] kvmmmudopagefault+0x102/0x1f0 [kvm] kvmmmupagefault+0x8e/0x6b0 [kvm] vmxhandleexit+0x163/0x640 [kvmintel] kvmarchvcpuioctlrun+0x960/0x2120 [kvm] kvmvcpuioctl+0x2c7/0x970 [kvm] x64sysioctl+0x90/0xd0 dosyscall64+0x67/0x5f0 entrySYSCALL64afterhwframe+0x4b/0x53 RIP: 0033:0x7f606d0b53bb
Opportunistically harden the shadow walks against fully invalid roots, but WARN, as all callers are expected/required to pre-check for a valid root. Don't WARN in the dummy root case as the whole point of using a dummy root is to provide a root that's valid enough to enter the guest, i.e. it should Just Work for all flows except those that need to know about dummy roots.
Alternatively, KVM could allocate a dedicated page and associated shadow page structure for the dummy root, which is very tempting as it such an approach should be more resilient against unexpected behavior. But that would be a much larger and thus riskier change than simply terminating walks of dummy roots.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.160 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.113 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.56 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.10 - Upgrade
Upgrade
azurelinux/kernelto a version that resolves this vulnerability.Fixed in 6.6.161.1-1
Event History
Frequently Asked Questions
What conditions are required to trigger the failure?
The issue requires a race between memslot creation and a stage-2 page fault from an L2 guest, such as an EPT violation or #NPF. Under the described timing conditions, KVM can walk shadow page tables using the zero page and dereference a NULL pointer.
What is the likely impact on an affected host?
The reported outcome is a kernel NULL pointer dereference in the KVM module while handling a page fault. This can cause a kernel oops and disrupt the affected virtualization workload or host.
Which virtualization setups are implicated by the report?
The vulnerable path involves KVM x86 shadow page-table walks and a stage-2 fault originating from an L2 guest. This indicates nested virtualization scenarios are relevant to triage.
What change addresses the issue?
The fix terminates shadow page-table walks immediately when the root is invalid or a dummy root backed by the zero page. Apply a Linux kernel update containing one of the referenced stable fixes.