Daniel Borkmann
0d6303db79
bpf: restrict map value pointer arithmetic for unprivileged
...
Restrict map value pointer arithmetic for unprivileged users in that
arithmetic itself must not go out of bounds as opposed to the actual
access later on. Therefore after each adjust_ptr_min_max_vals() with a
map value pointer as a destination it will simulate a check_map_access()
of 1 byte on the destination and once that fails the program is rejected
for unprivileged program loads. We use this later on for masking any
pointer arithmetic with the remainder of the map value space. The
likelihood of breaking any existing real-world unprivileged eBPF
program is very small for this corner case.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-01-02 16:01:24 -08:00
..
bpf
bpf: restrict map value pointer arithmetic for unprivileged
2019-01-02 16:01:24 -08:00
cgroup
cgroups: Replace synchronize_sched() with synchronize_rcu()
2018-12-01 12:38:49 -08:00
configs
kvm_config: add CONFIG_VIRTIO_MENU
2018-10-24 20:55:56 -04:00
debug
kdb: kdb_support: mark expected switch fall-throughs
2018-11-13 20:38:50 +00:00
dma
dma-direct: do not include SME mask in the DMA supported check
2018-12-17 18:02:11 +01:00
events
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2018-12-26 14:45:18 -08:00
gcov
irq
genirq/affinity: Add is_managed to struct irq_affinity_desc
2018-12-19 11:32:08 +01:00
livepatch
livepatch: Replace synchronize_sched() with synchronize_rcu()
2018-12-01 12:38:50 -08:00
locking
Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2018-12-26 14:25:52 -08:00
power
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2018-12-26 14:56:10 -08:00
printk
Printk changes for 4.21
2018-12-27 11:24:43 -08:00
rcu
rcutorture: Don't do busted forward-progress testing
2018-12-01 12:45:42 -08:00
sched
sched/fair: Fix warning on non-SMP build
2018-12-27 10:40:15 -08:00
time
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2018-12-25 15:44:08 -08:00
trace
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2018-12-27 13:04:52 -08:00
.gitignore
acct.c
async.c
audit.c
audit: remove duplicated include from audit.c
2018-12-14 12:09:30 -05:00
audit.h
audit: use current whenever possible
2018-11-26 18:41:21 -05:00
audit_fsnotify.c
audit: minimize our use of audit_log_format()
2018-11-26 18:40:00 -05:00
audit_tree.c
audit: minimize our use of audit_log_format()
2018-11-26 18:40:00 -05:00
audit_watch.c
audit: minimize our use of audit_log_format()
2018-11-26 18:40:00 -05:00
auditfilter.c
auditsc.c
audit: use current whenever possible
2018-11-26 18:41:21 -05:00
backtracetest.c
bounds.c
kbuild: fix kernel/bounds.c 'W=1' warning
2018-10-31 08:54:14 -07:00
capability.c
compat.c
y2038: globally rename compat_time to old_time32
2018-08-27 14:48:48 +02:00
configs.c
context_tracking.c
cpu.c
x86/speculation: Rework SMT state change
2018-11-28 11:57:07 +01:00
cpu_pm.c
crash_core.c
kernel/crash_core.c: print timestamp using time64_t
2018-08-22 10:52:47 -07:00
crash_dump.c
cred.c
delayacct.c
delayacct: track delays from thrashing cache pages
2018-10-26 16:26:32 -07:00
dma.c
elfcore.c
exec_domain.c
exit.c
signal: Pass pid type into group_send_sig_info
2018-07-21 12:57:35 -05:00
extable.c
fail_function.c
kernel/fail_function.c: remove meaningless null pointer check before debugfs_remove_recursive
2018-10-31 08:54:12 -07:00
fork.c
fork,memcg: fix crash in free_thread_stack on memcg charge fail
2018-12-21 14:51:18 -08:00
freezer.c
PM / reboot: Eliminate race between reboot and suspend
2018-08-06 12:35:20 +02:00
futex.c
futex: Cure exit race
2018-12-18 23:13:15 +01:00
futex_compat.c
y2038: globally rename compat_time to old_time32
2018-08-27 14:48:48 +02:00
groups.c
hung_task.c
kernel: hung_task.c: disable on suspend
2018-10-25 18:45:08 +02:00
iomem.c
irq_work.c
jump_label.c
Merge branch 'x86/build' into locking/core, to pick up dependent patches and unify jump-label work
2018-10-16 17:30:11 +02:00
kallsyms.c
kallsyms: reduce size a little on 64-bit
2018-09-10 22:54:33 +09:00
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kconfig: include kernel/Kconfig.preempt from init/Kconfig
2018-08-02 08:06:54 +09:00
kcov.c
kernel/kcov.c: mark funcs in __sanitizer_cov_trace_pc() as notrace
2018-11-30 14:56:14 -08:00
kexec.c
kexec: add call to LSM hook in original kexec_load syscall
2018-07-16 12:31:57 -07:00
kexec_core.c
kexec: Allocate decrypted control pages for kdump if SME is enabled
2018-10-06 12:01:51 +02:00
kexec_file.c
kexec_file: kexec_walk_memblock() only walks a dedicated region at kdump
2018-12-06 14:38:50 +00:00
kexec_internal.h
kmod.c
kprobes.c
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2018-12-26 14:45:18 -08:00
ksysfs.c
kthread.c
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2018-08-13 11:25:07 -07:00
latencytop.c
Makefile
audit: remove WATCH and TREE config options
2018-11-19 16:29:50 -05:00
memremap.c
Merge branch 'xarray' of git://git.infradead.org/users/willy/linux-dax
2018-10-28 11:35:40 -07:00
module-internal.h
module.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2018-12-27 13:04:52 -08:00
module_signing.c
modsign: use all trusted keys to verify module signature
2018-11-07 14:41:41 +01:00
notifier.c
nsproxy.c
padata.c
padata: clean an indentation issue, remove extraneous space
2018-11-16 14:11:04 +08:00
panic.c
Printk changes for 4.21
2018-12-27 11:24:43 -08:00
params.c
pid.c
mm: remove include/linux/bootmem.h
2018-10-31 08:54:16 -07:00
pid_namespace.c
signal: Use group_send_sig_info to kill all processes in a pid namespace
2018-09-16 16:08:25 +02:00
profile.c
mm: remove include/linux/bootmem.h
2018-10-31 08:54:16 -07:00
ptrace.c
ptrace: Remove unused ptrace_may_access_sched() and MODE_IBRS
2018-11-28 11:57:11 +01:00
range.c
reboot.c
kernel/reboot.c: export pm_power_off_prepare
2018-09-11 16:13:24 +01:00
relay.c
resource.c
resource/docs: Complete kernel-doc style function documentation
2018-11-07 16:47:47 +01:00
rseq.c
seccomp.c
Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
2018-10-24 11:49:35 +01:00
signal.c
kernel/signal.c: fix a comment error
2018-10-31 08:54:14 -07:00
smp.c
smp,cpumask: introduce on_each_cpu_cond_mask
2018-10-09 16:51:11 +02:00
smpboot.c
smpboot.h
softirq.c
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2018-10-25 11:43:47 -07:00
stackleak.c
stackleak: Mark stackleak_track_stack() as notrace
2018-12-05 19:31:44 -08:00
stacktrace.c
stop_machine.c
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2018-08-13 11:25:07 -07:00
sys.c
arm64: add prctl control for resetting ptrauth keys
2018-12-13 16:42:46 +00:00
sys_ni.c
sysctl.c
kernel/sysctl.c: remove duplicated include
2018-11-03 10:09:37 -07:00
sysctl_binary.c
task_work.c
taskstats.c
test_kprobes.c
torture.c
torture: Remove unnecessary "ret" variables
2018-12-01 12:45:35 -08:00
tracepoint.c
tracing: Replace synchronize_sched() and call_rcu_sched()
2018-11-27 09:21:41 -08:00
tsacct.c
ucount.c
uid16.c
uid16.h
umh.c
umh: Add command line to user mode helpers
2018-10-22 19:37:36 -07:00
up.c
smp,cpumask: introduce on_each_cpu_cond_mask
2018-10-09 16:51:11 +02:00
user-return-notifier.c
user.c
userns: use irqsave variant of refcount_dec_and_lock()
2018-08-22 10:52:47 -07:00
user_namespace.c
userns: also map extents in the reverse map to kernel IDs
2018-11-07 23:51:16 -06:00
utsname.c
utsname_sysctl.c
sys: don't hold uts_sem while accessing userspace memory
2018-08-11 02:05:53 -05:00
watchdog.c
watchdog: Mark watchdog touch functions as notrace
2018-08-30 12:56:40 +02:00
watchdog_hld.c
watchdog: Mark watchdog touch functions as notrace
2018-08-30 12:56:40 +02:00
workqueue.c
workqueue: Replace call_rcu_sched() with call_rcu()
2018-11-27 09:21:44 -08:00
workqueue_internal.h