1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 16:06:04 -05:00
linux/kernel/bpf
Hou Tao 8421d4c876 bpf: Check validity of link->type in bpf_link_show_fdinfo()
If a newly-added link type doesn't invoke BPF_LINK_TYPE(), accessing
bpf_link_type_strs[link->type] may result in an out-of-bounds access.

To spot such missed invocations early in the future, checking the
validity of link->type in bpf_link_show_fdinfo() and emitting a warning
when such invocations are missed.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241024013558.1135167-3-houtao@huaweicloud.com
2024-10-24 10:17:12 -07:00
..
preload
arena.c
arraymap.c
bloom_filter.c
bpf_cgrp_storage.c
bpf_inode_storage.c
bpf_iter.c
bpf_local_storage.c
bpf_lru_list.c
bpf_lru_list.h
bpf_lsm.c bpf, lsm: Remove bpf_lsm_key_free hook 2024-10-08 12:52:40 -07:00
bpf_struct_ops.c
bpf_task_storage.c
btf.c bpf: Check the remaining info_cnt before repeating btf fields 2024-10-09 16:32:46 -07:00
btf_iter.c
btf_relocate.c
cgroup.c
cgroup_iter.c
core.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cpumap.c
cpumask.c
crypto.c
devmap.c bpf: devmap: provide rxq after redirect 2024-10-02 13:48:26 -07:00
disasm.c
disasm.h
dispatcher.c
hashtab.c
helpers.c bpf: Add MEM_WRITE attribute 2024-10-22 15:42:56 -07:00
inode.c bpf: Preserve param->string when parsing mount options 2024-10-22 12:56:38 -07:00
Kconfig
link_iter.c
local_storage.c
log.c bpf: Fix print_reg_state's constant scalar dump 2024-10-17 11:06:34 -07:00
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
relo_core.c
reuseport_array.c
ringbuf.c bpf: Add MEM_WRITE attribute 2024-10-22 15:42:56 -07:00
stackmap.c
syscall.c bpf: Check validity of link->type in bpf_link_show_fdinfo() 2024-10-24 10:17:12 -07:00
sysfs_btf.c
task_iter.c bpf: Fix iter/task tid filtering 2024-10-17 10:52:18 -07:00
tcx.c
tnum.c
token.c
trampoline.c
verifier.c bpf: fix do_misc_fixups() for bpf_get_branch_snapshot() 2024-10-23 22:16:45 -07:00