{"id":"CVE-2022-48950","summary":"perf: Fix perf_pending_task() UaF","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nperf: Fix perf_pending_task() UaF\n\nPer syzbot it is possible for perf_pending_task() to run after the\nevent is free()'d. There are two related but distinct cases:\n\n - the task_work was already queued before destroying the event;\n - destroying the event itself queues the task_work.\n\nThe first cannot be solved using task_work_cancel() since\nperf_release() itself might be called from a task_work (____fput),\nwhich means the current-\u003etask_works list is already empty and\ntask_work_cancel() won't be able to find the perf_pending_task()\nentry.\n\nThe simplest alternative is extending the perf_event lifetime to cover\nthe task_work.\n\nThe second is just silly, queueing a task_work while you know the\nevent is going away makes no sense and is easily avoided by\nre-arranging how the event is marked STATE_DEAD and ensuring it goes\nthrough STATE_OFF on the way down.","modified":"2026-04-02T08:27:10.637647Z","published":"2024-10-21T20:05:38.440Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48950.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/517e6a301f34613bff24a8e35b5455884f2d83d8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/78e1317a174edbfd1182599bf76c092a2877672c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8bffa95ac19ff27c8261904f89d36c7fcf215d59"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48950.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-48950"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ca7b0a10287e2733bdafb01ef0d4038536625fe3"},{"fixed":"8bffa95ac19ff27c8261904f89d36c7fcf215d59"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"078c12ccf1fb943cc18c84894c76113dc89e5975"},{"fixed":"78e1317a174edbfd1182599bf76c092a2877672c"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ca6c21327c6af02b7eec31ce4b9a740a18c6c13f"},{"fixed":"517e6a301f34613bff24a8e35b5455884f2d83d8"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48950.json"}}],"schema_version":"1.7.5"}