CVE-2023-52473

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-52473
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-52473.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-52473
Downstream
Related
Published
2024-02-25T08:16:35Z
Modified
2025-10-08T15:19:03.577972Z
Summary
thermal: core: Fix NULL pointer dereference in zone registration error path
Details

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

thermal: core: Fix NULL pointer dereference in zone registration error path

If deviceregister() in thermalzonedeviceregisterwithtrips() returns an error, the tz variable is set to NULL and subsequently dereferenced in kfree(tz->tzp).

Commit adc8749b150c ("thermal/drivers/core: Use putdevice() if deviceregister() fails") added the tz = NULL assignment in question to avoid a possible double-free after dropping the reference to the zone device. However, after commit 4649620d9404 ("thermal: core: Make thermalzonedevice_unregister() return after freeing the zone"), that assignment has become redundant, because dropping the reference to the zone device does not cause the zone object to be freed any more.

Drop it to address the NULL pointer dereference.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3d439b1a2ad36c8b4ea151c8de25309d60d17407
Fixed
335176dd8ebaca6493807dceea33c478305667fa
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3d439b1a2ad36c8b4ea151c8de25309d60d17407
Fixed
02871710b93058eb1249d5847c0b2d1c2c3c98ae
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
3d439b1a2ad36c8b4ea151c8de25309d60d17407
Fixed
04e6ccfc93c5a1aa1d75a537cf27e418895e20ea

Affected versions

v6.*

v6.3
v6.3-rc5
v6.3-rc6
v6.3-rc7
v6.4
v6.4-rc1
v6.4-rc2
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.5
v6.5-rc1
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.2
v6.6.3
v6.6.4
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.7.1

Database specific

{
    "vanir_signatures": [
        {
            "target": {
                "file": "drivers/thermal/thermal_core.c"
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02871710b93058eb1249d5847c0b2d1c2c3c98ae",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "201928703498078232428212015142616903065",
                    "240256873509023381979582766416184878621",
                    "180187299722942135056840087546160325029",
                    "339418634256243484285207198146755753645"
                ]
            },
            "deprecated": false,
            "id": "CVE-2023-52473-21233b60",
            "signature_type": "Line",
            "signature_version": "v1"
        },
        {
            "target": {
                "file": "drivers/thermal/thermal_core.c",
                "function": "thermal_zone_device_register_with_trips"
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02871710b93058eb1249d5847c0b2d1c2c3c98ae",
            "digest": {
                "length": 3051.0,
                "function_hash": "118570074636334074315157782127661228749"
            },
            "deprecated": false,
            "id": "CVE-2023-52473-83afa891",
            "signature_type": "Function",
            "signature_version": "v1"
        },
        {
            "target": {
                "file": "drivers/thermal/thermal_core.c",
                "function": "thermal_zone_device_register_with_trips"
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@335176dd8ebaca6493807dceea33c478305667fa",
            "digest": {
                "length": 3236.0,
                "function_hash": "38843366469495217603008824682753486984"
            },
            "deprecated": false,
            "id": "CVE-2023-52473-d9d0effb",
            "signature_type": "Function",
            "signature_version": "v1"
        },
        {
            "target": {
                "file": "drivers/thermal/thermal_core.c"
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@04e6ccfc93c5a1aa1d75a537cf27e418895e20ea",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "201928703498078232428212015142616903065",
                    "240256873509023381979582766416184878621",
                    "180187299722942135056840087546160325029",
                    "339418634256243484285207198146755753645"
                ]
            },
            "deprecated": false,
            "id": "CVE-2023-52473-e68e1b58",
            "signature_type": "Line",
            "signature_version": "v1"
        },
        {
            "target": {
                "file": "drivers/thermal/thermal_core.c"
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@335176dd8ebaca6493807dceea33c478305667fa",
            "digest": {
                "threshold": 0.9,
                "line_hashes": [
                    "201928703498078232428212015142616903065",
                    "240256873509023381979582766416184878621",
                    "180187299722942135056840087546160325029",
                    "339418634256243484285207198146755753645"
                ]
            },
            "deprecated": false,
            "id": "CVE-2023-52473-ee29621b",
            "signature_type": "Line",
            "signature_version": "v1"
        },
        {
            "target": {
                "file": "drivers/thermal/thermal_core.c",
                "function": "thermal_zone_device_register_with_trips"
            },
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@04e6ccfc93c5a1aa1d75a537cf27e418895e20ea",
            "digest": {
                "length": 3193.0,
                "function_hash": "33921530792289975887018755695736448261"
            },
            "deprecated": false,
            "id": "CVE-2023-52473-f2f6d838",
            "signature_type": "Function",
            "signature_version": "v1"
        }
    ]
}

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.4.0
Fixed
6.6.14
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.7.2