Ad

CVE-2026-31731

HIGH CVSS 3.1: 7,8 EPSS 0.10%
Обновлено 19 октября 2026
Linux
Параметр Значение
CVSS 7,8 (HIGH)
Уязвимые версии 6.13 — 6.19.12
Устранено в версии 6.12.83
Тип уязвимости CWE-416 (Использование памяти после освобождения), CWE-362 (Состояние гонки)
Поставщик Linux
Публичный эксплойт Нет

В ядре Linux устранена следующая уязвимость: Thermal: core: устранение гонок по удалению тепловой зоны с возобновлением Поскольку Thermal_zone_pm_complete() и Thermal_zone_device_resume() повторно инициализировать отложенную работу poll_queue для данной тепловой зоны, метод cancel_delayed_work_sync() в Thermal_zone_device_unregister() могут пропустить некоторые уже запущенные рабочие элементы, а термическая зона может быть освобождены преждевременно [1]. Есть два неудачных сценария, оба из которых начинаются с запуск Thermal_pm_notify_complete() непосредственно перед вызовом Thermal_zone_device_unregister() для одной из тепловых зон. В первом сценарии рабочий элемент уже выполняется для данная тепловая зона при вызове Thermal_pm_notify_complete() Thermal_zone_pm_complete() для этой тепловой зоны и продолжает запускается при запуске Thermal_zone_device_unregister().

Поскольку очередь_опроса отложенная работа была повторно инициализирована функцией Thermal_pm_notify_complete(), выполняемый рабочий элемент будет пропущен функцией cancel_delayed_work_sync() в Thermal_zone_device_unregister(), и если он продолжает работать после При освобождении объекта тепловой зоны произойдет использование после освобождения. Во втором сценарии функция Thermal_zone_device_resume() поставлена в очередь Thermal_pm_notify_complete() запускается сразу после Thermal_zone_exit(). вызванный функцией Thermal_zone_device_unregister(), вернулся. Очередь_опроса отложенная работа повторно инициализируется им до того, как будет вызвана функция cancel_delayed_work_sync(). вызывается функцией Thermal_zone_device_unregister(), поэтому он может продолжать работу после освобождения объекта тепловой зоны, что также приводит к использовать после бесплатно.

Устраните первый сценарий отказа, обеспечив отсутствие тепловых работ. элементы будут запускаться при вызове Thermal_pm_notify_complete(). Для этого сначала переместите вызов cancel_delayed_work() из Thermal_zone_pm_complete() в Thermal_zone_pm_prepare(), чтобы предотвратить новая работа от поступления в рабочую очередь в дальнейшем. Далее переключитесь переход на использование выделенной рабочей очереди для тепловых событий и обновлений код в Thermal_pm_notify() для очистки этой рабочей очереди после Thermal_pm_notify_prepare() вернулся, который позаботится о все оставшиеся термические работы уже находятся в очереди работ (этот остаток работа в любом случае не принесет никакой пользы, потому что все тепловые зоны были помечены как приостановленные).

Второй сценарий неудачи решается добавлением проверки tz->state. в Thermal_zone_device_resume(), чтобы предотвратить его повторную инициализацию работа poll_queue задерживается, если тепловая зона исчезает. Обратите внимание, что приведенные выше изменения также облегчат перемещение кнопки приостановки. и возобновление работы тепловых зон ближе к приостановке и возобновлению работы устройств, соответственно.

Показать оригинальное описание (EN)

In the Linux kernel, the following vulnerability has been resolved: thermal: core: Address thermal zone removal races with resume Since thermal_zone_pm_complete() and thermal_zone_device_resume() re-initialize the poll_queue delayed work for the given thermal zone, the cancel_delayed_work_sync() in thermal_zone_device_unregister() may miss some already running work items and the thermal zone may be freed prematurely [1]. There are two failing scenarios that both start with running thermal_pm_notify_complete() right before invoking thermal_zone_device_unregister() for one of the thermal zones. In the first scenario, there is a work item already running for the given thermal zone when thermal_pm_notify_complete() calls thermal_zone_pm_complete() for that thermal zone and it continues to run when thermal_zone_device_unregister() starts. Since the poll_queue delayed work has been re-initialized by thermal_pm_notify_complete(), the running work item will be missed by the cancel_delayed_work_sync() in thermal_zone_device_unregister() and if it continues to run past the freeing of the thermal zone object, a use-after-free will occur. In the second scenario, thermal_zone_device_resume() queued up by thermal_pm_notify_complete() runs right after the thermal_zone_exit() called by thermal_zone_device_unregister() has returned. The poll_queue delayed work is re-initialized by it before cancel_delayed_work_sync() is called by thermal_zone_device_unregister(), so it may continue to run after the freeing of the thermal zone object, which also leads to a use-after-free. Address the first failing scenario by ensuring that no thermal work items will be running when thermal_pm_notify_complete() is called. For this purpose, first move the cancel_delayed_work() call from thermal_zone_pm_complete() to thermal_zone_pm_prepare() to prevent new work from entering the workqueue going forward. Next, switch over to using a dedicated workqueue for thermal events and update the code in thermal_pm_notify() to flush that workqueue after thermal_pm_notify_prepare() has returned which will take care of all leftover thermal work already on the workqueue (that leftover work would do nothing useful anyway because all of the thermal zones have been flagged as suspended). The second failing scenario is addressed by adding a tz->state check to thermal_zone_device_resume() to prevent it from re-initializing the poll_queue delayed work if the thermal zone is going away. Note that the above changes will also facilitate relocating the suspend and resume of thermal zones closer to the suspend and resume of devices, respectively.

Характеристики атаки

Способ атаки
Локальный
Нужен локальный доступ
Сложность
Низкая
Легко эксплуатировать
Нужны права
Низкие
Нужны базовые права
Участие пользователя
Не требуется
Не нужно действие пользователя

Последствия

Конфиденциальность
Высокое
Полная утечка данных
Целостность
Высокое
Полная модификация данных
Доступность
Высокое
Полный отказ в обслуживании

Строка CVSS v3.1

Уязвимые продукты 9

Конфигурация От (включительно) До (исключительно)
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
6.8 6.12.83
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
6.13 6.18.22
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
6.19 6.19.12
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
— —
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
— —
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
— —
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
— —
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
— —
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
— —