linux-stable/drivers/misc/vmw_vmci
Jorgen Hansen 894e62f5e5 VMCI: Resource wildcard match fixed
[ Upstream commit 11924ba5e6 ]

When adding a VMCI resource, the check for an existing entry
would ignore that the new entry could be a wildcard. This could
result in multiple resource entries that would match a given
handle. One disastrous outcome of this is that the
refcounting used to ensure that delayed callbacks for VMCI
datagrams have run before the datagram is destroyed can be
wrong, since the refcount could be increased on the duplicate
entry. This in turn leads to a use after free bug. This issue
was discovered by Hangbin Liu using KASAN and syzkaller.

Fixes: bc63dedb7d ("VMCI: resource object implementation")
Reported-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Adit Ranadive <aditr@vmware.com>
Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-13 11:08:34 -08:00
..
Kconfig Hoist memcpy_fromiovec/memcpy_toiovec into lib/ 2013-05-20 10:24:22 +09:30
Makefile VMCI: Some header and config files. 2013-01-08 16:15:57 -08:00
vmci_context.c sched/headers: Prepare to remove <linux/cred.h> inclusion from <linux/sched.h> 2017-03-02 08:42:31 +01:00
vmci_context.h
vmci_datagram.c misc/vmw_vmci: use kmemdup rather than duplicating its implementation 2015-09-20 19:27:58 -07:00
vmci_datagram.h
vmci_doorbell.c VMCI: Doorbell create and destroy fixes 2016-10-28 08:26:21 -04:00
vmci_doorbell.h VMCI: doorbell implementation. 2013-01-08 16:15:55 -08:00
vmci_driver.c VMCI: Resource wildcard match fixed 2018-11-13 11:08:34 -08:00
vmci_driver.h VMCI: Add support for virtual IOMMU 2013-08-27 21:42:12 -07:00
vmci_event.c sched/headers: Prepare to use <linux/rcuupdate.h> instead of <linux/rculist.h> in <linux/sched.h> 2017-03-02 08:42:38 +01:00
vmci_event.h VMCI: event handling implementation. 2013-01-08 16:15:55 -08:00
vmci_guest.c vmw_vmci: handle the return value from pci_alloc_irq_vectors correctly 2017-03-16 17:32:21 +09:00
vmci_handle_array.c VMCI: handle array implementation. 2013-01-08 16:15:55 -08:00
vmci_handle_array.h VMCI: handle array implementation. 2013-01-08 16:15:55 -08:00
vmci_host.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
vmci_queue_pair.c vmci: type promotion bug in qp_host_get_user_memory() 2018-07-07 17:32:40 +02:00
vmci_queue_pair.h VMCI: Remove non-blocking/pinned queuepair support 2013-08-27 21:42:12 -07:00
vmci_resource.c VMCI: Resource wildcard match fixed 2018-11-13 11:08:34 -08:00
vmci_resource.h VMCI: resource object implementation. 2013-01-08 16:15:56 -08:00
vmci_route.c VMCI: routing implementation. 2013-01-08 16:15:56 -08:00
vmci_route.h VMCI: routing implementation. 2013-01-08 16:15:56 -08:00