KernelScan.io

HIGH Introduced in 5.4

kvm NestedStatePages UAF

CVE-2026-98863

CVSS 7.0 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Re-pend GET_NESTED_STATE_PAGES if getting said pages fails Re-pend GET_NESTED_STATE_PAGES before exiting to userspace if getting the nested pages fails in the KVM_RUN path. If userspace re-runs the vCPU, and vmcs02 holds valid PFNs from the *previous* run of L2, then KVM could re-enter L2 with stale, unpinned PFNs mapped into e.g. the vAPIC page. Note, both SVM and VMX (as of commit 11722439fb20 ("KVM: nVMX: Ensure KVM_REQ_GET_NESTED_STATE_PAGES is cleared on VM-Exit") ensure the request is cleared on VM-Exit (including the "forced" case), i.e. there is no risk of double-mapping due to emulated VMLAUNCH/VMRESUME/VMRUN *and* the request trying to map the nested pages.

02

Engine v0.9.0

Risk summary

Local users with access to KVM (e.g., via the `kvm` group) can exploit a use-after-free in nested virtualization page handling to achieve arbitrary kernel memory read/write and privilege escalation. The bug requires a nested guest (L2) configuration and the ability to trigger page-pinning failures, making it primarily a risk in multi-tenant virtualization and container-host deployments where untrusted workloads manage VMs.

Affectedarch/x86/kvm/x86.c (KVM x86 nested virtualization)

Vulnerability analysis

In the KVM x86 nested virtualization code, when the hypervisor fails to acquire and pin the nested guest's state pages (such as the vAPIC page) during a vCPU run, it exits to userspace without re-queuing the request. If userspace subsequently re-runs the vCPU, the previous run's page frame numbers (PFNs) remain valid in the nested VMCS (vmcs02) but are no longer pinned, allowing KVM to re-enter the L2 guest with stale mappings to potentially freed or reused host pages. This creates a use-after-free condition where attacker-controlled memory can be mapped into sensitive structures like the virtual APIC page. The fix ensures the `KVM_REQ_GET_NESTED_STATE_PAGES` request is re-pended before returning to userspace, forcing a fresh page acquisition attempt on the next KVM_RUN invocation. The vulnerability is locally exploitable by any user with access to the `/dev/kvm` interface (typically members of the `kvm` group) who can orchestrate a nested virtualization scenario and induce page-pinning failures, making it relevant in multi-tenant and container-host environments.

03

BranchIntroducedFixed inPatch commit
6.185.46.18.56525694a6021e
7.25.47.2.10942192dbcd3a
mainline5.47.310180a277549

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Affected — no CIP fix yet (latest 6.12.114-cip34)
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)