Skip to content

Commit 8d5ed79

Browse files
Jorgen Hansengregkh
authored andcommitted
VSOCK: Detach QP check should filter out non matching QPs.
commit 8ab18d71de8b07d2c4d6f984b718418c09ea45c5 upstream. The check in vmci_transport_peer_detach_cb should only allow a detach when the qp handle of the transport matches the one in the detach message. Testing: Before this change, a detach from a peer on a different socket would cause an active stream socket to register a detach. Reviewed-by: George Zhang <georgezhang@vmware.com> Signed-off-by: Jorgen Hansen <jhansen@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f803416 commit 8d5ed79

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

net/vmw_vsock/vmci_transport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ static void vmci_transport_peer_detach_cb(u32 sub_id,
842842
* qp_handle.
843843
*/
844844
if (vmci_handle_is_invalid(e_payload->handle) ||
845-
vmci_handle_is_equal(trans->qp_handle, e_payload->handle))
845+
!vmci_handle_is_equal(trans->qp_handle, e_payload->handle))
846846
return;
847847

848848
/* We don't ask for delayed CBs when we subscribe to this event (we
@@ -2154,7 +2154,7 @@ module_exit(vmci_transport_exit);
21542154

21552155
MODULE_AUTHOR("VMware, Inc.");
21562156
MODULE_DESCRIPTION("VMCI transport for Virtual Sockets");
2157-
MODULE_VERSION("1.0.2.0-k");
2157+
MODULE_VERSION("1.0.3.0-k");
21582158
MODULE_LICENSE("GPL v2");
21592159
MODULE_ALIAS("vmware_vsock");
21602160
MODULE_ALIAS_NETPROTO(PF_VSOCK);

0 commit comments

Comments
 (0)