cpufreq: imx6q: fix devres accumulation across driver rebind
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.270, 5.15.221, 6.1.188, 6.6.157, 6.12.110, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: cpufreq: imx6q: fix devres accumulation across driver rebind imx6_soc_volt is allocated with devm_kcalloc(cpu_dev, ...), where cpu_dev is the CPU device from get_cpu_device(0). That device is never unbound, so its devres list is never released, and imx6q_cpufreq_remove() does not free the array either. Every probe therefore adds an allocation that stays for the lifetime of the system. Allocate against the platform device instead. Its devres is released when the driver is unbound, which is exactly the lifetime the array wants: imx6q_set_target() reads it, and nothing may reach that after cpufreq_unregister_driver(). That makes the array actually go away on unbind, so also clear the file-scope pointer in remove and on the failed-probe path, rather than leave it pointing at memory devres is about to release. Tested by rebinding the driver on qemu's mcimx6ul-evk.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From b4573d1d657aae28bedf3a9a1f5367e09c80d1d6 · fixed in 493c4d5982f037f288509a1cee352b8b9705fb38; From b4573d1d657aae28bedf3a9a1f5367e09c80d1d6 · fixed in d91f07381e2b70578ff92b83d9422ac31e7b9096; From b4573d1d657aae28bedf3a9a1f5367e09c80d1d6 · fixed in 38d2c3c9238b9d499e1829a3b8e80c2f73c73b5c; From b4573d1d657aae28bedf3a9a1f5367e09c80d1d6 · fixed in 92e53a5274276a7b1ca815b9aacebea4fb7efe75; From b4573d1d657aae28bedf3a9a1f5367e09c80d1d6 · fixed in 9e314b3ecd2594958d4f4999313641290ad28ebe; From b4573d1d657aae28bedf3a9a1f5367e09c80d1d6 · fixed in e2d2612e63e294ebcdec7c6f08a1a052b7dfdc59; From b4573d1d657aae28bedf3a9a1f5367e09c80d1d6 · fixed in 0f77d1a0a25056146eea1f8619fa06ce287c91f7; From b4573d1d657aae28bedf3a9a1f5367e09c80d1d6 · fixed in 22c23c72c3b21fa3ec3db5070dfc0582794e0ef9
- Linux Linux
3.14
- KernelLinux
From 3.14.0 · fixed in 5.10.270; From 5.11.0 · fixed in 5.15.221; From 5.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6
References 8
git.kernel.org
- stable/c/493c4d5982f037f288509a1cee352b8b9705fb38
- stable/c/d91f07381e2b70578ff92b83d9422ac31e7b9096
- stable/c/38d2c3c9238b9d499e1829a3b8e80c2f73c73b5c
- stable/c/92e53a5274276a7b1ca815b9aacebea4fb7efe75
- stable/c/9e314b3ecd2594958d4f4999313641290ad28ebe
- stable/c/e2d2612e63e294ebcdec7c6f08a1a052b7dfdc59
- stable/c/0f77d1a0a25056146eea1f8619fa06ce287c91f7
- stable/c/22c23c72c3b21fa3ec3db5070dfc0582794e0ef9