android_kernel_xiaomi_sm8350/drivers/net/ieee802154
Christophe JAILLET 2f8da95116 net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show()
[ Upstream commit ca082f019d8fbb983f03080487946da714154bae ]

strncat() usage in adf7242_debugfs_init() is wrong.
The size given to strncat() is the maximum number of bytes that can be
written, excluding the trailing NULL.

Here, the size that is passed, DNAME_INLINE_LEN, does not take into account
the size of "adf7242-" that is already in the array.

In order to fix it, use snprintf() instead.

Fixes: 7302b9d901 ("ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-08 11:23:35 +01:00
..
adf7242.c
at86rf230.c
at86rf230.h Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
atusb.c
atusb.h
ca8210.c
cc2520.c ieee802154: cc2520: Fix error return code in cc2520_hw_init() 2022-12-14 11:30:44 +01:00
fakelb.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mac802154_hwsim.c
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
mcr20a.h
mrf24j40.c Merge remote-tracking branch 'remotes/origin/tmp-f686d9f' into msm-lahaina 2019-07-01 17:41:24 -07:00