]> git.baikalelectronics.ru Git - kernel.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)
committerAvi Kivity <avi@redhat.com>
Tue, 5 Jun 2012 13:39:58 +0000 (16:39 +0300)
commitbc28fd314c8f532d1017703cddf3dfc71fd9c602
tree79944d1c2e3a879b320c0ac2ead230eb655573ca
parentf5115900445a63ff073f1be797d533122d611ed6
KVM: Fix buffer overflow in kvm_set_irq()

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>
virt/kvm/irq_comm.c