]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Test using dynptr after freeing the underlying object
authorAmery Hung <ameryhung@gmail.com>
Fri, 29 May 2026 01:49:36 +0000 (18:49 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 2 Jun 2026 01:31:42 +0000 (18:31 -0700)
commit60c7c3b880c8b3ad7fe025bb68b13bfbc440ceaf
tree4a526b3df34f6570ca148ddfccac003ca4f8c67b
parent3f75a757a3afa9c0d5a2637910659e92d236e7f2
selftests/bpf: Test using dynptr after freeing the underlying object

Make sure the verifier invalidates the dynptr and dynptr slice derived
from an skb after the skb is freed.

Signed-off-by: Amery Hung <ameryhung@gmail.com>
Link: https://lore.kernel.org/r/20260529014936.2811085-14-ameryhung@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/bpf_qdisc_fail__invalid_dynptr.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/bpf_qdisc_fail__invalid_dynptr_cross_frame.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/bpf_qdisc_fail__invalid_dynptr_slice.c [new file with mode: 0644]