{"id":"CVE-2026-90311","summary":"thermal: hwmon: Remove hwmon class device along with its parent","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nthermal: hwmon: Remove hwmon class device along with its parent\n\nThe current code creates one hwmon device per thermal zone type and that\ndevice is registered under the first thermal zone of the given type.\n\nThat turns out to be problematic when the thermal zone holding the\nhwmon device is removed.\n\nFor example, say that there are two ACPI thermal zones on a system\n\n /sys/devices/virtual/thermal/thermal_zone0/\n /sys/devices/virtual/thermal/thermal_zone1/\n\nThe current code registers a hwmon class device for thermal_zone0 only:\n\n /sys/devices/virtual/thermal/thermal_zone0/hwmon0/\n\nbecause the type is \"acpitz\" for both of them, but it adds a sysfs\nattribute that belongs to thermal_zone1 under it:\n\n /sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp2_input\n\nThere is also\n\n /sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp1_input\n\nwhich belongs to thermal_zone0.\n\nWhen thermal_zone0 is removed, say because the ACPI thermal driver is\nunbound from the underlying platform device, thermal_remove_hwmon_sysfs()\nskips the removal of hwmon0 because of the temp2_input attribute\nbelonging to thermal_zone1 which effectively prevents thermal_zone0\nremoval from making progress.\n\nAddress this by making thermal_remove_hwmon_sysfs() remove the entire\nhwmon class device interface for the given thermal zone type when the\nthermal zone device holding it is removed.\n\nTo prevent races with thermal_add_hwmon_sysfs() that may interfere\nwith this, carry out the entire addition and removal of hwmon sysfs\ninterfaces for thermal zones under thermal_hwmon_list_lock.\n\nAlso adjust the layout of the labels in thermal_add_hwmon_sysfs() to\nthe current kernel coding style to align with the new \"unlock\" label.","modified":"2026-09-19T03:47:25.797077189Z","published":"2026-09-17T16:08:31.645Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/90xxx/CVE-2026-90311.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/2b57e24d34b2dfc43c81942bb359d6315bf302fb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4fa8915f40f744c6db2a3c25b2ae7d2dd64c77b4"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/90xxx/CVE-2026-90311.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-90311"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"f6b6b52ef7a54160c0a4d2b56a58f84a2e5b33c5"},{"fixed":"4fa8915f40f744c6db2a3c25b2ae7d2dd64c77b4"},{"fixed":"2b57e24d34b2dfc43c81942bb359d6315bf302fb"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-90311.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.19.0"},{"fixed":"7.2.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-90311.json"}}],"schema_version":"1.9.0"}