CVE-2026-99718: hwmon: (peci/dimmtemp) Fix devres leak and UAF on concurrent unbind

Published Nov 20, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

hwmon: (peci/dimmtemp) Fix devres leak and UAF on concurrent unbind

When a pecidimmtemp device is unbound concurrently with its delayed initialization work (detectwork), newly allocated devm resources and the hwmon device are leaked, leading to a use-after-free when reading the lingering hwmon sysfs attributes.

In pecidimmtempprobe(), detectwork is registered for cancellation via devmdelayedworkautocancel(). During driver detach, devresreleaseall() first moves all existing entries from dev->devreshead onto a local todo list before invoking their release callbacks in reverse order. If createdimmtempinfodelayed() is already running when devmdelayedworkdrop() calls canceldelayedworksync(), createdimmtempinfo() can allocate dimmtemplabel strings via devmkzalloc()/devmkasprintf() and register the hwmon device via devmhwmondeviceregisterwithinfo(), appending new devres entries to the now-empty dev->devreshead. Once the work finishes, devresreleaseall() frees priv and priv->name from the local todo list without re-evaluating dev->devreshead, leaving the late devres allocations and registered hwmon device behind with a dangling priv pointer.

Cancel detectwork synchronously in a driver .remove() callback instead of relying on devmdelayedworkautocancel() so that the work is fully drained before devresreleaseall() detaches dev->devreshead, allowing any devm resources registered by the delayed work to be released in proper reverse order. Also only schedule detectwork when checkpopulateddimms() returns -EAGAIN so that probe failure paths do not leave delayed work pending.

Affected Software

3 affected componentsFixes available
linux/kernel>=5.18.0<6.12.118
6.12.118
linux/kernel>=6.13.0<6.18.64
6.18.64
linux/kernel>=6.19.0<7.3.5
7.3.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.118
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.64
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.5
  4. Compensating control

    In the peci/dimmtemp driver, cancel detect_work synchronously with cancel_delayed_work_sync() in the .remove() callback instead of relying on devm_delayed_work_autocancel().

Frequently Asked Questions

1

What systems are exposed to this issue?

Systems using the Linux kernel PECI DIMM temperature hardware-monitoring driver are exposed when a peci_dimmtemp device can be unbound while its delayed initialization work is running. The issue involves the hwmon sysfs interface left behind by that race.

2

What condition is required to trigger the use-after-free?

A concurrent driver detach or device unbind must occur while the detect_work delayed initialization is already executing. That work must then allocate managed resources and register the hwmon device after devres cleanup has moved existing resources to its local release list.

3

What is the observable impact if the race occurs?

The late-created hwmon device and managed resources can remain registered after the driver state has been freed. Reading the lingering hwmon sysfs attributes can then cause a use-after-free.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203