]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: Fix buffer overflow in kvm_set_irq()
authorAvi Kivity <avi@redhat.com>
Sun, 22 Apr 2012 14:02:11 +0000 (17:02 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 25 Jul 2012 03:11:05 +0000 (04:11 +0100)
commit0f3cbc35d2097d2c655789dd4996e7b87bdb5d34
treea23a76570892f46f568f5d74e11629bcc0e36797
parent1be535a022a9c0b9a55cab2993ee29e05c4ead0b
KVM: Fix buffer overflow in kvm_set_irq()

commit f2ebd422f71cda9c791f76f85d2ca102ae34a1ed upstream.

kvm_set_irq() has an internal buffer of three irq routing entries, allowing
connecting a GSI to three IRQ chips or on MSI.  However setup_routing_entry()
does not properly enforce this, allowing three irqchip routes followed by
an MSI route to overflow the buffer.

Fix by ensuring that an MSI entry is added to an empty list.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
virt/kvm/irq_comm.c