]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
authorJan H. Schönherr <jschoenh@amazon.de>
Thu, 7 Sep 2017 18:02:30 +0000 (19:02 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 Sep 2017 14:56:43 +0000 (16:56 +0200)
commited17bb81b81d7061add48dfe958d465a4617ea15
tree9b852407d70fb9b566c6cc1e99f2f635633c0321
parent941c357fba7cb80da0a10420cd103f2b6e6d710c
KVM: VMX: Do not BUG() on out-of-bounds guest IRQ

The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)

Instead, print a message only once if we find that we don't have a
route for a certain IRQ (which can be out-of-bounds or within the
array).

This fixes CVE-2017-1000252.

Fixes: a00b87278169d05 ("KVM: x86: Update IRTE for posted-interrupts")
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c