1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/microchip/wilc1000
Ajay Singh 05ac1a198a wifi: wilc1000: use vmm_table as array in wilc struct
Enabling KASAN and running some iperf tests raises some memory issues with
vmm_table:

BUG: KASAN: slab-out-of-bounds in wilc_wlan_handle_txq+0x6ac/0xdb4
Write of size 4 at addr c3a61540 by task wlan0-tx/95

KASAN detects that we are writing data beyond range allocated to vmm_table.
There is indeed a mismatch between the size passed to allocator in
wilc_wlan_init, and the range of possible indexes used later: allocation
size is missing a multiplication by sizeof(u32)

Fixes: 40b717bfce ("wifi: wilc1000: fix DMA on stack objects")
Cc: stable@vger.kernel.org
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231017-wilc1000_tx_oops-v3-1-b2155f1f7bee@bootlin.com
2023-10-19 10:30:34 +03:00
..
cfg80211.c wifi: cfg80211: split struct cfg80211_ap_settings 2023-09-25 09:00:39 +02:00
cfg80211.h wifi: wilc1000: Remove unused declarations 2023-08-23 14:12:17 +03:00
fw.h wifi: wilc1000: add IGTK support 2022-05-30 14:18:00 +03:00
hif.c wifi: wilc1000: fix for absent RSN capabilities WFA testcase 2023-05-11 15:52:58 +03:00
hif.h wifi: wilc1000: Increase ASSOC response buffer 2023-05-11 15:53:44 +03:00
Kconfig wilc1000: Add support for enabling CRC 2021-04-17 20:47:40 +03:00
Makefile wilc1000: use API version number info along with firmware filename 2020-07-14 20:52:27 +03:00
mon.c wifi: move from strlcpy with unused retval to strscpy 2022-09-02 11:47:22 +03:00
netdev.c wifi: wilc1000: add back-off algorithm to balance tx queue packets 2023-09-21 09:30:11 +03:00
netdev.h wifi: wilc1000: add back-off algorithm to balance tx queue packets 2023-09-21 09:30:11 +03:00
sdio.c wifi: wilc1000: remove use of has_thrpt_enh3 flag 2023-08-01 17:46:37 +03:00
spi.c wifi: wilc1000: add SPI commands retry mechanism 2023-08-01 17:48:05 +03:00
wlan.c wifi: wilc1000: use vmm_table as array in wilc struct 2023-10-19 10:30:34 +03:00
wlan.h wifi: wilc1000: add 'isinit' flag for SDIO bus similar to SPI 2022-07-27 15:58:10 +03:00
wlan_cfg.c wifi: wilc1000: get correct length of string WID from received config packet 2022-07-27 15:58:10 +03:00
wlan_cfg.h wifi: wilc1000: Increase ASSOC response buffer 2023-05-11 15:53:44 +03:00
wlan_if.h wifi: wilc1000: Increase ASSOC response buffer 2023-05-11 15:53:44 +03:00