Re: [PATCH net v2 3/5] vsock/virtio: cancel close work in the destructor

2025-01-10 Thread Hyunwoo Kim
o make > sure we don't leave any pending work. > > Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") > Cc: sta...@vger.kernel.org > Reported-by: Hyunwoo Kim > Closes: > https://lore.kernel.org/netdev/Z37Sh+utS+iV3+eb@v4bel-B760M-AORUS-ELITE-AX/ >

Re: [PATCH net v2 5/5] vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]

2025-01-10 Thread Hyunwoo Kim
16-f6f75fd33...@rbox.co/ > Link: > https://lore.kernel.org/netdev/677f84a8.050a0220.25a300.01b3....@google.com/ > Co-developed-by: Hyunwoo Kim > Signed-off-by: Hyunwoo Kim > Co-developed-by: Wongi Lee > Signed-off-by: Wongi Lee > Signed-off-by: Stefano Garzarella > --- > ne

Re: [PATCH net v2 1/5] vsock/virtio: discard packets if the transport changes

2025-01-10 Thread Hyunwoo Kim
ssible 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:

Re: [PATCH net 2/2] vsock/bpf: return early if transport is not assigned

2025-01-08 Thread Hyunwoo Kim
k) && sk_psock_queue_empty(psock)) { > release_sock(sk); > sk_psock_put(sk, psock); > @@ -108,6 +116,7 @@ static int vsock_bpf_recvmsg(struct sock *sk, struct > msghdr *msg, > copied = sk_msg_recvmsg(sk, psock, msg, len, flags); > } > > +out: > release_sock(sk); > sk_psock_put(sk, psock); > > -- > 2.47.1 > Looks good to me. Reviewed-by: Hyunwoo Kim Regards, Hyunwoo Kim

Re: [PATCH net 1/2] vsock/virtio: discard packets if the transport changes

2025-01-08 Thread Hyunwoo Kim
ssible 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-tr

Re: [PATCH net 1/2] vsock/virtio: discard packets if the transport changes

2025-01-09 Thread Hyunwoo Kim
On Thu, Jan 09, 2025 at 10:01:31AM +0100, Stefano Garzarella wrote: > On Wed, Jan 08, 2025 at 02:31:19PM -0500, Hyunwoo Kim wrote: > > On Wed, Jan 08, 2025 at 07:06:16PM +0100, Stefano Garzarella wrote: > > > If the socket has been de-assigned or assigned to another transp

Re: [PATCH net 1/2] vsock/virtio: discard packets if the transport changes

2025-01-09 Thread Hyunwoo Kim
On Thu, Jan 09, 2025 at 11:59:21AM +0100, Stefano Garzarella wrote: > On Thu, Jan 09, 2025 at 04:13:44AM -0500, Hyunwoo Kim wrote: > > On Thu, Jan 09, 2025 at 10:01:31AM +0100, Stefano Garzarella wrote: > > > On Wed, Jan 08, 2025 at 02:31:19PM -0500, Hyunwoo Kim wrote: > >