linux-stable/tools/lib/bpf
Alexei Starovoitov 86f44fcec2 bpf: Disallow bpf programs call prog_run command.
The verifier cannot perform sufficient validation of bpf_attr->test.ctx_in
pointer, therefore bpf programs should not be allowed to call BPF_PROG_RUN
command from within the program.
To fix this issue split bpf_sys_bpf() bpf helper into normal kern_sys_bpf()
kernel function that can only be used by the kernel light skeleton directly.

Reported-by: YiFei Zhu <zhuyifei@google.com>
Fixes: b1d18a7574 ("bpf: Extend sys_bpf commands for bpf_syscall programs.")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2022-08-10 09:43:07 -07:00
..
.gitignore libbpf: Make libbpf_version.h non-auto-generated 2021-09-13 15:36:47 -07:00
bpf.c libbpf: Add bpf_obj_get_opts() 2022-07-29 15:30:06 -07:00
bpf.h libbpf: Add bpf_obj_get_opts() 2022-07-29 15:30:06 -07:00
bpf_core_read.h libbpf: add bpf_core_type_matches() helper macro 2022-07-05 21:15:19 -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 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-10 15:56:13 -08:00
bpf_helpers.h libbpf: Disable SEC pragma macro on GCC 2022-07-08 15:11:34 -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 libbpf: Extend BPF_KSYSCALL documentation 2022-07-26 16:27:21 +02:00
btf.c libbpf: remove deprecated BTF APIs 2022-06-28 13:13:32 -07:00
btf.h libbpf: remove deprecated BTF APIs 2022-06-28 13:13:32 -07:00
btf_dump.c libbpf: Fix sign expansion bug in btf_dump_get_enum_value() 2022-07-21 14:24:18 +02:00
Build libbpf: move xsk.{c,h} into selftests/bpf 2022-06-28 13:13:32 -07:00
gen_loader.c libbpf: fix an snprintf() overflow check 2022-07-19 10:47:31 -07:00
hashmap.c libbpf: Use IS_ERR_OR_NULL() in hashmap__free() 2022-01-12 17:01:36 -08:00
hashmap.h libbpf, hashmap: Fix undefined behavior in hash_bits 2020-11-02 23:33:51 +01:00
libbpf.c libbpf: Support PPC in arch_specific_syscall_pfx 2022-07-28 16:11:18 -07:00
libbpf.h libbpf: add ksyscall/kretsyscall sections support for syscall kprobes 2022-07-19 09:33:18 -07:00
libbpf.map libbpf: Add bpf_obj_get_opts() 2022-07-29 15:30:06 -07:00
libbpf.pc.template libbpf: Add zlib as a dependency in pkg-config template 2019-12-16 14:55:29 -08:00
libbpf_common.h libbpf: cleanup LIBBPF_DEPRECATED_SINCE supporting macros for v0.x 2022-06-28 13:13:33 -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: Fix str_has_sfx()'s return value 2022-07-21 14:30:25 +02:00
libbpf_legacy.h libbpf: fix up few libbpf.map problems 2022-06-28 13:13:33 -07:00
libbpf_probes.c libbpf: remove deprecated probing APIs 2022-06-28 13:13:32 -07:00
libbpf_version.h libbpf: start 1.0 development cycle 2022-05-19 09:03:31 -07:00
linker.c libbpf: Add enum64 support for bpf linking 2022-06-07 10:20:43 -07:00
Makefile libbpf: move xsk.{c,h} into selftests/bpf 2022-06-28 13:13:32 -07:00
netlink.c libbpf: remove deprecated XDP APIs 2022-06-28 13:13:32 -07: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 bpf: Correctly propagate errors up from bpf_core_composites_match 2022-07-08 15:31:43 -07:00
relo_core.h bpf, libbpf: Add type match support 2022-07-05 21:14:25 -07:00
ringbuf.c libbpf: Streamline error reporting for high-level APIs 2021-05-25 17:32:35 -07:00
skel_internal.h bpf: Disallow bpf programs call prog_run command. 2022-08-10 09:43:07 -07:00
str_error.c libbpf: Poison kernel-only integer types 2020-01-10 10:38:00 -08:00
str_error.h libbpf: relicense libbpf as LGPL-2.1 OR BSD-2-Clause 2018-10-08 10:09:48 +02:00
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
usdt.bpf.h libbpf: generalize virtual __kconfig externs and use it for USDT 2022-07-19 09:33:17 -07:00
usdt.c libbpf: Remove unnecessary usdt_rel_ip assignments 2022-07-06 16:46:19 +02:00