• Avi Kivity's avatar
    KVM: Fix buffer overflow in kvm_set_irq() · f2ebd422
    Avi Kivity authored
    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: default avatarAvi Kivity <avi@redhat.com>
    f2ebd422
irq_comm.c 12.4 KB