aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto
diff options
context:
space:
mode:
authorDaniel Borkmann <[email protected]>2021-03-23 08:51:02 +0100
committerDaniel Borkmann <[email protected]>2021-04-16 23:51:39 +0200
commit24c109bb1537c12c02aeed2d51a347b4d6a9b76e (patch)
tree17362854c4e4a2205a112ffbe9e7c4452a8174ed /lib/crypto
parent6f55b2f2a1178856c19bbce2f71449926e731914 (diff)
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 <[email protected]> Reviewed-by: John Fastabend <[email protected]> Acked-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'lib/crypto')
0 files changed, 0 insertions, 0 deletions