]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Cover dynamic inner array lookup nullability
authorNuoqi Gui <gnq25@mails.tsinghua.edu.cn>
Sun, 7 Jun 2026 13:24:14 +0000 (21:24 +0800)
committerKumar Kartikeya Dwivedi <memxor@gmail.com>
Mon, 8 Jun 2026 11:33:10 +0000 (13:33 +0200)
commita3847994b4d20c0701ccc54fe110920ea78e73dc
tree61437a4d0d18b726a6ec2239c43feebf4762e005
parent53040a81ae57cdca8af8ac36fe4e661730cf7c6b
selftests/bpf: Cover dynamic inner array lookup nullability

Add a verifier regression test that looks up a constant key through a
dynamic inner array template and dereferences the result without a NULL
check.

The verifier must reject the program because BPF_F_INNER_MAP allows the
concrete runtime array to have fewer entries than the template.

Signed-off-by: Nuoqi Gui <gnq25@mails.tsinghua.edu.cn>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20260607-f01-v2-v2-2-da48453146e8@mails.tsinghua.edu.cn
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
tools/testing/selftests/bpf/progs/verifier_map_in_map.c