GHSA-PX83-F67G-J9G9
Vulnerability from github – Published: 2025-12-09 18:30 – Updated: 2025-12-09 18:30In 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. ]
{
"affected": [],
"aliases": [
"CVE-2025-40327"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-09T16:17:42Z",
"severity": null
},
"details": "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. ]",
"id": "GHSA-px83-f67g-j9g9",
"modified": "2025-12-09T18:30:35Z",
"published": "2025-12-09T18:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-40327"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/6b8c512811644cf2f5eaf6f44e928683c54127f0"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/eb3182ef0405ff2f6668fd3e5ff9883f60ce8801"
}
],
"schema_version": "1.4.0",
"severity": []
}
Sightings
| Author | Source | Type | Date |
|---|
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.