]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bpf: Do not ignore offsets for loads from insn_arrays
authorAnton Protopopov <a.s.protopopov@gmail.com>
Mon, 6 Apr 2026 16:01:40 +0000 (16:01 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 7 Apr 2026 01:38:32 +0000 (18:38 -0700)
commit43cd9d9520e6622f6b9ffcd4f68e9d99225482b2
tree9d212d20117a87b400ee75139961f56810e1365f
parent18474aed5d0d382f8057ceed7811a735134d28b9
bpf: Do not ignore offsets for loads from insn_arrays

When a pointer to PTR_TO_INSN is dereferenced, the offset field
of the BPF_LDX_MEM instruction can be nonzero. Patch the verifier
to not ignore this field.

Reported-by: Jiyong Yang <ksur673@gmail.com>
Fixes: 493d9e0d6083 ("bpf, x86: add support for indirect jumps")
Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Link: https://lore.kernel.org/r/20260406160141.36943-2-a.s.protopopov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c