public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] wifi: mt76: validate WCID index before WTBL lookup
@ 2026-04-06 18:44 Joshua Klinesmith
  2026-04-06 18:44 ` [PATCH 1/2] wifi: mt76: mt7915: " Joshua Klinesmith
  2026-04-06 18:44 ` [PATCH 2/2] wifi: mt76: mt7996: " Joshua Klinesmith
  0 siblings, 2 replies; 3+ messages in thread
From: Joshua Klinesmith @ 2026-04-06 18:44 UTC (permalink / raw)
  To: nbd, lorenzo, ryder.lee
  Cc: shayne.chen, sean.wang, linux-wireless, linux-kernel,
	Joshua Klinesmith

The mt7915 and mt7996 drivers do not validate WCID indices
extracted from hardware TX free events and TX status reports
before using them for WTBL MMIO register accesses. The hardware
WCID field is 10 bits wide (max 1023) but the actual WTBL
capacity is only 288 (MT7915), 544 (MT7916), or variable
(MT7996). An out-of-range index causes a kernel data abort.

Reverse engineering of the MediaTek WA co-processor firmware
(NDS32/FreeRTOS) confirmed that the firmware validates WCID
for its internal table (< 786) but still emits out-of-range
values in DMA descriptors sent to the host driver.

The mt7615, mt7921, and mt7925 drivers already have these
bounds checks. This series adds the same validation to mt7915
and mt7996.

Joshua Klinesmith (2):
  wifi: mt76: mt7915: validate WCID index before WTBL lookup
  wifi: mt76: mt7996: validate WCID index before WTBL lookup

 drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 6 ++++++
 drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 6 ++++++
 2 files changed, 12 insertions(+)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-06 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-06 18:44 [PATCH 0/2] wifi: mt76: validate WCID index before WTBL lookup Joshua Klinesmith
2026-04-06 18:44 ` [PATCH 1/2] wifi: mt76: mt7915: " Joshua Klinesmith
2026-04-06 18:44 ` [PATCH 2/2] wifi: mt76: mt7996: " Joshua Klinesmith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox