[lvc-project] [PATCH 5.10.y] cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()
Sergey Shtylyov
s.shtylyov at omp.ru
Tue Sep 16 22:04:52 MSK 2025
On 9/12/25 11:35 PM, Sergey Shtylyov wrote:
> From: Henry Martin <bsdhenrymartin at gmail.com>
>
> [ Upstream commit 484d3f15cc6cbaa52541d6259778e715b2c83c54 ]
>
> 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.
>
> [Sergey: resolved reject (reordering the local variables).]
>
> Fixes: 99d6bdf33877 ("cpufreq: add support for CPU DVFS based on SCMI message protocol")
> Signed-off-by: Henry Martin <bsdhenrymartin at gmail.com>
> Acked-by: Sudeep Holla <sudeep.holla at arm.com>
> Signed-off-by: Viresh Kumar <viresh.kumar at linaro.org>
> Signed-off-by: Sergey Shtylyov <s.shtylyov at omp.ru>
Probably should have noted that this patch fixes CVE-2025-37830:
https://marc.info/?l=linux-cve-announce&m=174668615621702
(Sorry, lore doesn't work for me anymre...]
MBR, Sergey
More information about the lvc-project
mailing list