Skip to content

KVM: nVMX: Fix a (benign) overwrite to a userspace buffer

Sean Christopherson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: nVMX: Save shadow VMCS when getting nested state iff L2 is activearch/x86/kvm/vmx/nested.c+1 -10 replies
2/2KVM: selftests: Add regression test for KVM writing but not reporting vmcs12tools/testing/selftests/kvm/lib/x86/processor.c tools/testing/selftests/kvm/x86/state_test.c+19 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: nVMX: Fix a (benign) overwrite to a userspace buffer

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

Signature · 1 line
2.56.0.218.g1ec904b173-goog