All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ihor Solodrai <ihor.solodrai@linux.dev>
To: Sechang Lim <rhkrqnwk98@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Jakub Sitnicki <jakub@cloudflare.com>,
	Eduard Zingerman <eddyz87@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>,
	Kuniyuki Iwashima <kuniyu@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Willem de Bruijn <willemb@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Jiri Olsa <jolsa@kernel.org>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Jiayuan Chen <jiayuan.chen@linux.dev>,
	Bobby Eshleman <bobby.eshleman@bytedance.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v5 0/3] bpf, sockmap: reject a packet-modifying SK_SKB stream parser
Date: Tue, 30 Jun 2026 21:48:52 -0700	[thread overview]
Message-ID: <e3a91acd-2b4d-4e93-a3bb-a0e9ee5ede0f@linux.dev> (raw)
In-Reply-To: <20260620024423.4141004-1-rhkrqnwk98@gmail.com>

On 2026-06-19 7:44 p.m., Sechang Lim wrote:
> A BPF_PROG_TYPE_SK_SKB stream parser runs on strparser's message head,
> which can chain skbs through frag_list. A parser that resizes the skb
> frees the frag_list segments that strparser still tracks through
> skb_nextp, leading to a use-after-free.
> 
> A stream parser is only meant to measure the next message, not to modify
> the packet, so reject a packet-modifying parser at attach time.
> 
> v5:
>   - target bpf-next instead of bpf
>   - add Reviewed-by tag (Jiayuan Chen)
> 
> v4:
>   - https://lore.kernel.org/all/20260619062959.3277612-1-rhkrqnwk98@gmail.com/
> 
> v3:
>   - https://lore.kernel.org/all/20260618102718.2331468-1-rhkrqnwk98@gmail.com/
> 
> v2:
>   - https://lore.kernel.org/all/20260612123553.2724240-1-rhkrqnwk98@gmail.com/
> 
> v1:
>   - https://lore.kernel.org/all/20260609112316.3685738-1-rhkrqnwk98@gmail.com/
> 
> Sechang Lim (3):
>    selftests/bpf: don't modify the skb in the strparser parser prog
>    bpf, sockmap: reject a packet-modifying SK_SKB stream parser
>    selftests/bpf: test rejection of a packet-modifying SK_SKB stream
>      parser


Hi Sechang, all,

This series broke test_maps (test_sockmap subtest) on the bpf
tree. Currently on BPF CI the test fails on bpf, but passes on
bpf-next (it doesn't have the series yet).

test_maps fails with:

     + taskset 0xF ./test_maps
     [    8.352378] clocksource: Watchdog remote CPU 2 read timed out
     Failed sockmap unexpected timeout

See test_maps.c:995 in test_sockmap(): the 30s select() times out and
test_maps exits 1. Note there is no "Failed stream parser bpf prog
attach" message, the parser attaches fine.

The series was merged into bpf on 2026-06-26 00:42 UTC

CI runs:
   last good (pre-merge, 06-25): 
https://github.com/kernel-patches/bpf/actions/runs/28158326456
   first bad (post-merge, 06-26): 
https://github.com/kernel-patches/bpf/actions/runs/28210181858
   recent bad (06-30): 
https://github.com/kernel-patches/bpf/actions/runs/28475936023

Confirmed locally reverting the 3 commits and rebuilding makes
test_sockmap pass again.

Could you please help investigate?

Thanks!


> 
>   net/core/sock_map.c                           | 20 ++++++++++++
>   .../selftests/bpf/prog_tests/sockmap_strp.c   | 31 +++++++++++++++++++
>   .../selftests/bpf/progs/sockmap_parse_prog.c  | 22 -------------
>   .../selftests/bpf/progs/test_sockmap_strp.c   |  7 +++++
>   4 files changed, 58 insertions(+), 22 deletions(-)
> 


  parent reply	other threads:[~2026-07-01  4:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-20  2:44 [PATCH bpf-next v5 0/3] bpf, sockmap: reject a packet-modifying SK_SKB stream parser Sechang Lim
2026-06-20  2:44 ` [PATCH bpf-next v5 1/3] selftests/bpf: don't modify the skb in the strparser parser prog Sechang Lim
2026-06-20  2:44 ` [PATCH bpf-next v5 2/3] bpf, sockmap: reject a packet-modifying SK_SKB stream parser Sechang Lim
2026-06-20  3:06   ` sashiko-bot
2026-06-20  2:44 ` [PATCH bpf-next v5 3/3] selftests/bpf: test rejection of " Sechang Lim
2026-06-26 12:27 ` [PATCH bpf-next v5 0/3] bpf, sockmap: reject " patchwork-bot+netdevbpf
2026-07-01  4:48 ` Ihor Solodrai [this message]
2026-07-01  5:03   ` Jiayuan Chen

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=e3a91acd-2b4d-4e93-a3bb-a0e9ee5ede0f@linux.dev \
    --to=ihor.solodrai@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bobby.eshleman@bytedance.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=eddyz87@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jakub@cloudflare.com \
    --cc=jiayuan.chen@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rhkrqnwk98@gmail.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=willemb@google.com \
    --cc=yonghong.song@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.