diff options
author | 2021-11-23 16:23:18 -0800 | |
---|---|---|
committer | 2021-11-26 00:15:03 +0100 | |
commit | 593835377f24ca1bb98008ec1dc3baefe491ad6e (patch) | |
tree | fa57f0773226c642232f84063ffc07d93250cf94 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | libbpf: Fix glob_syms memory leak in bpf_linker (diff) | |
download | wireguard-linux-593835377f24ca1bb98008ec1dc3baefe491ad6e.tar.xz wireguard-linux-593835377f24ca1bb98008ec1dc3baefe491ad6e.zip |
libbpf: Fix using invalidated memory in bpf_linker
add_dst_sec() can invalidate bpf_linker's section index making
dst_symtab pointer pointing into unallocated memory. Reinitialize
dst_symtab pointer on each iteration to make sure it's always valid.
Fixes: faf6ed321cf6 ("libbpf: Add BPF static linker APIs")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211124002325.1737739-7-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions