OpenCloudOS-Kernel/drivers/net/wireless/ti/wlcore
Colin Ian King a9a4c080de wlcore: Fix buffer overrun by snprintf due to incorrect buffer size
The size of the buffer than can be written to is currently incorrect, it is
always the size of the entire buffer even though the snprintf is writing
as position pos into the buffer. Fix this by setting the buffer size to be
the number of bytes left in the buffer, namely sizeof(buf) - pos.

Addresses-Coverity: ("Out-of-bounds access")
Fixes: 7b0e2c4f6b ("wlcore: fix overlapping snprintf arguments in debugfs")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210419141405.180582-1-colin.king@canonical.com
2021-04-22 17:39:29 +03:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
acx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
acx.h wireless: ti: Replace zero-length array with flexible-array member 2020-03-23 18:55:04 +02:00
boot.c wlcore: fix overlapping snprintf arguments in debugfs 2021-04-17 21:01:56 +03:00
boot.h wireless: ti: Replace zero-length array with flexible-array member 2020-03-23 18:55:04 +02:00
cmd.c wlcore: cmd: Fix some parameter description disparities 2020-09-01 12:02:38 +03:00
cmd.h Revert "wlcore: Adding suppoprt for IGTK key in wlcore driver" 2020-09-07 11:39:32 +03:00
conf.h wireless: ti: Replace zero-length array with flexible-array member 2020-03-23 18:55:04 +02:00
debug.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
debugfs.c wlcore: Remove unused function no_write_handler() 2020-09-22 10:14:42 +03:00
debugfs.h wlcore: Fix buffer overrun by snprintf due to incorrect buffer size 2021-04-22 17:39:29 +03:00
event.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
event.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
hw_ops.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
ini.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
init.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
init.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
io.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
io.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
main.c wlcore: Fix command execute failure 19 for wl12xx 2021-01-25 16:42:12 +02:00
ps.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
ps.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
rx.c timekeeping: Use proper clock specifier names in functions 2019-06-22 12:11:27 +02:00
rx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
scan.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
scan.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
sdio.c net: wireless: ti: remove local VENDOR_ID and DEVICE_ID definitions 2019-11-15 09:59:19 +01:00
spi.c wlcore: spi: Demote a non-compliant function header, fix another 2020-11-07 18:05:38 +02:00
sysfs.c wlcore: Switch to using the new API kobj_to_dev() 2020-12-02 21:25:39 +02:00
sysfs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
testmode.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
testmode.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
tx.c wlcore: fix runtime pm imbalance in wl1271_tx_work 2020-05-29 20:31:03 +03:00
tx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
vendor_cmd.c wireless: fix nl80211 vendor commands 2019-07-20 21:37:26 +02:00
vendor_cmd.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wl12xx_80211.h wireless: ti: Replace zero-length array with flexible-array member 2020-03-23 18:55:04 +02:00
wlcore.h wlcore: Fix command execute failure 19 for wl12xx 2021-01-25 16:42:12 +02:00
wlcore_i.h wlcore: mesh: Add support for RX Broadcast Key 2020-01-26 17:33:40 +02:00