linux-stable/virt/kvm
Paolo Bonzini 1cd0c7d732 KVM: irqfd: fix race between EPOLLHUP and irq_bypass_register_consumer
commit 9432a31757 upstream.

A comment warning against this bug is there, but the code is not doing what
the comment says.  Therefore it is possible that an EPOLLHUP races against
irq_bypass_register_consumer.  The EPOLLHUP handler schedules irqfd_shutdown,
and if that runs soon enough, you get a use-after-free.

Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-24 13:12:41 +02:00
..
arm KVM: arm/arm64: Drop resource size check for GICV window 2018-08-24 13:12:30 +02:00
async_pf.c KVM: async_pf: avoid recursive flushing of work items 2016-11-19 19:04:17 +01:00
async_pf.h KVM: fix checkpatch.pl errors in kvm/async_pf.h 2015-06-19 17:16:25 +02:00
coalesced_mmio.c KVM: move iodev.h from virt/kvm/ to include/kvm 2015-03-26 21:43:12 +00:00
coalesced_mmio.h KVM: make the declaration of functions within 80 characters 2015-09-14 18:43:19 +02:00
eventfd.c KVM: irqfd: fix race between EPOLLHUP and irq_bypass_register_consumer 2018-08-24 13:12:41 +02:00
irqchip.c KVM/ARM Changes for v4.8 - Take 2 2016-08-04 13:59:56 +02:00
Kconfig KVM: remove kvm_vcpu_compatible 2016-06-16 00:05:00 +02:00
kvm_main.c kvm: Map PFN-type memory regions as writable (if possible) 2018-05-30 07:50:22 +02:00
vfio.c vfio: New external user group/file match 2017-07-27 15:08:03 -07:00
vfio.h kvm: vfio: fix unregister kvm_device_ops of vfio 2014-10-24 13:30:47 +02:00