diff options
author | Mickaël Salaün <mic@digikod.net> | 2017-08-07 20:45:20 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-08 18:11:17 -0700 |
commit | 752ba56fb130b27c32c2ae6c82c8ef246b22106c (patch) | |
tree | 5ee1b20c2245bc4a75281a2323807642793ed49b /tools/testing/selftests/bpf/test_xdp_redirect.c | |
parent | bpf: Move check_uarg_tail_zero() upward (diff) | |
download | linux-dev-752ba56fb130b27c32c2ae6c82c8ef246b22106c.tar.xz linux-dev-752ba56fb130b27c32c2ae6c82c8ef246b22106c.zip |
bpf: Extend check_uarg_tail_zero() checks
The function check_uarg_tail_zero() was created from bpf(2) for
BPF_OBJ_GET_INFO_BY_FD without taking the access_ok() nor the PAGE_SIZE
checks. Make this checks more generally available while unlikely to be
triggered, extend the memory range check and add an explanation
including why the ToCToU should not be a security concern.
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Kees Cook <keescook@chromium.org>
Cc: Martin KaFai Lau <kafai@fb.com>
Link: https://lkml.kernel.org/r/CAGXu5j+vRGFvJZmjtAcT8Hi8B+Wz0e1b6VKYZHfQP_=DXzC4CQ@mail.gmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_xdp_redirect.c')
0 files changed, 0 insertions, 0 deletions