diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-06-12 07:56:42 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-07-08 10:50:37 -0700 |
| commit | 3e6dd2b9b7b2884743ed7a0873b8743cc0df6d40 (patch) | |
| tree | 5c21eecb2e5ad822581236a24cee33e4ce1f14bd /drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git | |
| parent | ebdac7554abb347ca4197be241116842161acd9b (diff) | |
KVM: nVMX: Don't use vmcs01.GUEST_CR3 to snapshot L1's CR3 when EPT is disabled
Add a dedicated field in "struct nested_vmx" to track L1's pre-VM-Enter CR3
instead of using vmcs01.GUEST_CR3, which isn't anywhere near as safe as the
comment purports it to be. E.g. in addition to the warn_on_missed_cc bug
(that was fixed by relocating the consistency check), if getting vmcs12
pages (during actual nested VM-Entry) fails and EPT is disabled (in KVM),
KVM will return control to userspace with vmcs01.GUEST_CR3 holding a guest-
controlled value.
Alternatively, KVM could force a reload of vmcs01.GUEST_CR3 by resetting
the MMU context in the error path, but as above, the safety of the vmcs01
approach is extremely questionable, e.g. it took all of ~4 months for the
code to break.
Fixes: 671ddc700fd0 ("KVM: nVMX: Don't leak L1 MMIO regions to L2")
Cc: stable@vger.kernel.org
Cc: Jim Mattson <jmattson@google.com>
Link: https://patch.msgid.link/20260612145642.452392-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
