aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/skb_load_bytes.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2023-09-15 13:01:23 -0600
committerDavid S. Miller <davem@davemloft.net>2023-09-18 09:36:20 +0100
commite22c6ea025013ae447fe269269753ffec763dde5 (patch)
tree8267685421254a304a45634013b3d5eccdf66664 /tools/testing/selftests/bpf/prog_tests/skb_load_bytes.c
parent74fa1a82386e0bc1095ae9d13962606612514df5 (diff)
mlxsw: Use size_mul() in call to struct_size()
If, for any reason, the open-coded arithmetic causes a wraparound, the protection that `struct_size()` adds against potential integer overflows is defeated. Fix this by hardening call to `struct_size()` with `size_mul()`. Fixes: 2285ec872d9d ("mlxsw: spectrum_acl_bloom_filter: use struct_size() in kzalloc()") Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/skb_load_bytes.c')
0 files changed, 0 insertions, 0 deletions