]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: ioapic: fix assignment of ioapic->rtc_status.pending_eoi (CVE-2014-0155)
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 Mar 2014 19:41:50 +0000 (20:41 +0100)
committerJiri Slaby <jslaby@suse.cz>
Mon, 5 May 2014 11:39:31 +0000 (13:39 +0200)
commit95846d96fc3739c515e6c20b0fcea97ab290f09c
tree5ebf7728bf576c64cfdbd61824cc4ef016010e11
parent10083c00587485c79d86b5c425464418cfc3c586
KVM: ioapic: fix assignment of ioapic->rtc_status.pending_eoi (CVE-2014-0155)

commit 5678de3f15010b9022ee45673f33bcfc71d47b60 upstream.

QE reported that they got the BUG_ON in ioapic_service to trigger.
I cannot reproduce it, but there are two reasons why this could happen.

The less likely but also easiest one, is when kvm_irq_delivery_to_apic
does not deliver to any APIC and returns -1.

Because irqe.shorthand == 0, the kvm_for_each_vcpu loop in that
function is never reached.  However, you can target the similar loop in
kvm_irq_delivery_to_apic_fast; just program a zero logical destination
address into the IOAPIC, or an out-of-range physical destination address.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
virt/kvm/ioapic.c