diff options
author | 2021-03-23 08:51:02 +0100 | |
---|---|---|
committer | 2021-04-16 23:51:39 +0200 | |
commit | 24c109bb1537c12c02aeed2d51a347b4d6a9b76e (patch) | |
tree | 17362854c4e4a2205a112ffbe9e7c4452a8174ed /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | bpf: Move off_reg into sanitize_ptr_alu (diff) | |
download | wireguard-linux-24c109bb1537c12c02aeed2d51a347b4d6a9b76e.tar.xz wireguard-linux-24c109bb1537c12c02aeed2d51a347b4d6a9b76e.zip |
bpf: Ensure off_reg has no mixed signed bounds for all types
The mixed signed bounds check really belongs into retrieve_ptr_limit()
instead of outside of it in adjust_ptr_min_max_vals(). The reason is
that this check is not tied to PTR_TO_MAP_VALUE only, but to all pointer
types that we handle in retrieve_ptr_limit() and given errors from the latter
propagate back to adjust_ptr_min_max_vals() and lead to rejection of the
program, it's a better place to reside to avoid anything slipping through
for future types. The reason why we must reject such off_reg is that we
otherwise would not be able to derive a mask, see details in 9d7eceede769
("bpf: restrict unknown scalars of mixed signed bounds for unprivileged").
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions