CVE-2026-64377: cpufreq: qcom-cpufreq-hw: Fix possible double free
Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:49:54 +0200
| Newsgroups | org.kernel.vger.linux-cve-announce |
|---|---|
| Message-ID | <2026072524-CVE-2026-64377-8fef@gregkh> |
From: Greg Kroah-Hartman <[email protected]> Description =========== In the Linux kernel, the following vulnerability has been resolved: cpufreq: qcom-cpufreq-hw: Fix possible double free qcom_cpufreq.data is allocated with devm_kzalloc() in probe() as an array of per-domain data. qcom_cpufreq_hw_cpu_init() stores a pointer to one element of this array in policy->driver_data. qcom_cpufreq_hw_cpu_exit() currently calls kfree() on policy->driver_data. This is not valid because the memory is devm-managed. For the first domain, this can free the devm-managed allocation while the devres entry is still active, leading to a possible double free when the platform device is later detached. For other domains, the pointer may refer to an element inside the array rather than the allocation base. Remove the kfree(data) call and let devres release qcom_cpufreq.data. This issue was found by a static analysis tool I am developing. The Linux kernel CVE team has assigned CVE-2026-64377 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit 054a3ef683a176a509cc9b37f762029aae942495 and fixed in 6.12.96 with commit 28a03a3f6e6cda0b0da3b43761d175dec5d14d13 Issue introduced in 6.2 with commit 054a3ef683a176a509cc9b37f762029aae942495 and fixed in 6.18.39 with commit e904961332801c87355f5d11c65bb433e717c489 Issue introduced in 6.2 with commit 054a3ef683a176a509cc9b37f762029aae942495 and fixed in 7.1.4 with commit 9de568ef6cdfc7912d5ea8db02843c0e4ef0c75d Issue introduced in 6.2 with commit 054a3ef683a176a509cc9b37f762029aae942495 and fixed in 7.2-rc1 with commit bcb8889c4981fdde42d4fd2c29a77d510fe21da2 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-64377 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/qcom-cpufreq-hw.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/28a03a3f6e6cda0b0da3b43761d175dec5d14d13 https://git.kernel.org/stable/c/e904961332801c87355f5d11c65bb433e717c489 https://git.kernel.org/stable/c/9de568ef6cdfc7912d5ea8db02843c0e4ef0c75d https://git.kernel.org/stable/c/bcb8889c4981fdde42d4fd2c29a77d510fe21da2