В ядре Linux устранена следующая уязвимость:
wifi: mac80211: свободные AP_VLAN bc_buf SKB вне блокировки IRQ
ieee80211_do_stop() удаляет пакеты AP_VLAN из родительской точки доступа.
ps->bc_buf, удерживая ps->bc_buf.lock с отключенными IRQ. Тогда это
вызывает ieee80211_free_txskb() перед снятием блокировки.
ieee80211_free_txskb() — это не просто пассивный выпуск SKB. Для СКБ с
Статус TX указывает, что он может сообщить о пропущенном кадре через cfg80211/nl80211,
и этот путь может достигать передачи по сети.
Это та же самая причина
ожидающая очистка очереди в ieee80211_do_stop() уже отключает SKB
под блокировкой очереди и освобождает их после восстановления состояния IRQ. Сценарий с ошибкой предполагает два пути, каждый столбец показывает
порядок внутри этого пути:
Управление AP_VLAN TX: остановка AP_VLAN:
1. прикрепить состояние ACK-статуса 1. очистить рабочее состояние
2. поставить в очередь многоадресную рассылку SKB на 2. взять ps->bc_buf.lock с IRQ
родительский ps->bc_buf отключен
3. отвязать AP_VLAN SKB
4. вызовите ieee80211_free_txskb()
Отсоедините соответствующие SKB AP_VLAN от ps->bc_buf под существующей блокировкой,
но переместите их в локальную свободную очередь. Снимите блокировку и восстановите состояние IRQ
перед вызовом ieee80211_free_txskb().
ВНИМАНИЕ: kernel/softirq.c:430 по адресу __local_bh_enable_ip.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: wifi: mac80211: free AP_VLAN bc_buf SKBs outside IRQ lock ieee80211_do_stop() removes AP_VLAN packets from the parent AP ps->bc_buf while holding ps->bc_buf.lock with IRQs disabled. It then calls ieee80211_free_txskb() before dropping the lock. ieee80211_free_txskb() is not just a passive SKB release. For SKBs with TX status state it can report a dropped frame through cfg80211/nl80211, and that path can reach netlink tap transmit. This is the same reason the pending queue cleanup in ieee80211_do_stop() already unlinks SKBs under the queue lock and frees them after IRQ state is restored. The buggy scenario involves two paths, with each column showing the order within that path: AP_VLAN management TX: AP_VLAN stop: 1. attach ACK-status state 1. clear the running state 2. queue a multicast SKB on 2. take ps->bc_buf.lock with IRQs parent ps->bc_buf disabled 3. unlink the AP_VLAN SKB 4. call ieee80211_free_txskb() Unlink matching AP_VLAN SKBs from ps->bc_buf under the existing lock, but move them to a local free queue. Drop the lock and restore IRQ state before calling ieee80211_free_txskb(). WARNING: kernel/softirq.c:430 at __local_bh_enable_ip