CVE-2023-53997 (GCVE-0-2023-53997)
Vulnerability from cvelistv5
Published
2025-12-24 10:55
Modified
2026-08-05 09:16
Summary
In the Linux kernel, the following vulnerability has been resolved: thermal: of: fix double-free on unregistration Since commit 3d439b1a2ad3 ("thermal/core: Alloc-copy-free the thermal zone parameters structure"), thermal_zone_device_register() allocates a copy of the tzp argument and frees it when unregistering, so thermal_of_zone_register() now ends up leaking its original tzp and double-freeing the tzp copy. Fix this by locating tzp on stack instead.
Impacted products
Vendor Product Version
Linux Linux Version: 3d439b1a2ad36c8b4ea151c8de25309d60d17407
Version: 3d439b1a2ad36c8b4ea151c8de25309d60d17407
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/thermal/thermal_of.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "adce49089412a9ae28f5c666e0bb12fbcd86b3f7",
              "status": "affected",
              "version": "3d439b1a2ad36c8b4ea151c8de25309d60d17407",
              "versionType": "git"
            },
            {
              "lessThan": "ac4436a5b20e0ef1f608a9ef46c08d5d142f8da6",
              "status": "affected",
              "version": "3d439b1a2ad36c8b4ea151c8de25309d60d17407",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/thermal/thermal_of.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.4"
            },
            {
              "lessThan": "6.4",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.4.*",
              "status": "unaffected",
              "version": "6.4.8",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.5",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.4.8",
                  "versionStartIncluding": "6.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.5",
                  "versionStartIncluding": "6.4",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The double free is reached through local operations on the sensor device \u2014 sysfs driver unbind, module unload, or device removal \u2014 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-\u003etzp` 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\u0027s slab allocator and the compromise remains within the kernel\u0027s 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 \u2014 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 \u2014 either way a kernel panic. Even undetected, the corrupted freelist reliably crashes the system shortly afterward."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T09:16:34.123Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-53997",
    "datePublished": "2025-12-24T10:55:34.077Z",
    "dateReserved": "2025-12-24T10:53:46.176Z",
    "dateUpdated": "2026-08-05T09:16:34.123Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…