CVE-2026-31731 (GCVE-0-2026-31731)

Vulnerability from cvelistv5 – Published: 2026-05-01 14:14 – Updated: 2026-05-01 14:14
VLAI?
Title
thermal: core: Address thermal zone removal races with resume
Summary
In the Linux kernel, the following vulnerability has been resolved: thermal: core: Address thermal zone removal races with resume Since thermal_zone_pm_complete() and thermal_zone_device_resume() re-initialize the poll_queue delayed work for the given thermal zone, the cancel_delayed_work_sync() in thermal_zone_device_unregister() may miss some already running work items and the thermal zone may be freed prematurely [1]. There are two failing scenarios that both start with running thermal_pm_notify_complete() right before invoking thermal_zone_device_unregister() for one of the thermal zones. In the first scenario, there is a work item already running for the given thermal zone when thermal_pm_notify_complete() calls thermal_zone_pm_complete() for that thermal zone and it continues to run when thermal_zone_device_unregister() starts. Since the poll_queue delayed work has been re-initialized by thermal_pm_notify_complete(), the running work item will be missed by the cancel_delayed_work_sync() in thermal_zone_device_unregister() and if it continues to run past the freeing of the thermal zone object, a use-after-free will occur. In the second scenario, thermal_zone_device_resume() queued up by thermal_pm_notify_complete() runs right after the thermal_zone_exit() called by thermal_zone_device_unregister() has returned. The poll_queue delayed work is re-initialized by it before cancel_delayed_work_sync() is called by thermal_zone_device_unregister(), so it may continue to run after the freeing of the thermal zone object, which also leads to a use-after-free. Address the first failing scenario by ensuring that no thermal work items will be running when thermal_pm_notify_complete() is called. For this purpose, first move the cancel_delayed_work() call from thermal_zone_pm_complete() to thermal_zone_pm_prepare() to prevent new work from entering the workqueue going forward. Next, switch over to using a dedicated workqueue for thermal events and update the code in thermal_pm_notify() to flush that workqueue after thermal_pm_notify_prepare() has returned which will take care of all leftover thermal work already on the workqueue (that leftover work would do nothing useful anyway because all of the thermal zones have been flagged as suspended). The second failing scenario is addressed by adding a tz->state check to thermal_zone_device_resume() to prevent it from re-initializing the poll_queue delayed work if the thermal zone is going away. Note that the above changes will also facilitate relocating the suspend and resume of thermal zones closer to the suspend and resume of devices, respectively.
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 5a5efdaffda5d23717d9117cf36cda9eafcf2fae , < 1a6d2b001eb730d85f00da39ae7db6f3b4edc540 (git)
Affected: 5a5efdaffda5d23717d9117cf36cda9eafcf2fae , < 2dbe93f344f10b432b95a23304006be805c097a1 (git)
Affected: 5a5efdaffda5d23717d9117cf36cda9eafcf2fae , < c4593f1654f7dea3bcf9bb1851ded86311d4f370 (git)
Affected: 5a5efdaffda5d23717d9117cf36cda9eafcf2fae , < 45b859b0728267a6199ee5002d62e6c6f3e8c89d (git)
Create a notification for this product.
    Linux Linux Affected: 6.8
