Linux: thermal/drivers/tegra/soctherma: Switch to devm cooling device registration
What fixes it
- 78a2ba09fd7501df09239c7e3c311c80c259ed31LinuxCVE List
- 0c65f786a69402620306828aa19817fd71f37f4bLinuxCVE List
- 6f2a863e7e9adf6088fe644259576181e60ee5e5LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
thermal/drivers/tegra/soctherma: Switch to devm cooling device registration
Use devm_thermal_of_cooling_device_register() to simplify resource management and avoid manual cleanup in error paths.
As a side effect this change has the benefit of solving an existing issue. Before, the function tegra_soctherm_remove() only called debugfs_remove_recursive() and never called thermal_cooling_device_unregister() for any of the cooling devices registered here.
After the driver removal, the thermal framework's cdev list would still hold references to thermal_cooling_device objects whose devdata pointer (ts) pointed to memory already freed by the platform device's devm cleanup.
With this change, the cooling device is unregistered when the driver is removed, thus fixing the issue above.
Text from CVE List
Affected versions 16
- Linuxaffected: ce0dbf04f685d48ffdec64a17ebb4965f828c3ff before 78a2ba09fd7501df09239c7e3c311c80c259ed31CVE List
- Linuxaffected: ce0dbf04f685d48ffdec64a17ebb4965f828c3ff before 0c65f786a69402620306828aa19817fd71f37f4bCVE List
- Linuxaffected: ce0dbf04f685d48ffdec64a17ebb4965f828c3ff before e777ab46db8c2addffe801274d713252318ef750CVE List
- Linuxaffected: ce0dbf04f685d48ffdec64a17ebb4965f828c3ff before a643ce49ddcdbdec173e7bbf4c32c897e0293ba9CVE List
- Linuxaffected: ce0dbf04f685d48ffdec64a17ebb4965f828c3ff before 6f2a863e7e9adf6088fe644259576181e60ee5e5CVE List
- Linuxaffected: ce0dbf04f685d48ffdec64a17ebb4965f828c3ff before deaeb7be8e6b04c8b71080acba1bd88698f56b1dCVE List
- Linuxaffected: ce0dbf04f685d48ffdec64a17ebb4965f828c3ff before ee126267bc04bfb03816ae9d71ca24c5bf99e739CVE List
- Linuxaffected: 4.9CVE List
- Linuxunaffected: all versions before 4.9CVE List
- Linuxunaffected: 5.10.271 through 5.10.*CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.111 through 6.12.*CVE List
- Linuxunaffected: 6.18.53 through 6.18.*CVE List
- Linuxunaffected: 7.2CVE List
References 7
- git.kernel.org/stable/c/78a2ba09fd7501df09239c7e3c311c80c259ed31Referencevia CVE List
- git.kernel.org/stable/c/0c65f786a69402620306828aa19817fd71f37f4bReferencevia CVE List
- git.kernel.org/stable/c/e777ab46db8c2addffe801274d713252318ef750Referencevia CVE List
- git.kernel.org/stable/c/a643ce49ddcdbdec173e7bbf4c32c897e0293ba9Referencevia CVE List
- git.kernel.org/stable/c/6f2a863e7e9adf6088fe644259576181e60ee5e5Referencevia CVE List
- git.kernel.org/stable/c/deaeb7be8e6b04c8b71080acba1bd88698f56b1dReferencevia CVE List
- git.kernel.org/stable/c/ee126267bc04bfb03816ae9d71ca24c5bf99e739Referencevia CVE List