mirror_ubuntu-kernels/drivers/net/wireless/mediatek/mt7601u
Azeem Shaikh 7edbd53a58 wifi: mt7601u: 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 DEV_ASSIGN is only used by
TRACE macros and the return values are ignored.

[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>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230613003458.3538812-1-azeemshaikh38@gmail.com
2023-06-15 10:46:41 +03:00
..
core.c
debugfs.c wifi: mt7601u: delete dead code checking debugfs returns 2023-05-05 15:03:09 +03:00
dma.c wifi: mt7601u: fix an integer underflow 2023-01-16 18:23:26 +02:00
dma.h
eeprom.c wifi: mt7601u: eeprom: fix clang -Wformat warning 2022-07-18 14:53:02 +03:00
eeprom.h
init.c mt7601u: enable TDLS support 2021-04-11 12:30:20 +03:00
initvals_phy.h
initvals.h
Kconfig
mac.c mac80211: prepare sta handling for MLO support 2022-04-11 16:42:03 +02:00
mac.h
main.c wifi: mac80211: add wake_tx_queue callback to drivers 2022-10-10 11:00:03 +02:00
Makefile
mcu.c mt7601u: add missing release on skb in mt7601u_mcu_msg_send 2020-08-02 18:11:34 +03:00
mcu.h
mt7601u.h wifi: mac80211: change QoS settings API to take link into account 2022-07-15 11:43:15 +02:00
phy.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
regs.h
trace.c
trace.h wifi: mt7601u: replace strlcpy() with strscpy() 2023-06-15 10:46:41 +03:00
tx.c wifi: mac80211: change QoS settings API to take link into account 2022-07-15 11:43:15 +02:00
usb.c mt7601u: add USB device ID for some versions of XiaoDu WiFi Dongle. 2021-06-22 18:25:17 +03:00
usb.h
util.c