linux/kernel/bpf
Amery Hung 289e680c89 bpf: Reject passing scalar NULL to nonnull arg of a global subprog
A global subprogram argument tagged __arg_nonnull is set up as a
non-nullable PTR_TO_MEM. However the verifier does not check against a
scalar NULL, leading to real NULL pointer dereference. Reject it as
well.

Fixes: 94e1c70a34 ("bpf: support 'arg:xxx' btf_decl_tag-based hints for global subprog args")
Signed-off-by: Amery Hung <ameryhung@gmail.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://patch.msgid.link/20260723221815.367797-1-ameryhung@gmail.com
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
2026-07-23 16:09:07 -07:00
..
preload
arena.c
arraymap.c
backtrack.c
bloom_filter.c
bpf_cgrp_storage.c
bpf_inode_storage.c bpf: Reject BPF_MAP_TYPE_INODE_STORAGE creation if BPF LSM is uninitialized 2026-06-30 16:31:56 +02:00
bpf_insn_array.c
bpf_iter.c
bpf_local_storage.c
bpf_lru_list.c
bpf_lru_list.h
bpf_lsm_proto.c
bpf_lsm.c
bpf_struct_ops.c
bpf_task_storage.c
btf_iter.c
btf_relocate.c
btf.c bpf: Fix tracing of kfuncs with implicit args 2026-07-16 16:11:29 -07:00
cfg.c
cgroup_iter.c
cgroup.c
check_btf.c
cnum_defs.h
cnum.c
const_fold.c
core.c bpf: Prefer dirty packs for eBPF allocations 2026-07-01 10:34:41 +02:00
cpumap.c
cpumask.c
crypto.c
devmap.c
disasm.c
disasm.h
dispatcher.c bpf: Restrict JIT predictor flush to cBPF 2026-07-01 10:33:38 +02:00
dmabuf_iter.c
fixups.c
hashtab.c
helpers.c
inode.c
Kconfig
kmem_cache_iter.c
link_iter.c
liveness.c
local_storage.c
log.c
lpm_trie.c
Makefile
map_in_map.c
map_in_map.h
map_iter.c
memalloc.c
mmap_unlock_work.h
mprog.c
net_namespace.c
offload.c
percpu_freelist.c
percpu_freelist.h
prog_iter.c
queue_stack_maps.c
range_tree.c
range_tree.h
relo_core.c
reuseport_array.c
ringbuf.c
rqspinlock.c
rqspinlock.h
stackmap.c
states.c
stream.c
syscall.c
sysfs_btf.c
task_iter.c
tcx.c
tnum.c
token.c
trampoline.c
verifier.c bpf: Reject passing scalar NULL to nonnull arg of a global subprog 2026-07-23 16:09:07 -07:00