CVE-2026-90311: thermal: hwmon: Remove hwmon class device along with its parent
In the Linux kernel, the following vulnerability has been resolved:
thermal: hwmon: Remove hwmon class device along with its parent
The current code creates one hwmon device per thermal zone type and that device is registered under the first thermal zone of the given type.
That turns out to be problematic when the thermal zone holding the hwmon device is removed.
For example, say that there are two ACPI thermal zones on a system
/sys/devices/virtual/thermal/thermalzone0/ /sys/devices/virtual/thermal/thermalzone1/
The current code registers a hwmon class device for thermalzone0 only:
/sys/devices/virtual/thermal/thermalzone0/hwmon0/
because the type is "acpitz" for both of them, but it adds a sysfs attribute that belongs to thermalzone1 under it:
/sys/devices/virtual/thermal/thermalzone0/hwmon0/temp2input
There is also
/sys/devices/virtual/thermal/thermalzone0/hwmon0/temp1input
which belongs to thermalzone0.
When thermalzone0 is removed, say because the ACPI thermal driver is unbound from the underlying platform device, thermalremovehwmonsysfs() skips the removal of hwmon0 because of the temp2input attribute belonging to thermalzone1 which effectively prevents thermalzone0 removal from making progress.
Address this by making thermalremovehwmonsysfs() remove the entire hwmon class device interface for the given thermal zone type when the thermal zone device holding it is removed.
To prevent races with thermaladdhwmonsysfs() that may interfere with this, carry out the entire addition and removal of hwmon sysfs interfaces for thermal zones under thermalhwmonlistlock.
Also adjust the layout of the labels in thermaladdhwmonsysfs() to the current kernel coding style to align with the new "unlock" label.
Affected Software
Event History
Frequently Asked Questions
Which systems are affected by this lifecycle issue?
Systems with multiple thermal zones sharing the same zone type can be affected. The hwmon device is registered under the first zone of that type while also exposing attributes for the other zones.
When does the problem occur?
It occurs when the first thermal zone that owns the shared hwmon device is removed, such as after unbinding the ACPI thermal driver from its underlying platform device. Attributes associated with another zone can prevent removal of that hwmon device.
How can I identify this condition on a system?
Inspect thermal-zone sysfs directories for a hwmon device under one thermal zone that contains temperature attributes for more than one zone. For example, a hwmon directory under thermal_zone0 may contain both temp1_input for thermal_zone0 and temp2_input for thermal_zone1 when both have the same type.