From: Jim Mattson <jmattson@google.com>
To: kvm@vger.kernel.org, pbonzini@redhat.com, seanjc@google.com
Cc: Jim Mattson <jmattson@google.com>
Subject: [PATCH v2 0/2] KVM: nVMX: Add IBPB between L2 and L1 to
Date: Wed, 19 Oct 2022 14:36:18 -0700 [thread overview]
Message-ID: <20221019213620.1953281-1-jmattson@google.com> (raw)
Since L1 and L2 share branch prediction modes (guest {kernel,user}), the
hardware will not protect indirect branches in L1 from steering by a
malicious agent in L2. However, IBRS guarantees this protection. (For
basic IBRS, a value of 1 must be written to IA32_SPEC_CTRL.IBRS after
the transition from L2 to L1.)
Fix the regression introduced in commit 5c911beff20a ("KVM: nVMX: Skip
IBPB when switching between vmcs01 and vmcs02") by issuing an IBPB when
emulating a VM-exit from L2 to L1.
This is CVE-2022-2196.
v2: Reworded some comments [Sean].
Jim Mattson (2):
KVM: VMX: Guest usage of IA32_SPEC_CTRL is likely
KVM: VMX: Execute IBPB on emulated VM-exit when guest has IBRS
arch/x86/kvm/vmx/nested.c | 11 +++++++++++
arch/x86/kvm/vmx/vmx.c | 10 ++++++----
2 files changed, 17 insertions(+), 4 deletions(-)
--
2.38.0.413.g74048e4d9e-goog
next reply other threads:[~2022-10-19 21:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 21:36 Jim Mattson [this message]
2022-10-19 21:36 ` [PATCH v2 1/2] KVM: VMX: Guest usage of IA32_SPEC_CTRL is likely Jim Mattson
2022-11-01 19:23 ` Sean Christopherson
2022-10-19 21:36 ` [PATCH v2 2/2] KVM: VMX: Execute IBPB on emulated VM-exit when guest has IBRS Jim Mattson
2022-11-01 19:23 ` Sean Christopherson
2022-11-01 18:50 ` [PATCH v2 0/2] KVM: nVMX: Add IBPB between L2 and L1 to Jim Mattson
2022-12-02 19:21 ` 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=20221019213620.1953281-1-jmattson@google.com \
--to=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.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;
as well as URLs for NNTP newsgroup(s).