android_kernel_samsung_univ.../kernel/bpf
Chenbo Feng c9ea2f8af6 bpf: skip unnecessary capability check
commit 0fa4fe85f4724fff89b09741c437cbee9cf8b008 upstream.

The current check statement in BPF syscall will do a capability check
for CAP_SYS_ADMIN before checking sysctl_unprivileged_bpf_disabled. This
code path will trigger unnecessary security hooks on capability checking
and cause false alarms on unprivileged process trying to get CAP_SYS_ADMIN
access. This can be resolved by simply switch the order of the statement
and CAP_SYS_ADMIN is not required anyway if unprivileged bpf syscall is
allowed.

Signed-off-by: Chenbo Feng <fengc@google.com>
Acked-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-28 18:40:17 +02:00
..
arraymap.c bpf, array: fix overflow in max_entries and undefined behavior in index_mask 2018-01-17 09:35:31 +01:00
core.c bpf: fix divides by zero 2018-02-03 17:04:24 +01:00
hashtab.c bpf: fix allocation warnings in bpf maps and integer overflow 2015-12-02 23:36:00 -05:00
helpers.c bpf: avoid copying junk bytes in bpf_get_current_comm() 2016-04-20 15:42:01 +09:00
inode.c bpf, inode: disallow userns mounts 2016-06-24 10:18:17 -07:00
Makefile bpf: add support for persistent maps/progs 2015-11-02 22:48:39 -05:00
syscall.c bpf: skip unnecessary capability check 2018-03-28 18:40:17 +02:00
verifier.c bpf: fix incorrect sign extension in check_alu_op() 2018-03-22 09:23:32 +01:00