CVE-2025-37747
perf: Fix hang while freeing sigtrap event
Check your servers for CVE-2025-37747
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-37747 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
perf: Fix hang while freeing sigtrap event
Perf can hang while freeing a sigtrap event if a related deferred signal hadn't managed to be sent before the file got closed:
perf_event_overflow() task_work_add(perf_pending_task)
fput() task_work_add(____fput())
task_work_run() ____fput() perf_release() perf_event_release_kernel() _free_event() perf_pending_task_sync() task_work_cancel() -> FAILED rcuwait_wait_event()
Once task_work_run() is running, the list of pending callbacks is removed from the task_struct and from this point on task_work_cancel() can't remove any pending and not yet started work items, hence the task_work_cancel() failure and the hang on rcuwait_wait_event().
Task work could be changed to remove one work at a time, so a work running on the current task can always cancel a pending one, however the wait / wake design is still subject to inverted dependencies when remote targets are involved, as pictured by Oleg:
T1 T2
fd = perf_event_open(pid => T2->pid); fd = perf_event_open(pid => T1->pid); close(fd) close(fd) <IRQ> <IRQ> perf_event_overflow() perf_event_overflow() task_work_add(perf_pending_task) task_work_add(perf_pending_task) </IRQ> </IRQ> fput() fput() task_work_add(____fput()) task_work_add(____fput())
task_work_run() task_work_run() ____fput() ____fput() perf_release() perf_release() perf_event_release_kernel() perf_event_release_kernel() _free_event() _free_event() perf_pending_task_sync() perf_pending_task_sync() rcuwait_wait_event() rcuwait_wait_event()
Therefore the only option left is to acquire the event reference count upon queueing the perf task work and release it from the task work, just like it was done before 3a5465418f5f ("perf: Fix event leak upon exec and file release") but without the leaks it fixed.
Some adjustments are necessary to make it work:
* A child event might dereference its parent upon freeing. Care must be taken to release the parent last.
* Some places assuming the event doesn't have any reference held and therefore can be freed right away must instead put the reference and let the reference counting to its job.
Exploitation
EPSS 0.26%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 18.4% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 5 Nov 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from ed2c202dac55423a52d7e2290f2888bf08b8ee99, before 20ab73bb467d900662dca043452aadecb2db8338 affected from 104e258a004037bc7dba9f6085c71dad6af57ad4, before aae58a39ac4c63c3fa53536fb2504c9f1d0e1719 affected from 3a5465418f5fd970e86a86c7f4075be262682840, before fa1827fa968c0674e9b6fca223fa9fb4da4493eb affected from 3a5465418f5fd970e86a86c7f4075be262682840, before 665b87b8f8b3aeb49083ef3b65c4953e7753fc12 affected from 3a5465418f5fd970e86a86c7f4075be262682840, before 1267bd38f161c1a27d9b722de017027167a225a0 affected from 3a5465418f5fd970e86a86c7f4075be262682840, before 56799bc035658738f362acec3e7647bb84e68933 affected 9ad46f1fef421d43cdab3a7d1744b2f43b54dae0 affected f34d8307a73a18de5320fcc6f40403146d061891 affected from 6.1.103, before 6.1.191 affected from 6.6.44, before 6.6.160 affected from 5.15.165, before 5.16 affected from 6.10.3, before 6.11
Other versions: unaffected
|
| Linux |
affected 6.11 unaffected before 6.11 unaffected from 6.1.191 up to and including 6.1.* unaffected from 6.6.160 up to and including 6.6.* unaffected from 6.12.24 up to and including 6.12.* unaffected from 6.13.12 up to and including 6.13.* unaffected from 6.14.3 up to and including 6.14.* unaffected 6.15 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-37747 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-37747
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-37747
trivy image --scanners vuln IMAGE | grep CVE-2025-37747
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/20ab73bb467d900662dca043452aadecb2db8338 git.kernel.org
- https://git.kernel.org/stable/c/aae58a39ac4c63c3fa53536fb2504c9f1d0e1719 git.kernel.org
- https://git.kernel.org/stable/c/fa1827fa968c0674e9b6fca223fa9fb4da4493eb git.kernel.org
- https://git.kernel.org/stable/c/665b87b8f8b3aeb49083ef3b65c4953e7753fc12 git.kernel.org
- https://git.kernel.org/stable/c/1267bd38f161c1a27d9b722de017027167a225a0 git.kernel.org
- https://git.kernel.org/stable/c/56799bc035658738f362acec3e7647bb84e68933 git.kernel.org
Source: the record CVE-2025-37747 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse