> selftests/bpf: Add test for UDP sock leak on sockmap lookup-bind-release
>
> Setup and join a cgroup, then attach a cgroup/connect4 program that runs
>
> sk = bpf_map_lookup_elem(sockmap, 0)
> bpf_bind(ctx, sa, sizeof(sa))
> bpf_sk_release(sk)
>
> Unpatched kernel leaks the socket.
>
> Signed-off-by: Michal Luczaj <[email protected]>
This test reproduces a UDP socket leak across sockmap lookup-bind-release,
but there is no Fixes: tag.
The sibling fix commit a2510dc351c5 ("bpf, sockmap: Don't leak UDP socks on
lookup-bind-release") carries a Fixes: tag pointing at the commit that lifted
the socket-state restriction allowing unbound UDP sockets into sockmap.
Should this test carry the same tag so it stays backportable alongside the
fix?
Fixes: 0c48eefae712 ("sock_map: Lift socket state restriction for datagram
sockets")
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/28049771327