diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2019-01-03 00:58:30 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-01-03 01:01:24 +0100 |
commit | 0d6303db7970e6f56ae700fa07e11eb510cda125 (patch) | |
tree | 6b9b3ae39535460fef0d17fdb103279ddc726be3 /kernel/workqueue_internal.h | |
parent | bpf: enable access to ax register also from verifier rewrite (diff) | |
download | linux-0d6303db7970e6f56ae700fa07e11eb510cda125.tar.xz linux-0d6303db7970e6f56ae700fa07e11eb510cda125.zip |
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>
Diffstat (limited to 'kernel/workqueue_internal.h')
0 files changed, 0 insertions, 0 deletions