diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2023-09-15 13:12:38 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-09-18 09:37:23 +0100 |
commit | a2713257ee2be22827d7bc248302d408c91bfb95 (patch) | |
tree | e8508398caef6cdeb5badf494831d06bf6f497fc /tools/testing/selftests/bpf/prog_tests/skb_load_bytes.c | |
parent | e22c6ea025013ae447fe269269753ffec763dde5 (diff) |
tls: Use size_add() 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_add()`.
Fixes: b89fec54fd61 ("tls: rx: wrap decrypt params in a struct")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
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