From: Norbert Slusarek <redacted>
Date: Fri, 5 Feb 2021 13:12:06 +0100
Subject: [PATCH] net/vmw_vsock: fix NULL pointer dereference
In vsock_stream_connect(), a thread will enter schedule_timeout().
While being scheduled out, another thread can enter vsock_stream_connect()
as well and set vsk->transport to NULL. In case a signal was sent, the
first thread can leave schedule_timeout() and vsock_transport_cancel_pkt()
will be called right after. Inside vsock_transport_cancel_pkt(), a null
dereference will happen on transport->cancel_pkt.
Fixes: c0cfa2d8a788 ("vsock: add multi-transports support")
Reported-by: Norbert Slusarek <redacted>
Signed-off-by: Norbert Slusarek <redacted>
---
net/vmw_vsock/af_vsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On Fri, Feb 05, 2021 at 03:25:17PM +0100, Norbert Slusarek wrote:
quoted hunk
From: Norbert Slusarek <redacted>
Date: Fri, 5 Feb 2021 13:12:06 +0100
Subject: [PATCH] net/vmw_vsock: fix NULL pointer dereference
In vsock_stream_connect(), a thread will enter schedule_timeout().
While being scheduled out, another thread can enter vsock_stream_connect()
as well and set vsk->transport to NULL. In case a signal was sent, the
first thread can leave schedule_timeout() and vsock_transport_cancel_pkt()
will be called right after. Inside vsock_transport_cancel_pkt(), a null
dereference will happen on transport->cancel_pkt.
Fixes: c0cfa2d8a788 ("vsock: add multi-transports support")
Reported-by: Norbert Slusarek <redacted>
Signed-off-by: Norbert Slusarek <redacted>
---
net/vmw_vsock/af_vsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
I can't see this patch on https://patchwork.kernel.org/project/netdevbpf/list/
Maybe because you forgot to CC the netdev maintainers.
Please next time use scripts/get_maintainer.pl
Anyway the patch LGTM, so
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-02-07 00:58:40
On Fri, 5 Feb 2021 18:13:35 +0100 Stefano Garzarella wrote:
On Fri, Feb 05, 2021 at 03:25:17PM +0100, Norbert Slusarek wrote:
quoted
From: Norbert Slusarek <redacted>
Date: Fri, 5 Feb 2021 13:12:06 +0100
Subject: [PATCH] net/vmw_vsock: fix NULL pointer dereference
In vsock_stream_connect(), a thread will enter schedule_timeout().
While being scheduled out, another thread can enter vsock_stream_connect()
as well and set vsk->transport to NULL. In case a signal was sent, the
first thread can leave schedule_timeout() and vsock_transport_cancel_pkt()
will be called right after. Inside vsock_transport_cancel_pkt(), a null
dereference will happen on transport->cancel_pkt.
Fixes: c0cfa2d8a788 ("vsock: add multi-transports support")
Reported-by: Norbert Slusarek <redacted>
Signed-off-by: Norbert Slusarek <redacted>
---
net/vmw_vsock/af_vsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
I can't see this patch on https://patchwork.kernel.org/project/netdevbpf/list/
Maybe because you forgot to CC the netdev maintainers.
Please next time use scripts/get_maintainer.pl
Anyway the patch LGTM, so
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>