KVM: nVMX: Always flush vpid02 on first use
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5c614b3583e7b6dab0c86356fa36c2bcbb8322a0 · < 121991d150735f3c0f7401678ce4d35c5b4ac898| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: nVMX: Always flush vpid02 on first use
Make sure vpid02 is always flushed on first use by setting last_vpid=0 when allocating vpid02. nested_vmx_transition_tlb_flush() will always detect a VPID change on first VM-Enter after VMXON, because VPID=0 in vmcs12 is not allowed if L1 enables VPID.
This avoids using stale TLB entries from a previous lifetime of the VPID, that might have been associated with a different vCPU (or a completely different VM).
Note that last_vpid is already being initialized as 0 when the vCPU is created, but it is not reset when vpid02 is freed on VMXOFF. Hence, the problem can only occur if L1 does VMXOFF -> VMXON, runs an L2, and KVM happens to reuse a VPID that has TLB entries on the physical CPU.
From the CVE record · Linux
KVM nVMX may use stale TLB entries from a previous VPID lifetime, potentially associated with a different vCPU or VM. This can occur if L1 performs VMXOFF followed by VMXON, runs an L2, and KVM reuses a VPID with TLB entries on the physical CPU. The input does not specify an attacker path, authentication requirement, or user interaction.
Engineers running the Linux kernel with KVM nVMX should check their systems; affected versions are not specified.