linux-stable/net/tipc
Gustavo A. R. Silva 56e7424c6e tipc: Use size_add() in calls to struct_size()
[ Upstream commit 2506a91734 ]

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: e034c6d23b ("tipc: Use struct_size() helper")
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:08:14 +01:00
..
addr.c
addr.h
bcast.c net: tipc: fix FB_MTU eat two pages 2021-06-28 13:31:57 -07:00
bcast.h
bearer.c net: tipc: resize nlattr array to correct size 2023-06-21 15:59:18 +02:00
bearer.h tipc: add tipc_bearer_min_mtu to calculate min mtu 2023-05-24 17:36:51 +01:00
core.c tipc: fix use-after-free Read in tipc_named_reinit 2022-06-29 09:03:22 +02:00
core.h tipc: simplify the finalize work queue 2021-05-18 13:22:09 -07:00
crypto.c tipc: fix a potential deadlock on &tx->lock 2023-10-10 21:59:08 +02:00
crypto.h
diag.c
discover.c tipc: check skb_linearize() return value in tipc_disc_rcv() 2022-12-02 17:41:06 +01:00
discover.h
eth_media.c
group.c
group.h
ib_media.c
Kconfig
link.c tipc: Use size_add() in calls to struct_size() 2023-11-20 11:08:14 +01:00
link.h tipc: simplify the finalize work queue 2021-05-18 13:22:09 -07:00
Makefile
monitor.c tipc: fix shift wrapping bug in map_get() 2022-09-15 11:30:05 +02:00
monitor.h
msg.c net: tipc: replace align() with ALIGN in msg.c 2021-06-28 13:31:57 -07:00
msg.h net: tipc: fix FB_MTU eat two pages 2021-06-28 13:31:57 -07:00
name_distr.c tipc: rate limit warning for received illegal binding update 2022-02-16 12:56:30 +01:00
name_distr.h
name_table.c tipc: Fix end of loop tests for list_for_each_entry() 2022-03-02 11:47:56 +01:00
name_table.h tipc: simplify handling of lookup scope during multicast message reception 2021-06-03 14:06:39 -07:00
net.c tipc: simplify the finalize work queue 2021-05-18 13:22:09 -07:00
net.h
netlink.c
netlink.h
netlink_compat.c tipc: fix the msg->req tlv len check in tipc_nl_compat_name_table_dump_header 2022-11-16 09:58:19 +01:00
node.c tipc: stop tipc crypto on failure in tipc_node_create 2023-08-03 10:22:37 +02:00
node.h
socket.c net: deal with most data-races in sk_wait_event() 2023-05-24 17:36:42 +01:00
socket.h
subscr.c tipc:subscr.c: fix a spelling mistake 2021-06-10 13:48:43 -07:00
subscr.h
sysctl.c
topsrv.c tipc: add an extra conn_get in tipc_conn_alloc 2022-12-02 17:41:06 +01:00
topsrv.h
trace.c
trace.h
udp_media.c tipc: add tipc_bearer_min_mtu to calculate min mtu 2023-05-24 17:36:51 +01:00
udp_media.h