{"id":"CVE-2024-43869","aliases":["CVE-2024-43869"],"related":[],"kind":"vulnerability","state":"published","title":"perf: Fix event leak upon exec and file release","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nperf: Fix event leak upon exec and file release\n\nThe perf pending task work is never waited upon the matching event\nrelease. In the case of a child event, released via free_event()\ndirectly, this can potentially result in a leaked event, such as in the\nfollowing scenario that doesn't even require a weak IRQ work\nimplementation to trigger:\n\nschedule()\n   prepare_task_switch()\n=======> <NMI>\n      perf_event_overflow()\n         event->pending_sigtrap = ...\n         irq_work_queue(&event->pending_irq)\n<======= </NMI>\n      perf_event_task_sched_out()\n          event_sched_out()\n              event->pending_sigtrap = 0;\n              atomic_long_inc_not_zero(&event->refcount)\n              task_work_add(&event->pending_task)\n   finish_lock_switch()\n=======> <IRQ>\n   perf_pending_irq()\n      //do nothing, rely on pending task work\n<======= </IRQ>\n\nbegin_new_exec()\n   perf_event_exit_task()\n      perf_event_exit_event()\n         // If is child event\n         free_event()\n            WARN(atomic_long_cmpxchg(&event->refcount, 1, 0) != 1)\n            // event is leaked\n\nSimilar scenarios can also happen with perf_event_remove_on_exec() or\nsimply against concurrent perf_event_release().\n\nFix this with synchonizing against the possibly remaining pending task\nwork while freeing the event, just like is done with remaining pending\nIRQ work. This means that the pending task callback neither need nor\nshould hold a reference to the event, preventing it from ever beeing\nfreed.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nperf: Fix event leak upon exec and file release\n\nThe perf pending task work is never waited upon the matching event\nrelease. In the case of a child event, released via free_event()\ndirectly, this can potentially result in a leaked event, such as in the\nfollowing scenario that doesn't even require a weak IRQ work\nimplementation to trigger:\n\nschedule()\n   prepare_task_switch()\n=======> <NMI>\n      perf_event_overflow()\n         event->pending_sigtrap = ...\n         irq_work_queue(&event->pending_irq)\n<======= </NMI>\n      perf_event_task_sched_out()\n          event_sched_out()\n              event->pending_sigtrap = 0;\n              atomic_long_inc_not_zero(&event->refcount)\n              task_work_add(&event->pending_task)\n   finish_lock_switch()\n=======> <IRQ>\n   perf_pending_irq()\n      //do nothing, rely on pending task work\n<======= </IRQ>\n\nbegin_new_exec()\n   perf_event_exit_task()\n      perf_event_exit_event()\n         // If is child event\n         free_event()\n            WARN(atomic_long_cmpxchg(&event->refcount, 1, 0) != 1)\n            // event is leaked\n\nSimilar scenarios can also happen with perf_event_remove_on_exec() or\nsimply against concurrent perf_event_release().\n\nFix this with synchonizing against the possibly remaining pending task\nwork while freeing the event, just like is done with remaining pending\nIRQ work. This means that the pending task callback neither need nor\nshould hold a reference to the event, preventing it from ever beeing\nfreed.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: perf: corrige la fuga de eventos al liberar el archivo y el ejecutable. El trabajo de la tarea pendiente de rendimiento nunca se espera hasta que se libere el evento correspondiente. En el caso de un evento secundario, publicado directamente a través de free_event(), esto puede potencialmente resultar en un evento filtrado, como en el siguiente escenario que ni siquiera requiere una implementación de trabajo IRQ débil para activarse: Schedule() prepare_task_switch() =======&gt;  perf_event_overflow() evento-&gt;pending_sigtrap = ... irq_work_queue(&amp;event-&gt;pending_irq) &lt;=======  perf_event_task_sched_out() event_sched_out() evento-&gt; pendiente_sigtrap = 0; atomic_long_inc_not_zero(&amp;event-&gt;refcount) task_work_add(&amp;event-&gt;pending_task) Finish_lock_switch() =======&gt;  perf_pending_irq() //no hacer nada, confiar en el trabajo de la tarea pendiente &lt;======= &lt; /IRQ&gt; comenzar_new_exec() perf_event_exit_task() perf_event_exit_event() // Si es un evento secundario free_event() WARN(atomic_long_cmpxchg(&amp;event-&gt;refcount, 1, 0) != 1) // el evento se filtró También pueden ocurrir escenarios similares con perf_event_remove_on_exec () o simplemente contra perf_event_release() concurrente. Solucione este problema sincronizando con el trabajo de tarea pendiente posiblemente restante mientras se libera el evento, tal como se hace con el trabajo de IRQ pendiente restante. Esto significa que la devolución de llamada de la tarea pendiente no necesita ni debe contener una referencia al evento, lo que impide que se libere.","source":"nvd"}],"published":"2024-08-21T00:06:20.807Z","modified":"2026-06-17T07:51:53.460Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-401"],"affected":[{"ranges":[{"type":"git","introduced":"8bffa95ac19ff27c8261904f89d36c7fcf215d59","fixed":"9ad46f1fef421d43cdab3a7d1744b2f43b54dae0","status":"affected"},{"type":"git","introduced":"517e6a301f34613bff24a8e35b5455884f2d83d8","fixed":"ed2c202dac55423a52d7e2290f2888bf08b8ee99","status":"affected"},{"type":"git","introduced":"517e6a301f34613bff24a8e35b5455884f2d83d8","fixed":"104e258a004037bc7dba9f6085c71dad6af57ad4","status":"affected"},{"type":"git","introduced":"517e6a301f34613bff24a8e35b5455884f2d83d8","fixed":"f34d8307a73a18de5320fcc6f40403146d061891","status":"affected"},{"type":"git","introduced":"517e6a301f34613bff24a8e35b5455884f2d83d8","fixed":"3a5465418f5fd970e86a86c7f4075be262682840","status":"affected"},{"type":"git","version":"78e1317a174edbfd1182599bf76c092a2877672c","status":"affected"},{"type":"semver","introduced":"5.15.84","fixed":"5.15.165","status":"affected"},{"type":"semver","introduced":"6.0.14","fixed":"6.1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.1","status":"unaffected"},{"type":"semver","introduced":"5.15.165","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.103","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.44","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.10.3","lastAffected":"6.10.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.11","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.15.84","fixed":"5.15.165"},{"status":"affected","introduced":"6.0.14","fixed":"6.1"},{"status":"affected","introduced":"6.1.1","fixed":"6.1.103"},{"status":"affected","introduced":"6.2","fixed":"6.6.44"},{"status":"affected","introduced":"6.7","fixed":"6.10.3"},{"status":"affected","version":"6.1"},{"status":"affected","version":"6.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/9ad46f1fef421d43cdab3a7d1744b2f43b54dae0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ed2c202dac55423a52d7e2290f2888bf08b8ee99","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/104e258a004037bc7dba9f6085c71dad6af57ad4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f34d8307a73a18de5320fcc6f40403146d061891","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3a5465418f5fd970e86a86c7f4075be262682840","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T16:06:26.274Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-43869","url":"https://www.cve.org/CVERecord?id=CVE-2024-43869","licence":"CVE Terms of Use","modified":"2026-05-23T15:53:03.625Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-43869","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-43869","licence":"Public domain","modified":"2026-06-17T07:51:53.460Z"}],"updatedAt":"2026-11-25T22:58:44.606Z","epss":{"score":0.0021,"percentile":0.11896,"date":"2026-12-02T12:00:21.000Z"}}