HIGH Introduced in 4.4
kvm NestedVpid Race
CVE-2026-89929
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: KVM: nVM: Ensure INVVPID is emulated on the correct physical CPU When emulating INVVPID, KVM executes INVVPID on the physical CPU using vpid02 (instead of the L1 assigned VPID), after doing some validations on the operands. However, it is possible that the physical CPU KVM executes INVVPID on is different from the CPU L2 is running on. For example, in the following scenario: - L2 runs on CPU #1 and exits to L1 (vmx->nested.vmcs02.cpu=1) - L1 migrates to CPU #2 and executes INVVPID - KVM executes INVVPID on CPU #2 - L1 migrates back to CPU #1 and runs L2 (vmx->nested.vmcs02.cpu=1) The TLB entries on CPU #1 are never invalidated, because INVVPID was executed on CPU #2, and vmcs02 never ran on a different pCPU (i.e. vmx_vcpu_load_vmcs() will *not* request KVM_REQ_TLB_FLUSH). Ensure that INVVPID is being executed on the same pCPU that L2 last ran on, and if not, fallback to clearing last_vpid=0 to trigger a full VPID flush on the next nested VM-Enter (as KVM will detect L1 using a different VPID for L2). If L2 ends up running on a different pCPU, KVM will flush the TLB anyway through vmx_vcpu_load_vmcs().
02KernelScan AI Analysis
Risk summary
A nested virtualization guest can exploit stale TLB entries left by incorrect INVVPID emulation when the vCPU migrates between physical CPUs between guest execution and TLB flush. This breaks guest-to-host isolation, potentially allowing a malicious nested guest to read or write host or other guest memory. The vulnerability requires nested virtualization to be enabled and is triggered locally by a VM guest.
Vulnerability analysis
When a nested hypervisor (L1) issues an INVVPID instruction to flush TLB entries for its guest (L2), KVM emulates the instruction by executing INVVPID on the current physical CPU. However, if the vCPU has migrated to a different physical CPU since L2 last ran, the TLB invalidation occurs on the wrong CPU, leaving stale TLB entries on the original CPU that L1 intended to flush. A malicious nested guest could exploit these stale entries to access memory that the L1 hypervisor believed was no longer mapped. The fix checks whether the current CPU matches the CPU where L2 last ran; if not, it defers the flush by resetting nested VPID tracking so that a full VPID flush is performed on the next nested VM entry, ensuring invalidation happens on the correct CPU. This vulnerability is reachable by any local VM guest on a host with KVM nested virtualization enabled, requiring no special privileges beyond being a running guest.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 4.4 | 6.12.110 | d03e721801ac |
| 6.18 | 4.4 | 6.18.51 | 27bdeb5fd190 |
| 6.6 | 4.4 | 6.6.160 | 1759a565a25c |
| 7.2 | 4.4 | 7.2.5 | 9941850e8adf |
| mainline | 4.4 | 7.3 | 6d00e67326d8 |
| cip/6.12 | 4.4 | 6.12.111-cip32 | d03e721801ac |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |