summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-03-23 18:24:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-22 07:15:03 +0200
commit07882feab469f30e8e67b6aa02e2913004dac1da (patch)
tree25380e6592f705f6b1268c8d0be8268d714692be /security
parentc6216a0f1e3da39f37aba3d43257c8cda172b414 (diff)
KVM: kvm_io_bus_unregister_dev() should never fail
commit 90db10434b163e46da413d34db8d0e77404cc645 upstream. No caller currently checks the return value of kvm_io_bus_unregister_dev(). This is evil, as all callers silently go on freeing their device. A stale reference will remain in the io_bus, getting at least used again, when the iobus gets teared down on kvm_destroy_vm() - leading to use after free errors. There is nothing the callers could do, except retrying over and over again. So let's simply remove the bus altogether, print an error and make sure no one can access this broken bus again (returning -ENOMEM on any attempt to access it). Fixes: e93f8a0f821e ("KVM: convert io_bus to SRCU") Reported-by: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions