---
id: CVE-2023-53012
title: 'thermal: core: call put_device() only after device_register() fails'
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  thermal: core: call put_device() only after device_register() fails

  put_device() shouldn't be called before a prior call to
  device_register(). __thermal_cooling_device…
severity: none
vendor: Linux
product: Linux
affected:
  - >-
    Linux >= 108a6f91e2766a6d9142b1f2d90c07ac547eae7e <
    a7d736cc3c6cb0d7498bbfb56515d414e35e9510
  - >-
    Linux >= 80bb3b901abe6560620505e5c734d140c4f73a07 <
    2846a7412f6246fd5171f51011bf76dfebcec0ee
  - >-
    Linux >= c408b3d1d9bbc7de5fb0304fea424ef2539da616 <
    6c54b7bc8a31ce0f7cc7f8deef05067df414f1d8
  - Linux 5139cbc0c6e4bf2fcffc9a7ed4350bf6985bc561
  - Linux c4c435d3637b5d0abaa6447c7366c3674364968a
  - Linux e0d8b51bbe84d6a98c162e06344de2d773d9e722
  - Linux >= 6.0.16 < 6.1
  - Linux
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-11-05T20:14:36.238576Z'
published: '2025-03-27'
updated: '2026-11-05'
sourceUpdated: '2026-11-05T20:20:54.315Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2023-53012'
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'
tags:
  - cve.org
epss: 0.00203
epssPercentile: 0.10323
ingestedAt: '2026-11-05T22:38:31.762Z'
---

## Overview

In the Linux kernel, the following vulnerability has been resolved:

thermal: core: call put_device() only after device_register() fails

put_device() shouldn't be called before a prior call to
device_register(). __thermal_cooling_device_register() doesn't follow
that properly and needs fixing. Also
thermal_cooling_device_destroy_sysfs() 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.

## Affected

- `Linux >= 108a6f91e2766a6d9142b1f2d90c07ac547eae7e < a7d736cc3c6cb0d7498bbfb56515d414e35e9510`
- `Linux >= 80bb3b901abe6560620505e5c734d140c4f73a07 < 2846a7412f6246fd5171f51011bf76dfebcec0ee`
- `Linux >= c408b3d1d9bbc7de5fb0304fea424ef2539da616 < 6c54b7bc8a31ce0f7cc7f8deef05067df414f1d8`
- `Linux 5139cbc0c6e4bf2fcffc9a7ed4350bf6985bc561`
- `Linux c4c435d3637b5d0abaa6447c7366c3674364968a`
- `Linux e0d8b51bbe84d6a98c162e06344de2d773d9e722`
- `Linux >= 6.0.16 < 6.1`
- `Linux`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
