В ядре Linux устранена следующая уязвимость:
Wi-Fi: ath11k: использовать рабочую очередь для обработки события передачи маяка
Зафиксируйте 3a415daa3e8b («wifi: ath11k: добавьте P2P IE в шаблон маяка»)
от 28 февраля 2024 г. (linux-next) приводит к следующему статическому результату Smatch
предупреждение чекера:
драйверы/net/wireless/ath/ath11k/wmi.c:1742 ath11k_wmi_p2p_go_bcn_ie()
предупреждение: сон в атомном контексте
Причина в том, что ath11k_bcn_tx_status_event() будет напрямую вызывать
функция сна ath11k_wmi_cmd_send() во время критического чтения на стороне RCU
разделы. Трассировка вызова выглядит так:
ath11k_bcn_tx_status_event()
-> rcu_read_lock()
-> ath11k_mac_bcn_tx_event()
-> ath11k_mac_setup_bcn_tmpl()
……
-> ath11k_wmi_bcn_tmpl()
-> ath11k_wmi_cmd_send()
-> rcu_read_unlock()
Коммит 886433a98425 («ath11k: добавить поддержку изменения цвета BSS») добавил
ath11k_mac_bcn_tx_event(), зафиксируйте 01e782c89108 («ath11k: исправить предупреждение
использования RCU для ath11k_mac_get_arvif_by_vdev_id()") добавлена блокировка RCU
чтобы избежать предупреждения, но также представил эту ОШИБКУ. Используйте рабочую очередь, чтобы избежать прямого вызова ath11k_mac_bcn_tx_event().
во время критических секций RCU.
Не нужно беспокоиться об удалении vif
потому что cancel_work_sync() прекратит работу, если она не запустится или
заблокировать удаление vif до завершения текущей работы. Протестировано: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: wifi: ath11k: use work queue to process beacon tx event Commit 3a415daa3e8b ("wifi: ath11k: add P2P IE in beacon template") from Feb 28, 2024 (linux-next), leads to the following Smatch static checker warning: drivers/net/wireless/ath/ath11k/wmi.c:1742 ath11k_wmi_p2p_go_bcn_ie() warn: sleeping in atomic context The reason is that ath11k_bcn_tx_status_event() will directly call might sleep function ath11k_wmi_cmd_send() during RCU read-side critical sections. The call trace is like: ath11k_bcn_tx_status_event() -> rcu_read_lock() -> ath11k_mac_bcn_tx_event() -> ath11k_mac_setup_bcn_tmpl() …… -> ath11k_wmi_bcn_tmpl() -> ath11k_wmi_cmd_send() -> rcu_read_unlock() Commit 886433a98425 ("ath11k: add support for BSS color change") added the ath11k_mac_bcn_tx_event(), commit 01e782c89108 ("ath11k: fix warning of RCU usage for ath11k_mac_get_arvif_by_vdev_id()") added the RCU lock to avoid warning but also introduced this BUG. Use work queue to avoid directly calling ath11k_mac_bcn_tx_event() during RCU critical sections. No need to worry about the deletion of vif because cancel_work_sync() will drop the work if it doesn't start or block vif deletion until the running work is done. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 2
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.10
|
6.10.13
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.11
|
6.11.2
|