Re: [PATCH bpf-next v6] bpf, sockmap: avoid using sk_socket after free when sending

From: John Fastabend
Date: Mon May 19 2025 - 15:54:04 EST


On 2025-05-16 22:17:12, Jiayuan Chen wrote:
> The sk->sk_socket is not locked or referenced in backlog thread, and
> during the call to skb_send_sock(), there is a race condition with
> the release of sk_socket. All types of sockets(tcp/udp/unix/vsock)
> will be affected.

[...]

>
> Reported-by: Michal Luczaj <mhal@xxxxxxx>
> Fixes: 4b4647add7d3 ("sock_map: avoid race between sock_map_close and sk_psock_put")
> Signed-off-by: Jiayuan Chen <jiayuan.chen@xxxxxxxxx>

LGTM thanks for fixing the tag.

Reviewed-by: John Fastabend <john.fastabend@xxxxxxxxx>