Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-18 Thread Hyunwoo Kim
On Thu, Dec 19, 2024 at 01:25:34AM +0100, Michal Luczaj wrote: > On 12/18/24 16:51, Hyunwoo Kim wrote: > > On Wed, Dec 18, 2024 at 04:31:03PM +0100, Stefano Garzarella wrote: > >> On Wed, Dec 18, 2024 at 03:40:40PM +0100, Stefano Garzarella wrote: > >>> On Wed, Dec 18, 2024 at 09:19:08AM -0500, Hyu

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-18 Thread Michal Luczaj
On 12/18/24 16:51, Hyunwoo Kim wrote: > On Wed, Dec 18, 2024 at 04:31:03PM +0100, Stefano Garzarella wrote: >> On Wed, Dec 18, 2024 at 03:40:40PM +0100, Stefano Garzarella wrote: >>> On Wed, Dec 18, 2024 at 09:19:08AM -0500, Hyunwoo Kim wrote: At least for vsock_loopback.c, this change doesn’t

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-18 Thread Hyunwoo Kim
On Wed, Dec 18, 2024 at 04:31:03PM +0100, Stefano Garzarella wrote: > On Wed, Dec 18, 2024 at 03:40:40PM +0100, Stefano Garzarella wrote: > > On Wed, Dec 18, 2024 at 09:19:08AM -0500, Hyunwoo Kim wrote: > > > On Wed, Dec 18, 2024 at 02:40:49PM +0100, Stefano Garzarella wrote: > > > > On Wed, Dec 18

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-18 Thread Stefano Garzarella
On Wed, Dec 18, 2024 at 03:40:40PM +0100, Stefano Garzarella wrote: On Wed, Dec 18, 2024 at 09:19:08AM -0500, Hyunwoo Kim wrote: On Wed, Dec 18, 2024 at 02:40:49PM +0100, Stefano Garzarella wrote: On Wed, Dec 18, 2024 at 07:25:07AM -0500, Hyunwoo Kim wrote: When calling connect to change the C

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-18 Thread Stefano Garzarella
On Wed, Dec 18, 2024 at 09:19:08AM -0500, Hyunwoo Kim wrote: On Wed, Dec 18, 2024 at 02:40:49PM +0100, Stefano Garzarella wrote: On Wed, Dec 18, 2024 at 07:25:07AM -0500, Hyunwoo Kim wrote: > When calling connect to change the CID of a vsock, the loopback > worker for the VIRTIO_VSOCK_OP_RST com

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-18 Thread Hyunwoo Kim
On Wed, Dec 18, 2024 at 02:40:49PM +0100, Stefano Garzarella wrote: > On Wed, Dec 18, 2024 at 07:25:07AM -0500, Hyunwoo Kim wrote: > > When calling connect to change the CID of a vsock, the loopback > > worker for the VIRTIO_VSOCK_OP_RST command is invoked. > > During this process, vsock_stream_has

Re: [PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-18 Thread Stefano Garzarella
On Wed, Dec 18, 2024 at 07:25:07AM -0500, Hyunwoo Kim wrote: When calling connect to change the CID of a vsock, the loopback worker for the VIRTIO_VSOCK_OP_RST command is invoked. During this process, vsock_stream_has_data() calls vsk->transport->stream_has_data(). However, a null-ptr-deref occur

[PATCH] vsock/virtio: Fix null-ptr-deref in vsock_stream_has_data

2024-12-18 Thread Hyunwoo Kim
When calling connect to change the CID of a vsock, the loopback worker for the VIRTIO_VSOCK_OP_RST command is invoked. During this process, vsock_stream_has_data() calls vsk->transport->stream_has_data(). However, a null-ptr-deref occurs because vsk->transport was set to NULL in vsock_deassign_tran