Unaffected: 0 , < 6.8 (semver)
Unaffected: 6.12.83 , ≤ 6.12.* (semver)
Unaffected: 6.18.22 , ≤ 6.18.* (semver)
Unaffected: 6.19.12 , ≤ 6.19.* (semver)
Unaffected: 7.0 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/thermal/thermal_core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "1a6d2b001eb730d85f00da39ae7db6f3b4edc540",
              "status": "affected",
              "version": "5a5efdaffda5d23717d9117cf36cda9eafcf2fae",
              "versionType": "git"
            },
            {
              "lessThan": "2dbe93f344f10b432b95a23304006be805c097a1",
              "status": "affected",
              "version": "5a5efdaffda5d23717d9117cf36cda9eafcf2fae",
              "versionType": "git"
            },
            {
              "lessThan": "c4593f1654f7dea3bcf9bb1851ded86311d4f370",
              "status": "affected",
              "version": "5a5efdaffda5d23717d9117cf36cda9eafcf2fae",
              "versionType": "git"
            },
            {
              "lessThan": "45b859b0728267a6199ee5002d62e6c6f3e8c89d",
              "status": "affected",
              "version": "5a5efdaffda5d23717d9117cf36cda9eafcf2fae",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/thermal/thermal_core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.8"
            },
            {
              "lessThan": "6.8",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.83",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.22",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.19.*",
              "status": "unaffected",
              "version": "6.19.12",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.0",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.83",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.22",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.19.12",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.0",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nthermal: core: Address thermal zone removal races with resume\n\nSince thermal_zone_pm_complete() and thermal_zone_device_resume()\nre-initialize the poll_queue delayed work for the given thermal zone,\nthe cancel_delayed_work_sync() in thermal_zone_device_unregister()\nmay miss some already running work items and the thermal zone may\nbe freed prematurely [1].\n\nThere are two failing scenarios that both start with\nrunning thermal_pm_notify_complete() right before invoking\nthermal_zone_device_unregister() for one of the thermal zones.\n\nIn the first scenario, there is a work item already running for\nthe given thermal zone when thermal_pm_notify_complete() calls\nthermal_zone_pm_complete() for that thermal zone and it continues to\nrun when thermal_zone_device_unregister() starts.  Since the poll_queue\ndelayed work has been re-initialized by thermal_pm_notify_complete(), the\nrunning work item will be missed by the cancel_delayed_work_sync() in\nthermal_zone_device_unregister() and if it continues to run past the\nfreeing of the thermal zone object, a use-after-free will occur.\n\nIn the second scenario, thermal_zone_device_resume() queued up by\nthermal_pm_notify_complete() runs right after the thermal_zone_exit()\ncalled by thermal_zone_device_unregister() has returned.  The poll_queue\ndelayed work is re-initialized by it before cancel_delayed_work_sync() is\ncalled by thermal_zone_device_unregister(), so it may continue to run\nafter the freeing of the thermal zone object, which also leads to a\nuse-after-free.\n\nAddress the first failing scenario by ensuring that no thermal work\nitems will be running when thermal_pm_notify_complete() is called.\nFor this purpose, first move the cancel_delayed_work() call from\nthermal_zone_pm_complete() to thermal_zone_pm_prepare() to prevent\nnew work from entering the workqueue going forward.  Next, switch\nover to using a dedicated workqueue for thermal events and update\nthe code in thermal_pm_notify() to flush that workqueue after\nthermal_pm_notify_prepare() has returned which will take care of\nall leftover thermal work already on the workqueue (that leftover\nwork would do nothing useful anyway because all of the thermal zones\nhave been flagged as suspended).\n\nThe second failing scenario is addressed by adding a tz-\u003estate check\nto thermal_zone_device_resume() to prevent it from re-initializing\nthe poll_queue delayed work if the thermal zone is going away.\n\nNote that the above changes will also facilitate relocating the suspend\nand resume of thermal zones closer to the suspend and resume of devices,\nrespectively."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-01T14:14:30.177Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/1a6d2b001eb730d85f00da39ae7db6f3b4edc540"
        },
        {
          "url": "https://git.kernel.org/stable/c/2dbe93f344f10b432b95a23304006be805c097a1"
        },
        {
          "url": "https://git.kernel.org/stable/c/c4593f1654f7dea3bcf9bb1851ded86311d4f370"
        },
        {
          "url": "https://git.kernel.org/stable/c/45b859b0728267a6199ee5002d62e6c6f3e8c89d"
        }
      ],
      "title": "thermal: core: Address thermal zone removal races with resume",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-31731",
    "datePublished": "2026-05-01T14:14:30.177Z",
    "dateReserved": "2026-03-09T15:48:24.137Z",
    "dateUpdated": "2026-05-01T14:14:30.177Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-31731",
      "date": "2026-05-05",
      "epss": "0.00018",
      "percentile": "0.04643"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-31731\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-05-01T15:16:35.683\",\"lastModified\":\"2026-05-01T15:24:14.893\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nthermal: core: Address thermal zone removal races with resume\\n\\nSince thermal_zone_pm_complete() and thermal_zone_device_resume()\\nre-initialize the poll_queue delayed work for the given thermal zone,\\nthe cancel_delayed_work_sync() in thermal_zone_device_unregister()\\nmay miss some already running work items and the thermal zone may\\nbe freed prematurely [1].\\n\\nThere are two failing scenarios that both start with\\nrunning thermal_pm_notify_complete() right before invoking\\nthermal_zone_device_unregister() for one of the thermal zones.\\n\\nIn the first scenario, there is a work item already running for\\nthe given thermal zone when thermal_pm_notify_complete() calls\\nthermal_zone_pm_complete() for that thermal zone and it continues to\\nrun when thermal_zone_device_unregister() starts.  Since the poll_queue\\ndelayed work has been re-initialized by thermal_pm_notify_complete(), the\\nrunning work item will be missed by the cancel_delayed_work_sync() in\\nthermal_zone_device_unregister() and if it continues to run past the\\nfreeing of the thermal zone object, a use-after-free will occur.\\n\\nIn the second scenario, thermal_zone_device_resume() queued up by\\nthermal_pm_notify_complete() runs right after the thermal_zone_exit()\\ncalled by thermal_zone_device_unregister() has returned.  The poll_queue\\ndelayed work is re-initialized by it before cancel_delayed_work_sync() is\\ncalled by thermal_zone_device_unregister(), so it may continue to run\\nafter the freeing of the thermal zone object, which also leads to a\\nuse-after-free.\\n\\nAddress the first failing scenario by ensuring that no thermal work\\nitems will be running when thermal_pm_notify_complete() is called.\\nFor this purpose, first move the cancel_delayed_work() call from\\nthermal_zone_pm_complete() to thermal_zone_pm_prepare() to prevent\\nnew work from entering the workqueue going forward.  Next, switch\\nover to using a dedicated workqueue for thermal events and update\\nthe code in thermal_pm_notify() to flush that workqueue after\\nthermal_pm_notify_prepare() has returned which will take care of\\nall leftover thermal work already on the workqueue (that leftover\\nwork would do nothing useful anyway because all of the thermal zones\\nhave been flagged as suspended).\\n\\nThe second failing scenario is addressed by adding a tz-\u003estate check\\nto thermal_zone_device_resume() to prevent it from re-initializing\\nthe poll_queue delayed work if the thermal zone is going away.\\n\\nNote that the above changes will also facilitate relocating the suspend\\nand resume of thermal zones closer to the suspend and resume of devices,\\nrespectively.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1a6d2b001eb730d85f00da39ae7db6f3b4edc540\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2dbe93f344f10b432b95a23304006be805c097a1\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/45b859b0728267a6199ee5002d62e6c6f3e8c89d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c4593f1654f7dea3bcf9bb1851ded86311d4f370\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…