]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
KVM: x86: Refactor prefix decoding to prevent Spectre-v1/L1TF attacks
authorMarios Pomonis <pomonis@google.com>
Wed, 11 Dec 2019 20:47:50 +0000 (12:47 -0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 17 Feb 2020 10:10:46 +0000 (11:10 +0100)
commit2f7663f69a44063179513ee5f13512ecccd21c5e
tree19f509fde4d672ac5c1ba1cb981f8aa668b3986e
parentd063c4b382f8f926ef9d1c6c36a35c27b7e69212
KVM: x86: Refactor prefix decoding to prevent Spectre-v1/L1TF attacks

BugLink: https://bugs.launchpad.net/bugs/1863588
commit 125ffc5e0a56a3eded608dc51e09d5ebf72cf652 upstream.

This fixes Spectre-v1/L1TF vulnerabilities in
vmx_read_guest_seg_selector(), vmx_read_guest_seg_base(),
vmx_read_guest_seg_limit() and vmx_read_guest_seg_ar().  When
invoked from emulation, these functions contain index computations
based on the (attacker-influenced) segment value.  Using constants
prevents the attack.

Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/x86/kvm/emulate.c