BPF List
 help / color / mirror / Atom feed
* [PATCH bpf 0/2] bpf, net: fix assigned socket mismatches
@ 2026-11-23  8:41 Nikolay Aleksandrov
  2026-11-23  8:41 ` [PATCH bpf 1/2] bpf, net: validate assigned socket on receive Nikolay Aleksandrov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Nikolay Aleksandrov @ 2026-11-23  8:41 UTC (permalink / raw)
  To: bpf
  Cc: Nikolay Aleksandrov, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Kuniyuki Iwashima,
	Willem de Bruijn, Martin KaFai Lau, Alexei Starovoitov,
	Daniel Borkmann, John Fastabend, netdev

Hi,
Patch 01 fixes various mismatches (protocol, netns etc) that can happen
with assigned sockets which can lead to different corruptions. Patch 02
exercises such mismatches for IPv4 and IPv6. For more information please
check the commit messages. The problem was found during LLM review of
the sk assign egress patch-set.

Cheers,
 Nik

CC: David S. Miller <davem@davemloft.net>
CC: Eric Dumazet <edumazet@kernel.org>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Paolo Abeni <pabeni@redhat.com>
CC: Simon Horman <horms@kernel.org>
CC: Kuniyuki Iwashima <kuniyu@google.com>
CC: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
CC: Martin KaFai Lau <kafai@fb.com>
CC: Alexei Starovoitov <ast@kernel.org>
CC: Daniel Borkmann <daniel@iogearbox.net>
CC: John Fastabend <john.fastabend@gmail.com>
CC: netdev@vger.kernel.org

Nikolay Aleksandrov (2):
  bpf, net: validate assigned socket on receive
  selftests/bpf: Test assigning a TCP listener to a UDP datagram

 include/net/inet6_hashtables.h                | 33 ++++++++++++-----
 include/net/inet_hashtables.h                 | 34 +++++++++++++-----
 include/net/inet_sock.h                       |  2 ++
 net/ipv4/inet_hashtables.c                    | 13 +++++++
 net/ipv4/udp.c                                |  2 +-
 net/ipv6/udp.c                                |  2 +-
 .../selftests/bpf/prog_tests/sk_assign.c      | 36 +++++++++++++++++++
 .../selftests/bpf/progs/test_sk_assign.c      |  2 +-
 8 files changed, 105 insertions(+), 19 deletions(-)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-23  9:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23  8:41 [PATCH bpf 0/2] bpf, net: fix assigned socket mismatches Nikolay Aleksandrov
2026-11-23  8:41 ` [PATCH bpf 1/2] bpf, net: validate assigned socket on receive Nikolay Aleksandrov
2026-11-23  9:29   ` sashiko-bot
2026-11-23  9:39     ` Nikolay Aleksandrov
2026-11-23  9:38   ` bot+bpf-ci
2026-11-23  9:41   ` Jiayuan Chen
2026-11-23  9:46     ` Nikolay Aleksandrov
2026-11-23  8:41 ` [PATCH bpf 2/2] selftests/bpf: test assigning a TCP listener to a UDP datagram Nikolay Aleksandrov
2026-11-23  9:40 ` [PATCH bpf 0/2] bpf, net: fix assigned socket mismatches Nikolay Aleksandrov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox