[PATCH net v2 0/2] tcp: Fix the SO_REUSEPORT bind cache admitting a conflicting socket

From: Juan Agustin Niccolini

Date: Wed Nov 11 2026 - 12:51:19 EST


The SO_REUSEPORT bind cache (tb->fast_*) can let a socket skip a bind
conflict check that it would fail, so an unprivileged user can bind and
listen on a port that another user is listening on.

Patch 1 fixes it. Patch 2 adds the reproducer as a selftest.

v2:
- Shorten the changelog (Eric Dumazet)
- Add reproducer as selftest (Eric Dumazet)
v1: https://lore.kernel.org/all/20261110080008.26112-1-juanagusnicco@xxxxxxxxx/

Juan Agustin Niccolini (2):
tcp: Fix the SO_REUSEPORT bind cache admitting a conflicting socket
selftests: net: Add SO_REUSEPORT bind cache test to bind_wildcard.c

include/net/inet_hashtables.h | 2 +
net/ipv4/inet_connection_sock.c | 15 ++++--
tools/testing/selftests/net/bind_wildcard.c | 54 +++++++++++++++++++++
3 files changed, 68 insertions(+), 3 deletions(-)


base-commit: 19a227903e65c7a9c179156485660a4e017575fe
--
2.43.0