Skip to contentSkip to conversation

CVE-2026-46021: thermal: core: Fix thermal zone governor cleanup issues

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

thermal: core: Fix thermal zone governor cleanup issues

If thermal_zone_device_register_with_trips() fails after adding a thermal governor to the thermal zone being registered, the governor is not removed from it as appropriate which may lead to a memory leak.

In turn, thermal_zone_device_unregister() calls thermal_set_governor() without acquiring the thermal zone lock beforehand which may race with a governor update via sysfs and may lead to a use-after-free in that case.

Address these issues by adding two thermal_set_governor() calls, one to thermal_release() to remove the governor from the given thermal zone, and one to the thermal zone registration error path to cover failures preceding the thermal zone device registration.

The Linux kernel CVE team has assigned CVE-2026-46021 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.2 with commit e33df1d2f3a0141cd79e770f31999ba0dd7ebfa8 and fixed in 6.6.140 with commit 37a430a2d4e66ec8238da6c7f7e48809bf265e13
	Issue introduced in 4.2 with commit e33df1d2f3a0141cd79e770f31999ba0dd7ebfa8 and fixed in 6.12.86 with commit f412e541d25a3dfaf3d53e012ade6ff03cae8a45
	Issue introduced in 4.2 with commit e33df1d2f3a0141cd79e770f31999ba0dd7ebfa8 and fixed in 6.18.27 with commit 75f8f3c3e09122270986de9d7aa347d701676761
	Issue introduced in 4.2 with commit e33df1d2f3a0141cd79e770f31999ba0dd7ebfa8 and fixed in 7.0.4 with commit 64d4ebf91d082034bbc5ae3ba2d7fd800bc02d06
	Issue introduced in 4.2 with commit e33df1d2f3a0141cd79e770f31999ba0dd7ebfa8 and fixed in 7.1-rc1 with commit 41ff66baf81c6541f4f985dd7eac4494d03d9440

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-46021

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/thermal/thermal_core.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/37a430a2d4e66ec8238da6c7f7e48809bf265e13
	https://git.kernel.org/stable/c/f412e541d25a3dfaf3d53e012ade6ff03cae8a45
	https://git.kernel.org/stable/c/75f8f3c3e09122270986de9d7aa347d701676761
	https://git.kernel.org/stable/c/64d4ebf91d082034bbc5ae3ba2d7fd800bc02d06
	https://git.kernel.org/stable/c/41ff66baf81c6541f4f985dd7eac4494d03d9440