Vulnerability · Published May 1, 2025 · Assigned by Linux
CVE-2025-37747perf: Fix hang while freeing sigtrap event
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | no fix listed | DEBIAN-CVE-2025-37747 |
| Debian:13 | linux | 6.12.25-1 | DEBIAN-CVE-2025-37747 |
| Debian:14 | linux | 6.12.25-1 | DEBIAN-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.17 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-intel-iotg | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-kvm | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-vmware | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:24.04:LTS | linux-xilinx | no fix listed | UBUNTU-CVE-2025-37747 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2025-37747 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | ed2c202dac55423a52d7e2290f2888bf08b8ee99 – before 20ab73bb467d900662dca043452aadecb2db8338104e258a004037bc7dba9f6085c71dad6af57ad4 – before aae58a39ac4c63c3fa53536fb2504c9f1d0e17193a5465418f5fd970e86a86c7f4075be262682840 – before fa1827fa968c0674e9b6fca223fa9fb4da4493eb3a5465418f5fd970e86a86c7f4075be262682840 – before 665b87b8f8b3aeb49083ef3b65c4953e7753fc123a5465418f5fd970e86a86c7f4075be262682840 – before 1267bd38f161c1a27d9b722de017027167a225a03a5465418f5fd970e86a86c7f4075be262682840 – before 56799bc035658738f362acec3e7647bb84e689339ad46f1fef421d43cdab3a7d1744b2f43b54dae0f34d8307a73a18de5320fcc6f40403146d061891 |
| Linux | Linux | 6.11 |
References
- https://git.kernel.org/stable/c/20ab73bb467d900662dca043452aadecb2db8338
- https://git.kernel.org/stable/c/aae58a39ac4c63c3fa53536fb2504c9f1d0e1719
- https://git.kernel.org/stable/c/fa1827fa968c0674e9b6fca223fa9fb4da4493eb
- https://git.kernel.org/stable/c/665b87b8f8b3aeb49083ef3b65c4953e7753fc12
- https://git.kernel.org/stable/c/1267bd38f161c1a27d9b722de017027167a225a0
- https://git.kernel.org/stable/c/56799bc035658738f362acec3e7647bb84e68933