Skip to contentSkip to conversation

CVE-2025-37830: cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 8, 2025

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: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()

cpufreq_cpu_get_raw() can return NULL when the target CPU is not present in the policy->cpus mask. scmi_cpufreq_get_rate() does not check for this case, which results in a NULL pointer dereference.

Add NULL check after cpufreq_cpu_get_raw() to prevent this issue.

The Linux kernel CVE team has assigned CVE-2025-37830 to this issue.

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

	Issue introduced in 4.17 with commit 99d6bdf3387734d75e3e34e94a58b8a355b7a9c8 and fixed in 5.15.181 with commit 4e3d1c1925d8e752992cd893d03d974e6807ac16
	Issue introduced in 4.17 with commit 99d6bdf3387734d75e3e34e94a58b8a355b7a9c8 and fixed in 6.1.136 with commit f9c5423855e3687262d881aeee5cfb3bc8577bff
	Issue introduced in 4.17 with commit 99d6bdf3387734d75e3e34e94a58b8a355b7a9c8 and fixed in 6.6.89 with commit ea834c90aa7cc80a1b456f7a91432734d5087d16
	Issue introduced in 4.17 with commit 99d6bdf3387734d75e3e34e94a58b8a355b7a9c8 and fixed in 6.12.26 with commit 7ccfadfb2562337b4f0462a86a9746a6eea89718
	Issue introduced in 4.17 with commit 99d6bdf3387734d75e3e34e94a58b8a355b7a9c8 and fixed in 6.14.5 with commit cfaca93b8fe317b7faa9af732e0ba8c9081fa018
	Issue introduced in 4.17 with commit 99d6bdf3387734d75e3e34e94a58b8a355b7a9c8 and fixed in 6.15-rc4 with commit 484d3f15cc6cbaa52541d6259778e715b2c83c54

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-2025-37830

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/scmi-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/4e3d1c1925d8e752992cd893d03d974e6807ac16
	https://git.kernel.org/stable/c/f9c5423855e3687262d881aeee5cfb3bc8577bff
	https://git.kernel.org/stable/c/ea834c90aa7cc80a1b456f7a91432734d5087d16
	https://git.kernel.org/stable/c/7ccfadfb2562337b4f0462a86a9746a6eea89718
	https://git.kernel.org/stable/c/cfaca93b8fe317b7faa9af732e0ba8c9081fa018
	https://git.kernel.org/stable/c/484d3f15cc6cbaa52541d6259778e715b2c83c54