linux/net/ieee802154
Azeem Shaikh cd91250306 ieee802154: Replace strlcpy with strscpy
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().

Direct replacement is safe here since the return values
from the helper macros are ignored by the callers.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230613003326.3538391-1-azeemshaikh38@gmail.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
2023-06-16 22:14:24 +02:00
..
6lowpan net: ipv6: Handle delivery_time in ipv6 defrag 2022-03-03 14:38:48 +00:00
core.c net: mac802154: Introduce a tx queue flushing mechanism 2022-06-10 09:48:40 +02:00
core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
header_ops.c mac802154: Handle basic beaconing 2023-01-28 13:55:10 +01:00
ieee802154.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netlink.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
nl802154.c net: ieee802154: remove an unnecessary null pointer check 2023-03-17 09:13:53 +01:00
nl802154.h ieee802154: Add support for user beaconing requests 2023-01-28 13:51:22 +01:00
nl_policy.c nl802154: add missing attribute validation for dev_type 2020-03-03 13:28:48 -08:00
nl-mac.c ieee802154: fix error return code in ieee802154_llsec_getparams() 2021-06-03 10:59:49 +02:00
nl-phy.c net: ieee802154: Use the IEEE802154_MAX_PAGE define when relevant 2022-01-28 11:23:30 +01:00
rdev-ops.h ieee802154: Add support for user beaconing requests 2023-01-28 13:51:22 +01:00
socket.c net: ieee802154: fix error return code in dgram_bind() 2022-10-07 09:29:17 +02:00
sysfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
sysfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.c ieee802154: Add trace events for rdev->ops 2015-04-30 18:48:09 +02:00
trace.h ieee802154: Replace strlcpy with strscpy 2023-06-16 22:14:24 +02:00