Thread (9 messages) flat view 9 messages, 3 authors, 2026-06-19

Re: [PATCH bpf v4 1/3] selftests/bpf: don't modify the skb in the strparser parser prog

From: Jiayuan Chen <jiayuan.chen@linux.dev>
Date: 2026-06-19 06:35:33
Also in: bpf, linux-kselftest, lkml

On 6/19/26 2:29 PM, Sechang Lim wrote:
sockmap_parse_prog.c is attached as an SK_SKB stream parser and modifies
the skb. It calls bpf_skb_pull_data() and writes a byte into the packet.
A stream parser runs on strparser's message head and must not modify it.
A resize frees the frag_list segments strparser still tracks, leading to
a use-after-free.

Make the parser read-only. It only needs to return the message length,
which keeps it attaching once packet-modifying parsers are rejected.

Signed-off-by: Sechang Lim <redacted>

This series should target bpf-next.


Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help