]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: check for insn arrays in check_ptr_alignment
authorAnton Protopopov <a.s.protopopov@gmail.com>
Fri, 28 Nov 2025 06:32:24 +0000 (06:32 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 28 Nov 2025 23:15:43 +0000 (15:15 -0800)
commite3ea26add687ec6829fd8e7161b17667fdb88ec1
treeaa3809c6b04559da7746da4c2e9b8e426c10172c
parent7feff23cdf2ecd30909872f3be1da820df839ab0
bpf: check for insn arrays in check_ptr_alignment

Do not abuse the strict_alignment_once flag, and check if the map is
an instruction array inside the check_ptr_alignment() function.

Suggested-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Link: https://lore.kernel.org/r/20251128063224.1305482-3-a.s.protopopov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c