From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Josef Bacik <josef@toxicpanda.com>,
Chris Mason <mason@kernel.org>
Subject: [PATCH 0/2] KVM: nVMX: Fix a (benign) overwrite to a userspace buffer
Date: Wed, 21 Oct 2026 19:18:18 -0700 [thread overview]
Message-ID: <20261022021820.298886-1-seanjc@google.com> (raw)
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
next reply other threads:[~2026-10-22 2:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 2:18 Sean Christopherson [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261022021820.298886-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=josef@toxicpanda.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mason@kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®