linux/drivers/net/wireless
Aditya Kumar Singh 57100b87c7 wifi: ath12k: fix read pointer after free in ath12k_mac_assign_vif_to_vdev()
[ Upstream commit 5a10971c76 ]

In ath12k_mac_assign_vif_to_vdev(), if arvif is created on a different
radio, it gets deleted from that radio through a call to
ath12k_mac_unassign_link_vif(). This action frees the arvif pointer.
Subsequently, there is a check involving arvif, which will result in a
read-after-free scenario.

Fix this by moving this check after arvif is again assigned via call to
ath12k_mac_assign_link_vif().

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1

Closes: https://scan5.scan.coverity.com/#/project-view/63541/10063?selectedIssue=1636423
Fixes: b5068bc918 ("wifi: ath12k: Cache vdev configs before vdev create")
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Acked-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Acked-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241210-read_after_free-v1-1-969f69c7d66c@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Amelia Crate <acrate@waldn.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-11-02 22:15:23 +09:00
..
admtek wifi: mac80211: inform the low level if drv_stop() is a suspend 2024-06-26 10:25:46 +02:00
ath wifi: ath12k: fix read pointer after free in ath12k_mac_assign_vif_to_vdev() 2025-11-02 22:15:23 +09:00
atmel wifi: at76c50x: fix use after free access in at76_disconnect 2025-04-25 10:47:37 +02:00
broadcom wifi: brcmfmac: fix use-after-free when rescheduling brcmf_btcoex_info work 2025-09-09 18:58:06 +02:00
intel wifi: iwlwifi: Remove redundant header files 2025-10-15 12:00:09 +02:00
intersil wifi: p54: prevent buffer-overflow in p54_rx_eeprom_readback() 2025-06-27 11:11:14 +01:00
marvell wifi: mwifiex: send world regulatory domain to driver 2025-10-15 12:00:08 +02:00
mediatek wifi: mt76: mt7921u: Add VID/PID for Netgear A7500 2025-10-19 16:33:58 +02:00
microchip wifi: wilc1000: avoid buffer overflow in WID string configuration 2025-09-25 11:13:41 +02:00
purelifi wifi: plfxlc: Fix error handling in usb driver probe 2025-08-15 12:13:45 +02:00
quantenna wifi: cfg80211: handle DFS per link 2024-09-06 13:01:05 +02:00
ralink wifi: rt2x00: fix remove callback type mismatch 2025-07-17 18:37:17 +02:00
realtek wifi: rtw89: avoid possible TX wait initialization race 2025-10-23 16:20:41 +02:00
rsi wifi: rsi: Remove an unused field in struct rsi_debugfs 2024-09-09 15:30:49 +03:00
silabs wifi: wfx: Fix error handling in wfx_core_init() 2024-12-05 14:01:51 +01:00
st wifi: cw1200: cap SSID length in cw1200_do_join() 2025-09-09 18:58:12 +02:00
ti wifi: wl1251: fix memory leak in wl1251_tx_work 2025-04-25 10:47:37 +02:00
virtual wifi: virt_wifi: Fix page fault on connect 2025-10-02 13:44:08 +02:00
zydas wifi: zd1211rw: Fix potential NULL pointer dereference in zd_mac_tx_to_dev() 2025-07-17 18:37:16 +02:00
Kconfig wifi: remove orphaned rndis_wlan driver 2023-10-30 19:30:33 +02:00
Makefile wifi: remove orphaned rndis_wlan driver 2023-10-30 19:30:33 +02:00