В ядре Linux устранена следующая уязвимость:
wifi: mt76: mt7921: отбросить TXRX_NOTIFY на шинах, отличных от mmio
PKT_TYPE_TXRX_NOTIFY — это событие только для mmio, но mt7921_rx_check() и
mt7921_queue_rx_skb() отправляет его в mt7921_mac_tx_free() на каждой шине.
mt7921_mac_tx_free() очищает очереди передачи DMA с помощью
mt76_queue_tx_cleanup(), который вызывает очередь_ops->tx_cleanup(). Только
Операции очереди mmio реализуют этот обратный вызов; на USB и SDIO это NULL, поэтому
TXRX_NOTIFY вызывает NULL-указатель в рабочем RX:
ОШИБКА: разыменование нулевого указателя ядра, адрес: 0000000000000000
РИП: 0010:0x0
Отслеживание вызова:
mt7921_mac_tx_free+0x64/0x310 [mt7921_common]
mt7921_rx_check+0x5f/0xf0 [mt7921_common]
mt76u_rx_worker+0x1b9/0x620 [mt76_usb]
Отбросьте событие на шинах, отличных от mmio, через mt76_is_mmio(), как показано в
commit 5683e1488aa9 («wifi: mt76: connac: не проверять статус WED для
устройства, не поддерживающие mmio»).
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: wifi: mt76: mt7921: drop TXRX_NOTIFY on non-mmio buses PKT_TYPE_TXRX_NOTIFY is an mmio-only event, but mt7921_rx_check() and mt7921_queue_rx_skb() dispatch it to mt7921_mac_tx_free() on every bus. mt7921_mac_tx_free() cleans the DMA tx queues with mt76_queue_tx_cleanup(), which calls queue_ops->tx_cleanup(). Only the mmio queue ops implement that callback; on USB and SDIO it is NULL, so a TXRX_NOTIFY there calls a NULL pointer in the RX worker: BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: 0010:0x0 Call Trace: mt7921_mac_tx_free+0x64/0x310 [mt7921_common] mt7921_rx_check+0x5f/0xf0 [mt7921_common] mt76u_rx_worker+0x1b9/0x620 [mt76_usb] Drop the event on non-mmio buses via mt76_is_mmio(), as in commit 5683e1488aa9 ("wifi: mt76: connac: do not check WED status for non-mmio devices").