mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
Merge branch 'bpf-fix-null-deref-when-storing-scalar-into-kptr-slot'
Mykyta Yatsenko says: ==================== bpf: Fix NULL deref when storing scalar into kptr slot map_kptr_match_type() accesses reg->btf before confirming the register is PTR_TO_BTF_ID. A scalar store into a kptr slot has no btf, causing a NULL pointer dereference. Guard base_type() first. Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com> ==================== Link: https://patch.msgid.link/20260416-kptr_crash-v1-0-5589356584b4@meta.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
commit
766bf026d0
2 changed files with 19 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue