summaryrefslogtreecommitdiff
path: root/net/vmw_vsock/vsock_bpf.c
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2025-01-10 09:35:07 +0100
committerPaolo Abeni <pabeni@redhat.com>2025-01-14 12:29:36 +0100
commit2cb7c756f605ec02ffe562fb26828e4bcc5fdfc1 (patch)
tree2ee942e2efe5b84037b4add96d34d8239a2c98c0 /net/vmw_vsock/vsock_bpf.c
parent0865b9fdb27219db79f3687bc50a0b534b437ee7 (diff)
vsock/virtio: discard packets if the transport changes
If the socket has been de-assigned or assigned to another transport, we must discard any packets received because they are not expected and would cause issues when we access vsk->transport. A possible scenario is described by Hyunwoo Kim in the attached link, where after a first connect() interrupted by a signal, and a second connect() failed, we can find `vsk->transport` at NULL, leading to a NULL pointer dereference. Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") Cc: stable@vger.kernel.org Reported-by: Hyunwoo Kim <v4bel@theori.io> Reported-by: Wongi Lee <qwerty@theori.io> Closes: https://lore.kernel.org/netdev/Z2LvdTTQR7dBmPb5@v4bel-B760M-AORUS-ELITE-AX/ Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Hyunwoo Kim <v4bel@theori.io> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/vmw_vsock/vsock_bpf.c')
0 files changed, 0 insertions, 0 deletions