Ad

CVE-2026-99718

NONE EPSS 0.21%
Обновлено 23 ноября 2026
Linux
Параметр Значение
Поставщик Linux
Публичный эксплойт Нет

In the Linux kernel, the following vulnerability has been resolved: hwmon: (peci/dimmtemp) Fix devres leak and UAF on concurrent unbind When a peci_dimmtemp device is unbound concurrently with its delayed initialization work (detect_work), newly allocated devm resources and the hwmon device are leaked, leading to a use-after-free when reading the lingering hwmon sysfs attributes. В peci_dimmtemp_probe(), detect_work зарегистрирован для отмены через devm_delayed_work_autocancel(). Во время отсоединения драйвера devres_release_all () сначала перемещает все существующие записи из dev->devres_head в локальный список дел, прежде чем вызывать их обратные вызовы в обратном порядке.

Если create_dimm_temp_info_delayed() уже запущен, когда devm_delayed_work_drop() вызывает cancel_delayed_work_sync(), create_dimm_temp_info() может выделить строки dimmtemp_label через devm_kzalloc()/devm_kasprintf() и зарегистрировать устройство hwmon через devm_hwmon_device_register_with_info(), добавляя новые записи devres к теперь пустому dev->devres_head. Как только работа закончена, devres_release_all () освобождает priv и priv->name из локального списка дел без переоценки dev->devres_head, оставляя последние выделения и зарегистрированное устройство hwmon позади с болтающимся указателем priv. Отмена detect_work синхронно в драйвере .remove() callback вместо того, чтобы полагаться на devm_delayed_work_autocancel(), так что работа полностью дренируется до того, как devres_release_all() отсоединяет dev->devres_head, позволяя любым ресурсам devm, зарегистрированным отложенной работой, быть выпущенными в правильном обратном порядке.

Также только запланируйте detect_work, когда check_populated_dimms () возвратит -EAGAIN, чтобы пути отказа зонда не оставляли задержку работы в ожидании.

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

In the Linux kernel, the following vulnerability has been resolved: hwmon: (peci/dimmtemp) Fix devres leak and UAF on concurrent unbind When a peci_dimmtemp device is unbound concurrently with its delayed initialization work (detect_work), newly allocated devm resources and the hwmon device are leaked, leading to a use-after-free when reading the lingering hwmon sysfs attributes. In peci_dimmtemp_probe(), detect_work is registered for cancellation via devm_delayed_work_autocancel(). During driver detach, devres_release_all() first moves all existing entries from dev->devres_head onto a local todo list before invoking their release callbacks in reverse order. If create_dimm_temp_info_delayed() is already running when devm_delayed_work_drop() calls cancel_delayed_work_sync(), create_dimm_temp_info() can allocate dimmtemp_label strings via devm_kzalloc()/devm_kasprintf() and register the hwmon device via devm_hwmon_device_register_with_info(), appending new devres entries to the now-empty dev->devres_head. Once the work finishes, devres_release_all() frees priv and priv->name from the local todo list without re-evaluating dev->devres_head, leaving the late devres allocations and registered hwmon device behind with a dangling priv pointer. Cancel detect_work synchronously in a driver .remove() callback instead of relying on devm_delayed_work_autocancel() so that the work is fully drained before devres_release_all() detaches dev->devres_head, allowing any devm resources registered by the delayed work to be released in proper reverse order. Also only schedule detect_work when check_populated_dimms() returns -EAGAIN so that probe failure paths do not leave delayed work pending.