]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Fix out-of-bounds array access bugs reported by ASAN
authorIhor Solodrai <ihor.solodrai@linux.dev>
Mon, 23 Feb 2026 19:11:16 +0000 (11:11 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Feb 2026 16:19:49 +0000 (08:19 -0800)
commitad90ecedad755e2f3e31364ec3130e5bb2f4b64a
treeed0da543fda83fe322082b444ec5092fa5de74c7
parent3e711c8e4707c46cc45d9775b50204d0f2790d77
selftests/bpf: Fix out-of-bounds array access bugs reported by ASAN

- kmem_cache_iter: remove unnecessary debug output
- lwt_seg6local: change the type of foobar to char[]
  - the sizeof(foobar) returned the pointer size and not a string
    length as intended
- verifier_log: increase prog_name buffer size in verif_log_subtest()
  - compiler has a conservative estimate of fixed_log_sz value, making
    ASAN complain on snprint() call

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260223191118.655185-1-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/kmem_cache_iter.c
tools/testing/selftests/bpf/prog_tests/lwt_seg6local.c
tools/testing/selftests/bpf/prog_tests/verifier_log.c