linux/tools/lib/bpf
Andrii Nakryiko b7332d2820 libbpf: Improve ELF relo sanitization
Add few sanity checks for relocations to prevent div-by-zero and
out-of-bounds array accesses in libbpf.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20211103173213.1376990-6-andrii@kernel.org
2021-11-03 13:25:37 -07:00
..
.gitignore libbpf: Make libbpf_version.h non-auto-generated 2021-09-13 15:36:47 -07:00
bpf_core_read.h libbpf: Fix endianness detection in BPF_CORE_READ_BITFIELD_PROBED() 2021-10-25 20:39:41 -07:00
bpf_endian.h libbpf: Make bpf_endian co-exist with vmlinux.h 2020-07-01 09:06:12 +02:00
bpf_gen_internal.h libbpf: Add typeless ksym support to gen_loader 2021-10-28 16:30:06 -07:00
bpf_helpers.h libbpf: Use static const fmt string in __bpf_printk 2021-09-17 14:02:05 -07:00
bpf_prog_linfo.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
bpf_tracing.h riscv, libbpf: Add RISC-V (RV64) support to bpf_tracing.h 2021-11-01 17:08:21 +01:00
bpf.c libbpf: Ensure that BPF syscall fds are never 0, 1, or 2 2021-10-28 16:30:07 -07:00
bpf.h libbpf: Add bpf_cookie support to bpf_link_create() API 2021-08-17 00:45:08 +02:00
btf_dump.c libbpf: Use __BYTE_ORDER__ 2021-10-25 20:39:41 -07:00
btf.c libbpf: Use O_CLOEXEC uniformly when opening fds 2021-10-28 16:30:07 -07:00
btf.h libbpf: Add btf__type_cnt() and btf__raw_data() APIs 2021-10-22 16:09:14 -07:00
Build libbpf: Split CO-RE logic into relo_core.c. 2021-07-26 12:29:14 -07:00
gen_loader.c libbpf: Add weak ksym support to gen_loader 2021-10-28 16:30:06 -07:00
hashmap.c libbpf: Centralize poisoning and poison reallocarray() 2020-08-18 18:38:25 -07:00
hashmap.h libbpf, hashmap: Fix undefined behavior in hash_bits 2020-11-02 23:33:51 +01:00
libbpf_common.h libbpf: Schedule open_opts.attach_prog_fd deprecation since v0.7 2021-09-17 09:05:41 -07:00
libbpf_errno.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
libbpf_internal.h libbpf: Ensure that BPF syscall fds are never 0, 1, or 2 2021-10-28 16:30:07 -07:00
libbpf_legacy.h libbpf: Deprecate bpf_objects_list 2021-10-27 11:00:12 -07:00
libbpf_probes.c libbpf: Use O_CLOEXEC uniformly when opening fds 2021-10-28 16:30:07 -07:00
libbpf_version.h libbpf: Make libbpf_version.h non-auto-generated 2021-09-13 15:36:47 -07:00
libbpf.c libbpf: Improve ELF relo sanitization 2021-11-03 13:25:37 -07:00
libbpf.h libbpf: Deprecate bpf_program__get_prog_info_linear 2021-11-03 11:25:36 -07:00
libbpf.map libbpf: Add "map_extra" as a per-map-type extra flag 2021-10-28 13:22:49 -07:00
libbpf.pc.template
linker.c libbpf: Use O_CLOEXEC uniformly when opening fds 2021-10-28 16:30:07 -07:00
Makefile libbpf: Remove Makefile warnings on out-of-sync netlink.h/if_link.h 2021-10-19 16:33:10 -07:00
netlink.c libbpf: Switch to void * casting in netlink helpers 2021-06-22 17:04:02 +02:00
nlattr.c libbpf: Switch to void * casting in netlink helpers 2021-06-22 17:04:02 +02:00
nlattr.h libbpf: Switch to void * casting in netlink helpers 2021-06-22 17:04:02 +02:00
relo_core.c libbpf: Use __BYTE_ORDER__ 2021-10-25 20:39:41 -07:00
relo_core.h libbpf: Split CO-RE logic into relo_core.c. 2021-07-26 12:29:14 -07:00
ringbuf.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
skel_internal.h libbpf: Fix skel_internal.h to set errno on loader retval < 0 2021-09-29 20:42:32 -07:00
str_error.c libbpf: Poison kernel-only integer types 2020-01-10 10:38:00 -08:00
str_error.h
strset.c libbpf: Fix memory leak in strset 2021-10-01 22:54:38 +02:00
strset.h libbpf: Extract internal set-of-strings datastructure APIs 2021-03-18 16:14:22 -07:00
xsk.c libbpf: Use O_CLOEXEC uniformly when opening fds 2021-10-28 16:30:07 -07:00
xsk.h libbpf: Deprecate AF_XDP support 2021-11-01 18:12:44 -07:00