Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by "Alexei Starovoitov"
Mon, 16 Nov 2026 04:51
Re: [PATCH net 1/2] udp: fix reuseport rescore fallback
Author: "Alexei Starovoitov"
Date: Mon, 16 Nov 2026 04:51
Date: Mon, 16 Nov 2026 04:51
39 lines
12358 bytes
12358 bytes
On Sun, Nov 15, 2026 at 07:55 PM Zihan Xi <zihanx@nebusec.ai> 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.
> + 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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads