mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: nVMX: Fix a (benign) overwrite to a userspace buffer
@ 2026-10-22  2:18 Sean Christopherson
  2026-10-22  2:18 ` [PATCH 1/2] KVM: nVMX: Save shadow VMCS when getting nested state iff L2 is active Sean Christopherson
  2026-10-22  2:18 ` [PATCH 2/2] KVM: selftests: Add regression test for KVM writing but not reporting vmcs12 Sean Christopherson
  0 siblings, 2 replies; 3+ messages in thread
From: Sean Christopherson @ 2026-10-22  2:18 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Josef Bacik, Chris Mason

Fix a bug where KVM writes more bytes for KVM_GET_NESTED_STATE than it reports
in the output size if L1 is active and has a valid shadow VMCS pointer.  The
bug is all but guaranteed to be benign in practice, as all VMMs I could find
that support nested virtualization just preallocate the max buffer size.

Sean Christopherson (2):
  KVM: nVMX: Save shadow VMCS when getting nested state iff L2 is active
  KVM: selftests: Add regression test for KVM writing but not reporting
    vmcs12

 arch/x86/kvm/vmx/nested.c                     |  2 +-
 .../testing/selftests/kvm/lib/x86/processor.c |  6 +++++
 tools/testing/selftests/kvm/x86/state_test.c  | 24 ++++++++++---------
 3 files changed, 20 insertions(+), 12 deletions(-)


base-commit: 164405e8e9a0378c7e1aff2254625a6553a291f1
-- 
2.56.0.218.g1ec904b173-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-22  2:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-22  2:18 [PATCH 0/2] KVM: nVMX: Fix a (benign) overwrite to a userspace buffer Sean Christopherson
2026-10-22  2:18 ` [PATCH 1/2] KVM: nVMX: Save shadow VMCS when getting nested state iff L2 is active Sean Christopherson
2026-10-22  2:18 ` [PATCH 2/2] KVM: selftests: Add regression test for KVM writing but not reporting vmcs12 Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®