linux/drivers/net/wireless/mediatek/mt76/mt7603
Cristian Papa 456de496b5 wifi: mt76: mt7603: initialize global station WCID
mt7603 uses a driver-private global station WCID for frames that have
neither a station nor a vif, including frames injected through a monitor
interface. Unlike the core global WCID initialized by
mt76_register_device(), this WCID is published without ever being passed
to mt76_wcid_init().

Since commit 0335c034e7 ("wifi: mt76: fix race condition related to
checking tx queue fill status"), mt76_tx() queues every such frame on the
WCID's tx_pending or tx_offchannel queue and links its tx_list. The first
injected frame therefore reaches __skb_queue_tail() with an uninitialized
sk_buff_head and dereferences a NULL prev pointer.

Initialize the WCID before publishing it.

The fix was tested on an MT7603 PCIe device. Three wildcard probe requests
were injected through a monitor interface. The hardware queue head and tail
advanced from 0 to 3 and a second radio captured the third request over the
air. No oops or reset occurred. After restoring AP mode, a 150 MB transfer
also completed without a reset.

Fixes: 0335c034e7 ("wifi: mt76: fix race condition related to checking tx queue fill status")
Cc: stable@vger.kernel.org
Signed-off-by: Cristian Papa <pcristian292@gmail.com>
Link: https://patch.msgid.link/20260904010702.16306-1-pcristian292@gmail.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-10-06 11:50:52 +02:00
..
beacon.c wifi: mt76: mt7603: free beacon SKB on error 2026-07-31 12:25:37 +00:00
core.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
debugfs.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
dma.c wifi: mt76: mt7603: file buffered frames under the TID reported to mac80211 2026-08-01 15:22:41 +00:00
eeprom.c wifi: mt76: mt7603: add 0x7592 EEPROM chip ID 2026-07-31 12:25:38 +00:00
eeprom.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
init.c wifi: mt76: mt7603: initialize global station WCID 2026-10-06 11:50:52 +02:00
Kconfig wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mac.c wifi: mt76: mt7603: restore hardware PS buffering after a service period 2026-08-01 15:22:41 +00:00
mac.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
main.c wifi: mt76: mt7603: restore hardware PS buffering after a service period 2026-08-01 15:22:41 +00:00
Makefile wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mcu.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mcu.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mt7603.h wifi: mt76: mt7603: restore hardware PS buffering after a service period 2026-08-01 15:22:41 +00:00
pci.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
regs.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
soc.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00