KVM: svm: unconditionally intercept #DB
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Nov 2015 08:14:39 +0000 (09:14 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 27 Nov 2015 12:48:24 +0000 (12:48 +0000)
commitb42506c6c820764f26e3036dfd733e0401525c88
tree36a20fda3710eb94081ab7c969366544ee5e27a1
parent1a513170dd8f7a56dcabc879a2ce235131d99225
KVM: svm: unconditionally intercept #DB

commit cbdb967af3d54993f5814f1cee0ed311a055377d upstream.

This is needed to avoid the possibility that the guest triggers
an infinite stream of #DB exceptions (CVE-2015-8104).

VMX is not affected: because it does not save DR6 in the VMCS,
it already intercepts #DB unconditionally.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[bwh: Backported to 3.2, with thanks to Paolo:
 - update_db_bp_intercept() was called update_db_intercept()
 - The remaining call is in svm_guest_debug() rather than through svm_x86_ops]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/kvm/svm.c