В ядре Linux устранена следующая уязвимость:
mac802154: хранить ссылку на интерфейс в рабочей программе сканирования.
mac802154_scan_worker() захватывает подинтерфейс сканирования под RCU
а затем продолжает разыменовывать sdata->dev после rcu_read_unlock() и
вне РТНЛ -- в следах отказов, в
mac802154_transmit_beacon_req() (skb->dev = sdata->dev), а в
очистка end_scan. Ничто не поддерживает работу этого netdev среди рабочего
итерация. Одновременное удаление DEL_INTERFACE или PHY может отменить регистрацию интерфейса.
как только рабочий отбрасывает rtnl между двумя своими drv_set_channel()
разделы. unregister_netdevice() асинхронно освобождает netdev от
netdev_run_todo() с уже удаленным rtnl, поэтому ни удержание
rtnl, ни флаг IEEE802154_IS_SCANNING для каждого PHY не предотвращает устаревший рабочий процесс
итерация от разыменования освобожденного netdev - KASAN
slab-use-after-free, достижимый с помощью гонок TRIGGER_SCAN против
DEL_INTERFACE (оба CAP_NET_ADMIN).
Закрепите netdev с помощью netdev_hold(), пока блокировка чтения RCU все еще удерживается,
и выпускайте его на каждом рабочем выходе.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: mac802154: hold an interface reference across the scan worker mac802154_scan_worker() captures the scanning sub-interface under RCU and then keeps dereferencing sdata->dev after rcu_read_unlock() and outside the rtnl -- in the failure traces, in mac802154_transmit_beacon_req() (skb->dev = sdata->dev), and in the end_scan cleanup. Nothing keeps that netdev alive across the worker iteration. A concurrent DEL_INTERFACE or PHY removal can unregister the interface once the worker drops the rtnl between its two drv_set_channel() sections. unregister_netdevice() frees the netdev asynchronously from netdev_run_todo() with the rtnl already dropped, so neither holding the rtnl nor the per-PHY IEEE802154_IS_SCANNING flag prevents a stale worker iteration from dereferencing the freed netdev -- a KASAN slab-use-after-free, reachable by racing TRIGGER_SCAN against DEL_INTERFACE (both CAP_NET_ADMIN). Pin the netdev with netdev_hold() while the RCU read lock is still held, and release it at every worker exit.