KVM: nVMX: Put vmcs12 pages if nested VM-Enter fails due to invalid guest state
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 96c66e87deeeb3cc78a3b82a1de8e365eec206c1 · < 2f2312c422fd2695da772cecb30c69994b795964| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: nVMX: Put vmcs12 pages if nested VM-Enter fails due to invalid guest state
Put all vmcs12 pages if KVM synthesizes a nested VM-Exit due to invalid guest while emulating VMLAUNCH or VMRESUME. The invalid guest state path doesn't use nested_vmx_vmexit() as that API is intended to be used if and only if L2 is active, and the open coded equivalent neglects to put the vmcs12 pages. Failure to put the vmcs12 pages leaks any pinned pages (and/or mappings) if L1 retries VMLAUNCH/VMRESUME.
Note, the !from_vmenter scenario doesn't suffer the same problem, as vmx_get_nested_state_pages() only gets/pins/maps the vmcs12 pages if L2 is active, i.e. if a "full" VM-Exit is guaranteed before KVM will retry getting vmcs12 pages.
From the CVE record · Linux
KVM nVMX can fail to release vmcs12 pages when nested VM-Enter fails because of invalid guest state. If an L1 guest retries VMLAUNCH or VMRESUME, pinned pages or mappings can leak. The input does not specify authentication requirements or user interaction.
Engineers running Linux kernels with KVM nested VMX should check their versions against the vendor advisory; affected versions are not specified.