Netdev List
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <razor@blackwall.org>
To: bpf@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Kuniyuki Iwashima <kuniyu@google.com>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	Martin KaFai Lau <kafai@fb.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	John Fastabend <john.fastabend@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH bpf 0/2] bpf, net: fix assigned socket mismatches
Date: Mon, 23 Nov 2026 11:40:58 +0200	[thread overview]
Message-ID: <e3ca53b3-2b57-4927-b93a-91c8458f7ccb@blackwall.org> (raw)
In-Reply-To: <20261123084138.723275-1-razor@blackwall.org>

On 23/11/2026 10:41, Nikolay Aleksandrov wrote:
> 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(-)
> 

Sashiko found a few more mismatch cases that can happen, I will address them
in v2.

Thanks,
  Nik

---
pw-bot: cr

      parent reply	other threads:[~2026-11-23  9:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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: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 ` Nikolay Aleksandrov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3ca53b3-2b57-4927-b93a-91c8458f7ccb@blackwall.org \
    --to=razor@blackwall.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox