linux/drivers/net/ieee802154
Harshit Mogalapalli 60b2027077 ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx()
[ Upstream commit 748b2f5e82 ]

mac_len is of type unsigned, which can never be less than zero.

	mac_len = ieee802154_hdr_peek_addrs(skb, &header);
	if (mac_len < 0)
		return mac_len;

Change this to type int as ieee802154_hdr_peek_addrs() can return negative
integers, this is found by static analysis with smatch.

Fixes: 6c993779ea ("ca8210: fix mac_len negative array access")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230306191824.4115839-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-04-06 12:10:42 +02:00
..
adf7242.c ieee802154/adf7242: defer destroy_workqueue call 2022-08-23 09:55:04 +02:00
at86rf230.c Stefan Schmidt says: 2022-05-02 13:57:56 -07:00
at86rf230.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
atusb.c net: ieee802154: atusb: Call _xmit_hw_error() upon transmission error 2022-04-25 20:52:22 +02:00
atusb.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
ca8210.c ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx() 2023-04-06 12:10:42 +02:00
cc2520.c ieee802154: cc2520: Fix error return code in cc2520_hw_init() 2022-11-29 14:51:28 +01:00
fakelb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
Kconfig net: ieee802154: at86rf230: Forward Tx trac errors 2022-04-25 20:52:22 +02:00
mac802154_hwsim.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
mac802154_hwsim.h ieee802154: hwsim: add replacement for fakelb 2018-08-06 11:21:15 +02:00
Makefile ieee802154: hwsim: add replacement for fakelb 2018-08-06 11:21:15 +02:00
mcr20a.c Stefan Schmidt says: 2022-05-02 13:57:56 -07:00
mcr20a.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
mrf24j40.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00