linux/drivers/net/wireless/mediatek/mt76/mt7615
Felix Fietkau 98aff74779 wifi: mt76: mt7615: fix NULL deref in mt7615_mac_set_rates
mt7615_tx() falls back to the vif BSS wcid when mac80211 hands a frame
over without a station, e.g. while a station is being torn down, and to
the global wcid when there is no vif either. Both tx_prepare_skb
implementations derive a mt7615_sta from that wcid unconditionally and,
if the rate control probe flag is set, pass it to mt7615_mac_set_rates(),
which dereferences the NULL vif backpointer of the per-vif embedded sta:

  Unable to handle kernel read from unreadable memory at virtual
  address 0000000000000002
  ...
  pc : mt7615_mac_set_rates
  lr : mt7615_tx_prepare_skb

Neither entry is rate controlled by mac80211: the embedded sta has an
empty rate set, and for the global wcid the container_of does not yield a
valid mt7615_sta at all. Only resolve the sta for wcids that belong to a
station.

Reported-by: Chad Monroe <chad@monroe.io>
Link: https://patch.msgid.link/20260724124813.3961474-23-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-08-01 14:49:42 +00:00
..
debugfs.c wifi: mt76: Drop unneeded mt76_register_debugfs_fops() return checks 2026-06-09 10:34:02 +00:00
dma.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
eeprom.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
eeprom.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
init.c wifi: mt76: mt7996: add missing max_remain_on_channel_duration 2026-06-09 10:15:20 +00:00
Kconfig wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mac.c wifi: mt76: mt7615: drop TXRX_NOTIFY on non-mmio buses 2026-07-22 06:08:54 +00:00
mac.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
main.c wifi: mt76: mt7615: avoid waiting for mac work under the mt76 mutex 2026-07-31 12:25:36 +00:00
Makefile wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mcu.c wifi: mt76: mt7615: fix use_cts_prot support 2026-03-23 09:21:25 +00:00
mcu.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mmio.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mt7615_trace.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mt7615.h wifi: mt76: mt7615: fix use_cts_prot support 2026-03-23 09:21:25 +00:00
pci_init.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
pci_mac.c wifi: mt76: mt7615: fix NULL deref in mt7615_mac_set_rates 2026-08-01 14:49:42 +00:00
pci.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
regs.h wifi: mt76: mt7615: fix use_cts_prot support 2026-03-23 09:21:25 +00:00
sdio_mcu.c
sdio.c 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
testmode.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
trace.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
usb_mcu.c
usb_sdio.c wifi: mt76: mt7615: fix NULL deref in mt7615_mac_set_rates 2026-08-01 14:49:42 +00:00
usb.c wifi: mt76: drop redundant device reference 2026-06-09 10:15:20 +00:00