mirror_ubuntu-kernels/drivers/net/wireless
Nagarajan Maran f9fff67d2d wifi: ath11k: Fix SKB corruption in REO destination ring
While running traffics for a long time, randomly an RX descriptor
filled with value "0" from REO destination ring is received.
This descriptor which is invalid causes the wrong SKB (SKB stored in
the IDR lookup with buffer id "0") to be fetched which in turn
causes SKB memory corruption issue and the same leads to crash
after some time.

Changed the start id for idr allocation to "1" and the buffer id "0"
is reserved for error validation. Introduced Sanity check to validate
the descriptor, before processing the SKB.

Crash Signature :

Unable to handle kernel paging request at virtual address 3f004900
PC points to "b15_dma_inv_range+0x30/0x50"
LR points to "dma_cache_maint_page+0x8c/0x128".
The Backtrace obtained is as follows:
[<8031716c>] (b15_dma_inv_range) from [<80313a4c>] (dma_cache_maint_page+0x8c/0x128)
[<80313a4c>] (dma_cache_maint_page) from [<80313b90>] (__dma_page_dev_to_cpu+0x28/0xcc)
[<80313b90>] (__dma_page_dev_to_cpu) from [<7fb5dd68>] (ath11k_dp_process_rx+0x1e8/0x4a4 [ath11k])
[<7fb5dd68>] (ath11k_dp_process_rx [ath11k]) from [<7fb53c20>] (ath11k_dp_service_srng+0xb0/0x2ac [ath11k])
[<7fb53c20>] (ath11k_dp_service_srng [ath11k]) from [<7f67bba4>] (ath11k_pci_ext_grp_napi_poll+0x1c/0x78 [ath11k_pci])
[<7f67bba4>] (ath11k_pci_ext_grp_napi_poll [ath11k_pci]) from [<807d5cf4>] (__napi_poll+0x28/0xb8)
[<807d5cf4>] (__napi_poll) from [<807d5f28>] (net_rx_action+0xf0/0x280)
[<807d5f28>] (net_rx_action) from [<80302148>] (__do_softirq+0xd0/0x280)
[<80302148>] (__do_softirq) from [<80320408>] (irq_exit+0x74/0xd4)
[<80320408>] (irq_exit) from [<803638a4>] (__handle_domain_irq+0x90/0xb4)
[<803638a4>] (__handle_domain_irq) from [<805bedec>] (gic_handle_irq+0x58/0x90)
[<805bedec>] (gic_handle_irq) from [<80301a78>] (__irq_svc+0x58/0x8c)

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1

Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230403191533.28114-1-quic_nmaran@quicinc.com
2023-04-19 17:24:10 +03:00
..
admtek wifi: mac80211: add wake_tx_queue callback to drivers 2022-10-10 11:00:03 +02:00
ath wifi: ath11k: Fix SKB corruption in REO destination ring 2023-04-19 17:24:10 +03:00
atmel wifi: atmel: Fix atmel_private_handler array size 2022-11-01 12:30:22 +02:00
broadcom wifi: brcmfmac: slab-out-of-bounds read in brcmf_get_assoc_ies() 2023-03-13 15:45:56 +02:00
cisco wireless-next patches for v6.2 2022-11-18 11:44:36 +00:00
intel wifi: ipw2x00: convert ipw_fw_error->elem to flexible array[] 2023-03-13 15:44:15 +02:00
intersil net: add missing includes of linux/net.h 2023-01-27 11:19:45 +00:00
legacy wifi: move raycs, wl3501 and rndis_wlan to legacy directory 2023-03-13 15:42:14 +02:00
marvell wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces 2023-02-14 12:34:51 +01:00
mediatek wifi: mt76: usb: fix use-after-free in mt76u_free_rx_queue 2023-02-26 19:52:55 +02:00
microchip Merge wireless into wireless-next 2023-01-17 13:36:25 +02:00
purelifi wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx() 2022-11-28 15:56:17 +02:00
quantenna wifi: qtnfmac: use struct_size and size_sub for payload length 2023-03-13 15:44:29 +02:00
ralink wifi: rt2x00: Remove useless else if 2023-01-16 18:23:49 +02:00
realtek wifi: rtw88: fix memory leak in rtw_usb_probe() 2023-03-13 15:45:30 +02:00
rsi wifi: rsi: Avoid defines prefixed with CONFIG 2023-02-13 19:24:10 +02:00
silabs wifi: wfx: Remove some dead code 2023-02-22 14:28:27 +02:00
st wireless-next patches for v6.2 2022-10-28 18:31:40 -07:00
ti wifi: wl1251: Fix a typo ("boradcast") 2023-02-13 17:14:41 +02:00
virtual wifi: move mac80211_hwsim and virt_wifi to virtual directory 2023-03-13 15:42:14 +02:00
zydas wifi: zd1211rw: remove redundant decls 2023-02-13 19:25:47 +02:00
Kconfig wifi: move raycs, wl3501 and rndis_wlan to legacy directory 2023-03-13 15:42:14 +02:00
Makefile wifi: move raycs, wl3501 and rndis_wlan to legacy directory 2023-03-13 15:42:14 +02:00