diff options
| author | Eric Dumazet <[email protected]> | 2025-11-12 12:55:16 +0000 |
|---|---|---|
| committer | Martin KaFai Lau <[email protected]> | 2025-11-14 16:56:49 +0000 |
| commit | 4ef92743625818932b9c320152b58274c05e5053 (patch) | |
| tree | ac7496f64ff667fb3e3ac174206724073ef2182b /net/unix/af_unix.c | |
| parent | Merge branch 'mptcp-fix-conflicts-between-mptcp-and-sockmap' (diff) | |
| download | kernel-4ef92743625818932b9c320152b58274c05e5053.tar.gz kernel-4ef92743625818932b9c320152b58274c05e5053.zip | |
bpf: Add bpf_prog_run_data_pointers()
syzbot found that cls_bpf_classify() is able to change
tc_skb_cb(skb)->drop_reason triggering a warning in sk_skb_reason_drop().
WARNING: CPU: 0 PID: 5965 at net/core/skbuff.c:1192 __sk_skb_reason_drop net/core/skbuff.c:1189 [inline]
WARNING: CPU: 0 PID: 5965 at net/core/skbuff.c:1192 sk_skb_reason_drop+0x76/0x170 net/core/skbuff.c:1214
struct tc_skb_cb has been added in commit ec624fe740b4 ("net/sched:
Extend qdisc control block with tc control block"), which added a wrong
interaction with db58ba459202 ("bpf: wire in data and data_end for
cls_act_bpf").
drop_reason was added later.
Add bpf_prog_run_data_pointers() helper to save/restore the net_sched
storage colliding with BPF data_meta/data_end.
Fixes: ec624fe740b4 ("net/sched: Extend qdisc control block with tc control block")
Reported-by: syzbot <[email protected]>
Closes: https://lore.kernel.org/netdev/[email protected]/
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: Martin KaFai Lau <[email protected]>
Reviewed-by: Victor Nogueira <[email protected]>
Acked-by: Jamal Hadi Salim <[email protected]>
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
