Haimin Zhang 3c9a75b3d2 net/ieee802154: fix uninit value bug in dgram_sendmsg
[ Upstream commit 94160108a70c8af17fa1484a37e05181c0e094af ]

There is uninit value bug in dgram_sendmsg function in
net/ieee802154/socket.c when the length of valid data pointed by the
msg->msg_name isn't verified.

We introducing a helper function ieee802154_sockaddr_check_size to
check namelen. First we check there is addr_type in ieee802154_addr_sa.
Then, we check namelen according to addr_type.

Also fixed in raw_bind, dgram_bind, dgram_connect.

Signed-off-by: Haimin Zhang <tcs_kernel@tencent.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-15 07:54:37 +02:00
..
2021-06-10 13:37:09 +02:00
2022-01-05 12:37:44 +01:00
2019-04-19 14:07:40 -07:00
2019-10-23 20:13:22 -07:00
2020-07-22 09:32:46 +02:00
2021-08-04 12:27:39 +02:00
2019-04-22 21:47:25 -07:00
2022-07-21 20:59:20 +02:00
2019-06-19 11:23:13 -04:00
2022-03-19 13:40:16 +01:00