linux/drivers/net/wireless
Zhi Chen 2d3b55853b ath10k: fix peer stats null pointer dereference
There was a race condition in SMP that an ath10k_peer was created but its
member sta was null. Following are procedures of ath10k_peer creation and
member sta access in peer statistics path.

    1. Peer creation:
        ath10k_peer_create()
            =>ath10k_wmi_peer_create()
                =>ath10k_wait_for_peer_created()
                ...

        # another kernel path, RX from firmware
        ath10k_htt_t2h_msg_handler()
        =>ath10k_peer_map_event()
                =>wake_up()
                # ar->peer_map[id] = peer //add peer to map

        #wake up original path from waiting
                ...
                # peer->sta = sta //sta assignment

    2.  RX path of statistics
        ath10k_htt_t2h_msg_handler()
            =>ath10k_update_per_peer_tx_stats()
                =>ath10k_htt_fetch_peer_stats()
                # peer->sta //sta accessing

Any access of peer->sta after peer was added to peer_map but before sta was
assigned could cause a null pointer issue. And because these two steps are
asynchronous, no proper lock can protect them. So both peer and sta need to
be checked before access.

Tested: QCA9984 with firmware ver 10.4-3.9.0.1-00005
Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2018-12-20 19:08:35 +02:00
..
admtek
ath ath10k: fix peer stats null pointer dereference 2018-12-20 19:08:35 +02:00
atmel atmel: Replace mdelay() with msleep() in probe_atmel_card() 2018-07-31 10:25:33 +03:00
broadcom wireless-drivers-next patches for 4.21 2018-12-03 15:44:27 -08:00
cisco wireless: airo: potential buffer overflow in sprintf() 2018-11-06 19:02:43 +02:00
intel wireless-drivers-next patches for 4.21 2018-12-03 15:44:27 -08:00
intersil prism54: islpci_dev: mark expected switch fall-through 2018-11-06 18:59:38 +02:00
marvell mwifiex: Mark expected switch fall-through 2018-11-06 18:59:39 +02:00
mediatek mt76: fix uninitialized mutex access setting rts threshold 2018-11-16 15:15:49 +02:00
quantenna qtnfmac: fix error handling in control path 2018-11-06 18:57:37 +02:00
ralink rt2x00: rt61pci: mark expected switch fall-through 2018-11-06 18:59:59 +02:00
realtek rtlwifi: rtl8192de: Fix misleading REG_MCUFWDL information 2018-11-06 19:05:00 +02:00
rsi rsi: fix spelling mistake "Initialzing" -> "Initializing" 2018-11-06 18:52:10 +02:00
st cw1200: fix small typo 2018-11-06 19:03:56 +02:00
ti wireless-drivers-next patches for 4.21 2018-12-03 15:44:27 -08:00
zydas zd1201: mark expected switch fall-through 2018-11-06 19:00:12 +02:00
Kconfig
mac80211_hwsim.c mac80211_hwsim: drop now unused work-queue from hwsim 2018-10-08 09:49:06 +02:00
mac80211_hwsim.h
Makefile
ray_cs.c ray_cs: mark expected switch fall-throughs 2018-11-06 19:00:01 +02:00
ray_cs.h
rayctl.h
rndis_wlan.c wireless-drivers: use BIT_ULL for NL80211_STA_INFO_ attribute types 2018-06-27 19:07:39 +03:00
wl3501_cs.c
wl3501.h