linux/net/tls
Gustavo A. R. Silva 7c13d9cce8 tls: Use size_add() in call to struct_size()
[ Upstream commit a2713257ee ]

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: b89fec54fd ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:56:48 +01:00
..
Kconfig net/tls: Select SOCK_RX_QUEUE_MAPPING from TLS_DEVICE 2021-02-11 19:08:06 -08:00
Makefile tls: rx: async: hold onto the input skb 2022-07-18 11:24:11 +01:00
tls_device_fallback.c net/tls: fix comment typo 2023-06-22 19:38:46 -07:00
tls_device.c net: tls: avoid discarding data on record close 2023-08-06 08:32:18 +01:00
tls_main.c tcp: allow again tcp_disconnect() when threads are waiting 2023-10-25 12:16:21 +02:00
tls_proc.c tls: rx: add counter for NoPad violations 2022-07-11 19:48:33 -07:00
tls_strp.c tls: improve lockless access safety of tls_err_abort() 2023-05-26 10:35:58 +01:00
tls_sw.c tls: Use size_add() in call to struct_size() 2023-11-20 11:56:48 +01:00
tls_toe.c tls: create an internal header 2022-07-08 18:38:45 -07:00
tls.h sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
trace.c net/tls: add tracing for device/offload events 2019-10-05 16:29:00 -07:00
trace.h net/tls: add device decrypted trace point 2019-10-05 16:29:00 -07:00