{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-53997",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-12-24T10:53:46.176Z",
        "datePublished": "2025-12-24T10:55:34.077Z",
        "dateUpdated": "2026-08-05T09:16:34.123Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:16:34.123Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nthermal: of: fix double-free on unregistration\n\nSince commit 3d439b1a2ad3 (\"thermal/core: Alloc-copy-free the thermal\nzone parameters structure\"), thermal_zone_device_register() allocates\na copy of the tzp argument and frees it when unregistering, so\nthermal_of_zone_register() now ends up leaking its original tzp and\ndouble-freeing the tzp copy. Fix this by locating tzp on stack instead."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The double free is reached through local operations on the sensor device — sysfs driver unbind, module unload, or device removal — with no network-facing component anywhere on the path. No remote or adjacent protocol handler reaches `thermal_of_zone_unregister()`.\nAC:L - The `kfree(tzp)` after `thermal_zone_device_unregister()` already freed `tz->tzp` executes unconditionally on every teardown; there is no race to win and no allocation failure required. Attacker-chosen zone geometry (trip count) further lets the freed object share `kmalloc-64` with `trips`, evading the naive freelist-hardening check.\nPR:L - Consistent with how driver-teardown and probe-unwind double frees are scored, this is treated as low-privilege rather than requiring full administrative rights; the corrupting free also occurs spontaneously on `thermal_zone_device_enable()` and devres error unwinding with no attacker privilege at all.\nUI:N - Driver unbind or module removal completes entirely without any victim action, and the probe/devres error-unwind variant needs no interaction whatsoever.\nS:U - The corruption stays inside the kernel's slab allocator and the compromise remains within the kernel's own security authority. No hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The looping SLUB freelist hands the same `kmalloc-64` object to two independent owners, giving type confusion that permits reading arbitrary kernel data placed in the aliased allocation. Per kernel scoring guidance, memory corruption of this class is High confidentiality impact.\nI:H - The double free yields a classic freelist-corruption write primitive — the attacker can reclaim the aliased object with an attacker-controlled structure and overwrite kernel state, enabling control-flow hijack and privilege escalation. Out-of-band writes through a confused type are unbounded.\nA:H - With `CONFIG_SLAB_FREELIST_HARDENED` the second free hits `BUG_ON(object == fp)`, and with `SLUB_DEBUG`/KASAN it raises a fatal \"double free\" report — either way a kernel panic. Even undetected, the corrupted freelist reliably crashes the system shortly afterward."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/thermal/thermal_of.c"
                    ],
                    "versions": [
                        {
                            "version": "3d439b1a2ad36c8b4ea151c8de25309d60d17407",
                            "lessThan": "adce49089412a9ae28f5c666e0bb12fbcd86b3f7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3d439b1a2ad36c8b4ea151c8de25309d60d17407",
                            "lessThan": "ac4436a5b20e0ef1f608a9ef46c08d5d142f8da6",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/thermal/thermal_of.c"
                    ],
                    "versions": [
                        {
                            "version": "6.4",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.4",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.4.8",
                            "lessThanOrEqual": "6.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.5",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.4",
                                    "versionEndExcluding": "6.4.8"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.4",
                                    "versionEndExcluding": "6.5"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/adce49089412a9ae28f5c666e0bb12fbcd86b3f7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ac4436a5b20e0ef1f608a9ef46c08d5d142f8da6"
                }
            ],
            "title": "thermal: of: fix double-free on unregistration",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}