android_kernel_motorola_sm6225/net/tipc
Lin Ma 403353c4ef net: tipc: resize nlattr array to correct size
[ Upstream commit 44194cb1b6045dea33ae9a0d54fb7e7cd93a2e09 ]

According to nla_parse_nested_deprecated(), the tb[] is supposed to the
destination array with maxtype+1 elements. In current
tipc_nl_media_get() and __tipc_nl_media_set(), a larger array is used
which is unnecessary. This patch resize them to a proper size.

Fixes: 1e55417d8f ("tipc: add media set to new netlink api")
Fixes: 46f15c6794 ("tipc: add media get/dump to new netlink api")
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Reviewed-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
Link: https://lore.kernel.org/r/20230614120604.1196377-1-linma@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-21 15:39:59 +02:00
..
addr.c
addr.h
bcast.c
bcast.h
bearer.c net: tipc: resize nlattr array to correct size 2023-06-21 15:39:59 +02:00
bearer.h
core.c
core.h
diag.c
discover.c tipc: check skb_linearize() return value in tipc_disc_rcv() 2022-12-08 11:18:30 +01:00
discover.h
eth_media.c
group.c
group.h
ib_media.c
Kconfig
link.c tipc: Fix potential OOB in tipc_link_proto_rcv() 2022-12-14 11:28:30 +01:00
link.h
Makefile
monitor.c tipc: fix shift wrapping bug in map_get() 2022-09-15 12:17:05 +02:00
monitor.h
msg.c
msg.h
name_distr.c
name_distr.h
name_table.c
name_table.h
net.c
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-25 17:40:17 +01:00
node.c
node.h
socket.c tipc: improve function tipc_wait_for_cond() 2023-03-17 08:31:44 +01:00
socket.h
subscr.c
subscr.h
sysctl.c
topsrv.c tipc: add an extra conn_get in tipc_conn_alloc 2022-12-08 11:18:30 +01:00
topsrv.h
udp_media.c
udp_media.h