In the Linux kernel, the following vulnerability has been resolved:
thermal: core: call putdevice() only after deviceregister() fails
putdevice() shouldn't be called before a prior call to deviceregister(). _thermalcoolingdeviceregister() doesn't follow that properly and needs fixing. Also thermalcoolingdevicedestroysysfs() is getting called unnecessarily on few error paths.
Fix all this by placing the calls at the right place.
Based on initial work done by Caleb Connolly.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53012.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53012.json"
[
{
"id": "CVE-2023-53012-3075633d",
"digest": {
"threshold": 0.9,
"line_hashes": [
"225473092673254236156490147909662066642",
"120721697035180907146148569999773962742",
"267351938578111763933992043176068767092",
"214443950284950398100090344872907329678",
"113463597761268244078483942766530007831",
"200039613525190514699015919293518523079",
"141005992226772385263879959210522526632",
"86601813211580242797021144541844960350",
"177780585314492683489847070029657009259",
"97596566609780518461377976301072401873",
"10642474066886626710974778764121598609",
"264780755843295822094563628568098754500",
"298792139989680829559535720053308719340",
"55943795548143188538843312571782686569",
"324514261220453714232809088550261105343"
]
},
"signature_type": "Line",
"target": {
"file": "drivers/thermal/thermal_core.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2846a7412f6246fd5171f51011bf76dfebcec0ee",
"deprecated": false
},
{
"id": "CVE-2023-53012-3884ad78",
"digest": {
"length": 1755.0,
"function_hash": "277683336238622767671890286677340168099"
},
"signature_type": "Function",
"target": {
"file": "drivers/thermal/thermal_core.c",
"function": "__thermal_cooling_device_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2846a7412f6246fd5171f51011bf76dfebcec0ee",
"deprecated": false
},
{
"id": "CVE-2023-53012-6491a143",
"digest": {
"length": 1763.0,
"function_hash": "236131459333629517567293778233680771979"
},
"signature_type": "Function",
"target": {
"file": "drivers/thermal/thermal_core.c",
"function": "__thermal_cooling_device_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a7d736cc3c6cb0d7498bbfb56515d414e35e9510",
"deprecated": false
},
{
"id": "CVE-2023-53012-746d2472",
"digest": {
"threshold": 0.9,
"line_hashes": [
"225473092673254236156490147909662066642",
"120721697035180907146148569999773962742",
"267351938578111763933992043176068767092",
"214443950284950398100090344872907329678",
"113463597761268244078483942766530007831",
"200039613525190514699015919293518523079",
"141005992226772385263879959210522526632",
"86601813211580242797021144541844960350",
"177780585314492683489847070029657009259",
"97596566609780518461377976301072401873",
"10642474066886626710974778764121598609",
"264780755843295822094563628568098754500",
"298792139989680829559535720053308719340",
"55943795548143188538843312571782686569",
"324514261220453714232809088550261105343"
]
},
"signature_type": "Line",
"target": {
"file": "drivers/thermal/thermal_core.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6c54b7bc8a31ce0f7cc7f8deef05067df414f1d8",
"deprecated": false
},
{
"id": "CVE-2023-53012-b3ef6cc5",
"digest": {
"threshold": 0.9,
"line_hashes": [
"225473092673254236156490147909662066642",
"120721697035180907146148569999773962742",
"267351938578111763933992043176068767092",
"214443950284950398100090344872907329678",
"113463597761268244078483942766530007831",
"200039613525190514699015919293518523079",
"141005992226772385263879959210522526632",
"86601813211580242797021144541844960350",
"177780585314492683489847070029657009259",
"97596566609780518461377976301072401873",
"10642474066886626710974778764121598609",
"264780755843295822094563628568098754500",
"298792139989680829559535720053308719340",
"55943795548143188538843312571782686569",
"75374352963463764075465696637078791814"
]
},
"signature_type": "Line",
"target": {
"file": "drivers/thermal/thermal_core.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a7d736cc3c6cb0d7498bbfb56515d414e35e9510",
"deprecated": false
},
{
"id": "CVE-2023-53012-d4ba2463",
"digest": {
"length": 1755.0,
"function_hash": "277683336238622767671890286677340168099"
},
"signature_type": "Function",
"target": {
"file": "drivers/thermal/thermal_core.c",
"function": "__thermal_cooling_device_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6c54b7bc8a31ce0f7cc7f8deef05067df414f1d8",
"deprecated": false
}
]