Skip to contentSkip to conversation

CVE-2026-97904: cpufreq: initialize policy rwsem before sysfs publication

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

lore
Share & tools
lore
#0 lore raw

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

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

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

cpufreq: initialize policy rwsem before sysfs publication

cpufreq_policy_alloc() initializes policy->rwsem after kobject_init_and_add() has created the policy sysfs directory and its default attributes. A sysfs access can therefore reach a policy callback before the semaphore has been initialized.

Initialize policy->rwsem before publishing the policy kobject so sysfs callbacks always see an initialized semaphore.

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

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

	Issue introduced in 4.2 with commit 2fc3384dc75bf7333384c7a16d12c796f61c3f56 and fixed in 6.12.111 with commit dc11263cb05ed519758fd135fe08d611bad1f241
	Issue introduced in 4.2 with commit 2fc3384dc75bf7333384c7a16d12c796f61c3f56 and fixed in 6.18.53 with commit 27c9b491bf7604e83b50c3bbfa18a30266ff345f
	Issue introduced in 4.2 with commit 2fc3384dc75bf7333384c7a16d12c796f61c3f56 and fixed in 7.2.7 with commit 2cee937f779f69b195b37bbec1e888da9bfe9d58
	Issue introduced in 4.2 with commit 2fc3384dc75bf7333384c7a16d12c796f61c3f56 and fixed in 7.3-rc3 with commit 3e5d1bf4bd687beb2cb4e32a07af695455925588

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-97904

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/cpufreq/cpufreq.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/dc11263cb05ed519758fd135fe08d611bad1f241
	https://git.kernel.org/stable/c/27c9b491bf7604e83b50c3bbfa18a30266ff345f
	https://git.kernel.org/stable/c/2cee937f779f69b195b37bbec1e888da9bfe9d58
	https://git.kernel.org/stable/c/3e5d1bf4bd687beb2cb4e32a07af695455925588