diff options
| author | Florian Westphal <fw@strlen.de> | 2026-09-03 08:58:45 +0200 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-09-03 21:41:58 -0700 |
| commit | 254c881fe0554c5efb16d355c273702a27a32a20 (patch) | |
| tree | 7974537ee435b63250363a62553c140490acb76e /scripts/Makefile.thinlto | |
| parent | 0237317ffc70ae9d643161d176999b6283920fe4 (diff) | |
| download | linux-254c881fe0554c5efb16d355c273702a27a32a20.tar.gz linux-254c881fe0554c5efb16d355c273702a27a32a20.zip | |
selftests/bpf: Add tests to assert that netfilter progs cannot write to skb
The netfilter framework is allergic to ip header changing after
validation done by ip/ipv6 stack.
Assert that bpf netfilter programs do not allow skb write access.
Following additional tests are expected to be rejected by verifier:
1. alter skb->len.
2. alter skb->data.
3. prog calls bpf_dynptr_slice_rdwr.
4. alter location returned by dynptr API.
Add following test case for bpf runtime:
- alter skb data via bpf_dynptr_write()
Test checks via __retval() that bpf_dynptr_write() returned nonzero value.
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Link: https://lore.kernel.org/r/20260903065845.22762-1-fw@strlen.de
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
