On Sun, Nov 15, 2026 at 07:55 PM Zihan Xi [off-list ref] wrote:
When a reuseport group contains connected sockets, UDP lookup rescored the
socket selected by the reuseport program. If that socket did not match the
packet, lookup retained the stale selection while continuing the scan. This
could deliver a packet to a socket connected to a different peer.
Not since 6.13, unless CONFIG_BASE_SMALL=y.
Link: https://bugtracker.nebusec.ai/f/net/ipv6/udp.c||udp6_lib_lookup2||socket-hijack||m7q
That's not a hijack.
udp_reuseport_add_sock() lets only sockets of one uid into a group.
A member of the group attaches the prog.
The prog picks a wrong socket of its own user.
quoted hunk ↗ jump to hunk
+ if (need_rescore) {
+ if (score > badness)
+ badness = score;
+ else
+ result = sk;
+ continue;
+ }
This makes it worse.
The unconnected sockets of a group have the same score.
So the score of the picked socket is equal to badness, and the patch
replaces the picked socket with sk.
Sockets A, B, C are not connected. A is the first one in hslot2.
has_conns is set:
reuseport picks today with the patch
--------------- ----- --------------
A A A
B B A
C C A
Nack.