]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
KVM: x86: Protect MSR-based index computations from Spectre-v1/L1TF attacks in x86.c
authorMarios Pomonis <pomonis@google.com>
Wed, 11 Dec 2019 20:47:49 +0000 (12:47 -0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 04:31:00 +0000 (00:31 -0400)
commitb4d7ebd2a3b6dc7e302617deb9464170bf258d79
tree9cbc11496fec02625952456fe0c32025ab17f73a
parent815be7401d230c45a62a1bd8cd4b9097db481751
KVM: x86: Protect MSR-based index computations from Spectre-v1/L1TF attacks in x86.c

BugLink: https://bugs.launchpad.net/bugs/1866678
commit 6ec4c5eee1750d5d17951c4e1960d953376a0dda upstream.

This fixes a Spectre-v1/L1TF vulnerability in set_msr_mce() and
get_msr_mce().
Both functions contain index computations based on the
(attacker-controlled) MSR number.

Fixes: 890ca9aefa78 ("KVM: Add MCE support")
Signed-off-by: Nick Finco <nifi@google.com>
Signed-off-by: Marios Pomonis <pomonis@google.com>
Reviewed-by: Andrew Honig <ahonig@google.com>
Cc: stable@vger.kernel.org
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/kvm/x86.c