sst-linux/tools/lib
Andrii Nakryiko 0144376d20 libbpf: Fix hypothetical STT_SECTION extern NULL deref case
[ Upstream commit e0525cd72b5979d8089fe524a071ea93fd011dc9 ]

Fix theoretical NULL dereference in linker when resolving *extern*
STT_SECTION symbol against not-yet-existing ELF section. Not sure if
it's possible in practice for valid ELF object files (this would require
embedded assembly manipulations, at which point BTF will be missing),
but fix the s/dst_sym/dst_sec/ typo guarding this condition anyways.

Fixes: faf6ed321c ("libbpf: Add BPF static linker APIs")
Fixes: a46349227c ("libbpf: Add linker extern resolution support for functions and global variables")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20250220002821.834400-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-10 14:33:33 +02:00
..
api libapi: Add missing linux/types.h header to get the __u64 type on io.h 2024-01-25 15:27:46 -08:00
bpf libbpf: Fix hypothetical STT_SECTION extern NULL deref case 2025-04-10 14:33:33 +02:00
perf libperf evlist: Avoid out-of-bounds access 2024-04-13 13:05:12 +02:00
subcmd libsubcmd: Don't free the usage string 2024-10-17 15:22:11 +02:00
symbol
thermal thermal/lib: Fix memory leak on error in thermal_genl_auto() 2024-12-14 19:53:19 +01:00
traceevent
argv_split.c
bitmap.c
ctype.c
find_bit.c
hweight.c
list_sort.c
rbtree.c
slab.c
str_error_r.c
string.c
vsprintf.c
zalloc.c