В ядре Linux устранена следующая уязвимость:
wifi: cfg80211: использовать работу Wiphy для автоматического отключения владельца сокета
nl80211_netlink_notify() просматривает список беспроводных устройств cfg80211, когда
Сокет NETLINK_GENERIC освобожден. Если сокет владеет соединением,
уведомитель ставит в очередь встроенный рабочий элемент wdev->disconnect_wk. Сегодня эта работа представляет собой простую рабочую структуру. NETDEV_GOING_DOWN отменяет его, но
Уведомитель NETLINK_URELEASE, который уже обнаружен conn_owner_nlportid, может
поставить его в очередь после этого отмены. _cfg80211_unregister_wdev(), затем
удаляет wdev из списка и ждет читателей RCU, но
sync_net() не истощает работу, поставленную в очередь таким считывателем.
Вместо этого сделайте так, чтобы автоотключение работало как wiphy_work. Обратный звонок уже
требуется мьютекс Wiphy, и Wiphy_work работает под этим мьютексом. Это позволяет
демонтаж отменить ожидающую работу автоотключения, удерживая мьютекс,
без проблем cancel_work_sync() и блокировки работника.
Также отмените работу Wiphy после list_del_rcu() иsync_net(). Любой
Уведомитель NETLINK_URELEASE, который уже достиг списка wdev, затем
либо поставил работу в очередь и она удалена, либо больше не может найти wdev.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: wifi: cfg80211: use wiphy work for socket owner autodisconnect nl80211_netlink_notify() walks the cfg80211 wireless device list when a NETLINK_GENERIC socket is released. If the socket owns a connection, the notifier queues the embedded wdev->disconnect_wk work item. That work is a plain work_struct today. NETDEV_GOING_DOWN cancels it, but a NETLINK_URELEASE notifier that already observed conn_owner_nlportid can queue it after that cancel returns. _cfg80211_unregister_wdev() then removes the wdev from the list and waits for RCU readers, but synchronize_net() does not drain work queued by such a reader. Make the autodisconnect work a wiphy_work instead. The callback already needs the wiphy mutex, and wiphy_work runs under that mutex. This lets teardown cancel pending autodisconnect work while holding the mutex, without a cancel_work_sync() vs. worker locking concern. Also cancel the wiphy work after list_del_rcu() and synchronize_net(). Any NETLINK_URELEASE notifier that had already reached the wdev list has then either queued the work and it is removed, or can no longer find the wdev.
Характеристики атаки
Последствия
Строка CVSS v3.1