mirror-linux/drivers/net
Nagarajan Maran 068fd06148 wifi: ath11k: Fix SKB corruption in REO destination ring
[ Upstream commit f9fff67d2d ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-24 17:32:39 +01:00
..
appletalk
arcnet
bonding bonding: fix send_peer_notif overflow 2023-05-24 17:32:32 +01:00
caif
can
dsa net: dsa: mt7530: fix network connectivity with multiple CPU ports 2023-05-17 11:53:38 +02:00
ethernet net: pasemi: Fix return type of pasemi_mac_start_tx() 2023-05-24 17:32:37 +01:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154 ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx() 2023-04-06 12:10:42 +02:00
ipa net: ipa: compute DMA pool size properly 2023-04-06 12:10:48 +02:00
ipvlan ipvlan:Fix out-of-bounds caused by unclear skb->cb 2023-05-24 17:32:32 +01:00
mctp
mdio net: mdio: mvusb: Fix an error handling path in mvusb_mdio_probe() 2023-05-24 17:32:31 +01:00
netdevsim
pcs net: pcs: xpcs: remove double-read of link state when using AN 2023-05-11 23:03:18 +09:00
phy net: phy: bcm7xx: Correct read from expansion register 2023-05-24 17:32:31 +01:00
plip
ppp
pse-pd
slip
team
usb r8152: move setting r8153b_rx_agg_chg_indicate() 2023-05-17 11:53:34 +02:00
vmxnet3 vmxnet3: use gro callback when UPT is enabled 2023-04-06 12:10:52 +02:00
vxlan
wan
wireguard wireguard: timers: cast enum limits members to int in prints 2023-05-11 23:02:58 +09:00
wireless wifi: ath11k: Fix SKB corruption in REO destination ring 2023-05-24 17:32:39 +01:00
wwan net: wwan: t7xx: do not compile with -Werror 2023-05-11 23:02:58 +09:00
xen-netback xen/netback: use same error messages for same errors 2023-04-26 14:28:37 +02:00
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c net/net_failover: fix txq exceeding warning 2023-04-06 12:10:46 +02:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: add vlan_get_protocol_and_depth() helper 2023-05-24 17:32:32 +01:00
thunderbolt.c
tun.c
veth.c veth: Fix use after free in XDP_REDIRECT 2023-03-22 13:33:49 +01:00
virtio_net.c virtio_net: suppress cpu stall when free_unused_bufs 2023-05-17 11:53:38 +02:00
vrf.c
vsockmon.c
xen-netfront.c