]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: nVMX: Truncate base/index GPR value on address calc in !64-bit
authorSean Christopherson <seanjc@google.com>
Thu, 22 Apr 2021 02:21:25 +0000 (19:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:31 +0000 (10:49 +0200)
commitb42b420ff4db2080fbd10b582ede763b4cc881cb
tree4bf934856da2bec97806c760102b7f37feb4b0af
parentb6a2b170357f7b370691fc08875441a41b8f071e
KVM: nVMX: Truncate base/index GPR value on address calc in !64-bit

commit 82277eeed65eed6c6ee5b8f97bd978763eab148f upstream.

Drop bits 63:32 of the base and/or index GPRs when calculating the
effective address of a VMX instruction memory operand.  Outside of 64-bit
mode, memory encodings are strictly limited to E*X and below.

Fixes: 064aea774768 ("KVM: nVMX: Decoding memory operands of VMX instructions")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210422022128.3464144-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx/nested.c