{"id":"CVE-2023-53012","state":"PUBLISHED","title":"thermal: core: call put_device() only after device_register() fails","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nthermal: core: call put_device() only after device_register() fails\n\nput_device() shouldn't be called before a prior call to\ndevice_register(). __thermal_cooling_device_register() doesn't follow\nthat properly and needs fixing. Also\nthermal_cooling_device_destroy_sysfs() is getting called unnecessarily\non few error paths.\n\nFix all this by placing the calls at the right place.\n\nBased on initial work done by Caleb Connolly.","publishedAt":"2025-03-27T16:43:41.693Z","updatedAt":"2026-05-27T09:27:35.445Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"108a6f91e2766a6d9142b1f2d90c07ac547eae7e","status":"affected","lessThan":"a7d736cc3c6cb0d7498bbfb56515d414e35e9510","versionType":"git"},{"version":"80bb3b901abe6560620505e5c734d140c4f73a07","status":"affected","lessThan":"2846a7412f6246fd5171f51011bf76dfebcec0ee","versionType":"git"},{"version":"c408b3d1d9bbc7de5fb0304fea424ef2539da616","status":"affected","lessThan":"6c54b7bc8a31ce0f7cc7f8deef05067df414f1d8","versionType":"git"},{"version":"5139cbc0c6e4bf2fcffc9a7ed4350bf6985bc561","status":"affected","versionType":"git"},{"version":"c4c435d3637b5d0abaa6447c7366c3674364968a","status":"affected","versionType":"git"},{"version":"e0d8b51bbe84d6a98c162e06344de2d773d9e722","status":"affected","versionType":"git"},{"version":"6.0.16","status":"affected","lessThan":"6.1","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/thermal_core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/thermal_core.c"]}],"references":["https://git.kernel.org/stable/c/a7d736cc3c6cb0d7498bbfb56515d414e35e9510","https://git.kernel.org/stable/c/2846a7412f6246fd5171f51011bf76dfebcec0ee","https://git.kernel.org/stable/c/6c54b7bc8a31ce0f7cc7f8deef05067df414f1d8"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/53xxx/CVE-2023-53012.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-53012","state":"PUBLISHED","datePublished":"2025-03-27T16:43:41.693Z","dateUpdated":"2026-05-27T09:27:35.445Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-03-27T16:40:15.749Z"},"containers":{"cna":{"title":"thermal: core: call put_device() only after device_register() fails","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nthermal: core: call put_device() only after device_register() fails\n\nput_device() shouldn't be called before a prior call to\ndevice_register(). __thermal_cooling_device_register() doesn't follow\nthat properly and needs fixing. Also\nthermal_cooling_device_destroy_sysfs() is getting called unnecessarily\non few error paths.\n\nFix all this by placing the calls at the right place.\n\nBased on initial work done by Caleb Connolly."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"108a6f91e2766a6d9142b1f2d90c07ac547eae7e","status":"affected","lessThan":"a7d736cc3c6cb0d7498bbfb56515d414e35e9510","versionType":"git"},{"version":"80bb3b901abe6560620505e5c734d140c4f73a07","status":"affected","lessThan":"2846a7412f6246fd5171f51011bf76dfebcec0ee","versionType":"git"},{"version":"c408b3d1d9bbc7de5fb0304fea424ef2539da616","status":"affected","lessThan":"6c54b7bc8a31ce0f7cc7f8deef05067df414f1d8","versionType":"git"},{"version":"5139cbc0c6e4bf2fcffc9a7ed4350bf6985bc561","status":"affected","versionType":"git"},{"version":"c4c435d3637b5d0abaa6447c7366c3674364968a","status":"affected","versionType":"git"},{"version":"e0d8b51bbe84d6a98c162e06344de2d773d9e722","status":"affected","versionType":"git"},{"version":"6.0.16","status":"affected","lessThan":"6.1","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/thermal_core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/thermal/thermal_core.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/a7d736cc3c6cb0d7498bbfb56515d414e35e9510"},{"url":"https://git.kernel.org/stable/c/2846a7412f6246fd5171f51011bf76dfebcec0ee"},{"url":"https://git.kernel.org/stable/c/6c54b7bc8a31ce0f7cc7f8deef05067df414f1d8"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-27T09:27:35.445Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}