{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-37747",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T04:51:23.936Z",
        "datePublished": "2025-05-01T12:55:54.028Z",
        "dateUpdated": "2026-10-21T12:36:24.915Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-10-21T12:36:24.915Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nperf: Fix hang while freeing sigtrap event\n\nPerf can hang while freeing a sigtrap event if a related deferred\nsignal hadn't managed to be sent before the file got closed:\n\nperf_event_overflow()\n   task_work_add(perf_pending_task)\n\nfput()\n   task_work_add(____fput())\n\ntask_work_run()\n    ____fput()\n        perf_release()\n            perf_event_release_kernel()\n                _free_event()\n                    perf_pending_task_sync()\n                        task_work_cancel() -> FAILED\n                        rcuwait_wait_event()\n\nOnce task_work_run() is running, the list of pending callbacks is\nremoved from the task_struct and from this point on task_work_cancel()\ncan't remove any pending and not yet started work items, hence the\ntask_work_cancel() failure and the hang on rcuwait_wait_event().\n\nTask work could be changed to remove one work at a time, so a work\nrunning on the current task can always cancel a pending one, however\nthe wait / wake design is still subject to inverted dependencies when\nremote targets are involved, as pictured by Oleg:\n\nT1                                                      T2\n\nfd = perf_event_open(pid => T2->pid);                  fd = perf_event_open(pid => T1->pid);\nclose(fd)                                              close(fd)\n    <IRQ>                                                  <IRQ>\n    perf_event_overflow()                                  perf_event_overflow()\n       task_work_add(perf_pending_task)                        task_work_add(perf_pending_task)\n    </IRQ>                                                 </IRQ>\n    fput()                                                 fput()\n        task_work_add(____fput())                              task_work_add(____fput())\n\n    task_work_run()                                        task_work_run()\n        ____fput()                                             ____fput()\n            perf_release()                                         perf_release()\n                perf_event_release_kernel()                            perf_event_release_kernel()\n                    _free_event()                                          _free_event()\n                        perf_pending_task_sync()                               perf_pending_task_sync()\n                            rcuwait_wait_event()                                   rcuwait_wait_event()\n\nTherefore the only option left is to acquire the event reference count\nupon queueing the perf task work and release it from the task work, just\nlike it was done before 3a5465418f5f (\"perf: Fix event leak upon exec and file release\")\nbut without the leaks it fixed.\n\nSome adjustments are necessary to make it work:\n\n* A child event might dereference its parent upon freeing. Care must be\n  taken to release the parent last.\n\n* Some places assuming the event doesn't have any reference held and\n  therefore can be freed right away must instead put the reference and\n  let the reference counting to its job."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "include/linux/perf_event.h",
                        "kernel/events/core.c"
                    ],
                    "versions": [
                        {
                            "version": "104e258a004037bc7dba9f6085c71dad6af57ad4",
                            "lessThan": "aae58a39ac4c63c3fa53536fb2504c9f1d0e1719",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3a5465418f5fd970e86a86c7f4075be262682840",
                            "lessThan": "fa1827fa968c0674e9b6fca223fa9fb4da4493eb",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3a5465418f5fd970e86a86c7f4075be262682840",
                            "lessThan": "665b87b8f8b3aeb49083ef3b65c4953e7753fc12",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3a5465418f5fd970e86a86c7f4075be262682840",
                            "lessThan": "1267bd38f161c1a27d9b722de017027167a225a0",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3a5465418f5fd970e86a86c7f4075be262682840",
                            "lessThan": "56799bc035658738f362acec3e7647bb84e68933",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9ad46f1fef421d43cdab3a7d1744b2f43b54dae0",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "ed2c202dac55423a52d7e2290f2888bf08b8ee99",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "f34d8307a73a18de5320fcc6f40403146d061891",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6.6.44",
                            "lessThan": "6.6.160",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.165",
                            "lessThan": "5.16",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.103",
                            "lessThan": "6.2",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.10.3",
                            "lessThan": "6.11",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "include/linux/perf_event.h",
                        "kernel/events/core.c"
                    ],
                    "versions": [
                        {
                            "version": "6.11",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.11",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.160",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.24",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.13.12",
                            "lessThanOrEqual": "6.13.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.14.3",
                            "lessThanOrEqual": "6.14.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.6.44",
                                    "versionEndExcluding": "6.6.160"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.11",
                                    "versionEndExcluding": "6.12.24"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.11",
                                    "versionEndExcluding": "6.13.12"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.11",
                                    "versionEndExcluding": "6.14.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.11",
                                    "versionEndExcluding": "6.15"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15.165"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1.103"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.10.3"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/aae58a39ac4c63c3fa53536fb2504c9f1d0e1719"
                },
                {
                    "url": "https://git.kernel.org/stable/c/fa1827fa968c0674e9b6fca223fa9fb4da4493eb"
                },
                {
                    "url": "https://git.kernel.org/stable/c/665b87b8f8b3aeb49083ef3b65c4953e7753fc12"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1267bd38f161c1a27d9b722de017027167a225a0"
                },
                {
                    "url": "https://git.kernel.org/stable/c/56799bc035658738f362acec3e7647bb84e68933"
                }
            ],
            "title": "perf: Fix hang while freeing sigtrap event",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}