CVE-2025-40327 (GCVE-0-2025-40327)

Vulnerability from cvelistv5 – Published: 2025-12-09 04:09 – Updated: 2026-05-23 16:02
VLAI
Title
perf/core: Fix system hang caused by cpu-clock usage
Summary
In the Linux kernel, the following vulnerability has been resolved: perf/core: Fix system hang caused by cpu-clock usage cpu-clock usage by the async-profiler tool can trigger a system hang, which got bisected back to the following commit by Octavia Togami: 18dbcbfabfff ("perf: Fix the POLL_HUP delivery breakage") causes this issue The root cause of the hang is that cpu-clock is a special type of SW event which relies on hrtimers. The __perf_event_overflow() callback is invoked from the hrtimer handler for cpu-clock events, and __perf_event_overflow() tries to call cpu_clock_event_stop() to stop the event, which calls htimer_cancel() to cancel the hrtimer. But that's a recursion into the hrtimer code from a hrtimer handler, which (unsurprisingly) deadlocks. To fix this bug, use hrtimer_try_to_cancel() instead, and set the PERF_HES_STOPPED flag, which causes perf_swevent_hrtimer() to stop the event once it sees the PERF_HES_STOPPED flag. [ mingo: Fixed the comments and improved the changelog. ]
Severity
No CVSS data available.
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 7056 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 18dbcbfabfffc4a5d3ea10290c5ad27f22b0d240 , < 6b8c512811644cf2f5eaf6f44e928683c54127f0 (git)
Affected: 18dbcbfabfffc4a5d3ea10290c5ad27f22b0d240 , < eb3182ef0405ff2f6668fd3e5ff9883f60ce8801 (git)
Affected: b2de0c9ce8e542b5cb4cd3944620d9dd1ea1f0ac (git)
Affected: 6.16.8 , < 6.17 (semver)
guessed Create a notification for this product.
Linux Linux Affected: 6.17
Unaffected: 0 , < 6.17 (semver)
Unaffected: 6.17.8 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/events/core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "6b8c512811644cf2f5eaf6f44e928683c54127f0",
              "status": "affected",
              "version": "18dbcbfabfffc4a5d3ea10290c5ad27f22b0d240",
              "versionType": "git"
            },
            {
              "lessThan": "eb3182ef0405ff2f6668fd3e5ff9883f60ce8801",
              "status": "affected",
              "version": "18dbcbfabfffc4a5d3ea10290c5ad27f22b0d240",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "b2de0c9ce8e542b5cb4cd3944620d9dd1ea1f0ac",
              "versionType": "git"
            },
            {
              "lessThan": "6.17",
              "status": "affected",
              "version": "6.16.8",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/events/core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.17"
            },
            {
              "lessThan": "6.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.8",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.8",
                  "versionStartIncluding": "6.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.16.8",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nperf/core: Fix system hang caused by cpu-clock usage\n\ncpu-clock usage by the async-profiler tool can trigger a system hang,\nwhich got bisected back to the following commit by Octavia Togami:\n\n  18dbcbfabfff (\"perf: Fix the POLL_HUP delivery breakage\") causes this issue\n\nThe root cause of the hang is that cpu-clock is a special type of SW\nevent which relies on hrtimers. The __perf_event_overflow() callback\nis invoked from the hrtimer handler for cpu-clock events, and\n__perf_event_overflow() tries to call cpu_clock_event_stop()\nto stop the event, which calls htimer_cancel() to cancel the hrtimer.\n\nBut that\u0027s a recursion into the hrtimer code from a hrtimer handler,\nwhich (unsurprisingly) deadlocks.\n\nTo fix this bug, use hrtimer_try_to_cancel() instead, and set\nthe PERF_HES_STOPPED flag, which causes perf_swevent_hrtimer()\nto stop the event once it sees the PERF_HES_STOPPED flag.\n\n[ mingo: Fixed the comments and improved the changelog. ]"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-23T16:02:10.552Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/6b8c512811644cf2f5eaf6f44e928683c54127f0"
        },
        {
          "url": "https://git.kernel.org/stable/c/eb3182ef0405ff2f6668fd3e5ff9883f60ce8801"
        }
      ],
      "title": "perf/core: Fix system hang caused by cpu-clock usage",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40327",
    "datePublished": "2025-12-09T04:09:43.522Z",
    "dateReserved": "2025-04-16T07:20:57.186Z",
    "dateUpdated": "2026-05-23T16:02:10.552Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40327",
      "date": "2026-10-24",
      "epss": "0.0021",
      "percentile": "0.10664"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "kernel/events/core.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "6b8c512811644cf2f5eaf6f44e928683c54127f0",
                    "status": "affected",
                    "version": "18dbcbfabfffc4a5d3ea10290c5ad27f22b0d240",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "eb3182ef0405ff2f6668fd3e5ff9883f60ce8801",
                    "status": "affected",
                    "version": "18dbcbfabfffc4a5d3ea10290c5ad27f22b0d240",
                    "versionType": "git"
                  },
                  {
                    "status": "affected",
                    "version": "b2de0c9ce8e542b5cb4cd3944620d9dd1ea1f0ac",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "6.17",
                    "status": "affected",
                    "version": "6.16.8",
                    "versionType": "semver"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "kernel/events/core.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "6.17"
                  },
                  {
                    "lessThan": "6.17",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.17.*",
                    "status": "unaffected",
                    "version": "6.17.8",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.18",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nperf/core: Fix system hang caused by cpu-clock usage\n\ncpu-clock usage by the async-profiler tool can trigger a system hang,\nwhich got bisected back to the following commit by Octavia Togami:\n\n  18dbcbfabfff (\"perf: Fix the POLL_HUP delivery breakage\") causes this issue\n\nThe root cause of the hang is that cpu-clock is a special type of SW\nevent which relies on hrtimers. The __perf_event_overflow() callback\nis invoked from the hrtimer handler for cpu-clock events, and\n__perf_event_overflow() tries to call cpu_clock_event_stop()\nto stop the event, which calls htimer_cancel() to cancel the hrtimer.\n\nBut that\u0027s a recursion into the hrtimer code from a hrtimer handler,\nwhich (unsurprisingly) deadlocks.\n\nTo fix this bug, use hrtimer_try_to_cancel() instead, and set\nthe PERF_HES_STOPPED flag, which causes perf_swevent_hrtimer()\nto stop the event once it sees the PERF_HES_STOPPED flag.\n\n[ mingo: Fixed the comments and improved the changelog. ]"
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nperf/core: Solucionar el bloqueo del sistema causado por el uso de cpu-clock\n\nEl uso de cpu-clock por la herramienta async-profiler puede desencadenar un bloqueo del sistema, el cual fue rastreado hasta la siguiente confirmaci\u00f3n por Octavia Togami:\n\n  18dbcbfabfff (\u0027perf: Solucionar la interrupci\u00f3n en la entrega de POLL_HUP\u0027) causa este problema\n\nLa causa ra\u00edz del bloqueo es que cpu-clock es un tipo especial de evento SW que depende de hrtimers. La devoluci\u00f3n de llamada __perf_event_overflow() es invocada desde el gestor de hrtimer para eventos de cpu-clock, y __perf_event_overflow() intenta llamar a cpu_clock_event_stop() para detener el evento, lo cual llama a htimer_cancel() para cancelar el hrtimer.\n\nPero eso es una recursi\u00f3n en el c\u00f3digo de hrtimer desde un gestor de hrtimer, lo cual (como era de esperar) causa un interbloqueo.\n\nPara solucionar este error, usar hrtimer_try_to_cancel() en su lugar, y establecer la bandera PERF_HES_STOPPED, lo cual hace que perf_swevent_hrtimer() detenga el evento una vez que vea la bandera PERF_HES_STOPPED.\n\n[ mingo: Se corrigieron los comentarios y se mejor\u00f3 el registro de cambios. ]"
          }
        ],
        "id": "CVE-2025-40327",
        "lastModified": "2026-10-15T19:10:00.173",
        "metrics": {},
        "published": "2025-12-09T16:17:42.787",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/6b8c512811644cf2f5eaf6f44e928683c54127f0"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/eb3182ef0405ff2f6668fd3e5ff9883f60ce8801"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Deferred"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-06-30T02:59:22+00:00",
      "cve": "CVE-2025-40327",
      "id": "CVE-2025-40327",
      "initial_release_date": "2025-12-09T00:00:00+00:00",
      "product_status:known_affected": "90",
      "product_status:known_not_affected": "184",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: perf/core: Fix system hang caused by cpu-clock usage",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40327.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-10-15T16:25:19Z",
      "cve": "CVE-2025-40327",
      "id": "CVE-2025-40327",
      "initial_release_date": "2025-12-10T00:26:50Z",
      "product_status:known_affected": "0",
      "product_status:known_not_affected": "512",
      "product_status:recommended": "58",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-40327",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/2025/cve-2025-40327.json",
      "version": "12"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

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.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.