]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/kvm: Be careful not to clear KVM_VCPU_FLUSH_TLB bit
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 30 Oct 2019 19:01:31 +0000 (19:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:35:40 +0000 (04:35 -0800)
commit68460ceba319a46ea14b36129bfd0a152e0f00c3
treea39d524bd1e820bc62466743767e6dcc4d78ece4
parentd0671151c2b9b3a3c233f186e3986716bb890a85
x86/kvm: Be careful not to clear KVM_VCPU_FLUSH_TLB bit

commit 8c6de56a42e0c657955e12b882a81ef07d1d073e upstream.

kvm_steal_time_set_preempted() may accidentally clear KVM_VCPU_FLUSH_TLB
bit if it is called more than once while VCPU is preempted.

This is part of CVE-2019-3016.

(This bug was also independently discovered by Jim Mattson
<jmattson@google.com>)

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c