]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: Fix fs/gs reload oops with invalid ldt
authorAvi Kivity <avi@redhat.com>
Thu, 31 Mar 2011 18:58:55 +0000 (11:58 -0700)
committerAK <andi@firstfloor.org>
Thu, 31 Mar 2011 18:58:55 +0000 (11:58 -0700)
commitb59a19a633904c9b1bb7fbbdb33023b1eb7ce641
tree9af6c0956a3c673a7fc840cbba0882a2774006fb
parentae364158077225260dced4bf5f39db8c8c1289db
KVM: Fix fs/gs reload oops with invalid ldt

commit 9581d442b9058d3699b4be568b6e5eae38a41493 upstream.

kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.

Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.

This is CVE-2010-3698.

KVM-Stable-Tag.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c