CVE-2026-74637: perf/core: Fix group leader use-after-free after sibling detach
In the Linux kernel, the following vulnerability has been resolved:
perf/core: Fix group leader use-after-free after sibling detach
perfgroupdetach() handles leader and sibling detach differently. When the group leader is detached, all siblings are promoted to singleton events and their groupleader pointer is reset to themselves. When a sibling is detached, it is removed from the leader's siblinglist, but its groupleader pointer is left pointing at the old leader.
That is harmless when the sibling is being closed and freed immediately, as in the DETACHDEAD path. It is not safe when the sibling is detached but kept alive, such as during CPU hotplug with DETACHGROUP. In that case the sibling is removed from the context, while its file descriptor can still keep it alive.
A typical failing sequence is:
- A group contains leader L and sibling S. - CPU hot-unplug detaches S with DETACHGROUP, removing it from L->siblinglist but leaving S->groupleader == L. - L is later closed and freed. - A PERFIOCFLAGGROUP ioctl on S follows S->groupleader and dereferences the freed leader.
This was reproduced by running the perf event fuzzer, CPU hotplug, and a stress workload concurrently:
Unable to handle kernel paging request at virtual address 006b6b6b6b6b6cdb CPU: 2 PID: 12489 Comm: perffuzzer 6.18.7 PREEMPT pc : perfioctl+0x34c/0xc68 x20: ffffff89a3fa2c70 x8 : 6b6b6b6b6b6b6b6b Code: 943c4a0e 340047a0 f9404a94 f9411e88 (f940b908) Call trace: perfioctl+0x34c/0xc68 (P) arm64sysioctl+0xa0/0xf4 invokesyscall+0x58/0xe4 el0svccommon+0xa8/0xdc doel0svc+0x1c/0x28 el0svc+0x40/0xc0 el0t64synchandler+0x68/0xdc el0t64sync+0x1c4/0x1c8
The fault happened in perfioctl(), where perfeventforeach() follows the stale groupleader pointer and perfeventforeachchild() then dereferences the freed leader's context.
Fix the use-after-free by promoting the detached sibling to a singleton. Also fix eventdisable() cgroup accounting and event state change.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Linux kernel perf/coreto a version that resolves this vulnerability.Patch perf/core: Fix group leader use-after-free after sibling detach - Configuration
Fix __event_disable() cgroup accounting and event state change as part of the perf use-after-free remediation so the event state transitions remain consistent.
Linux kernel perf __event_disable() cgroup accounting and event state change = fixed - Compensating control
Apply an operational mitigations strategy for CPU hotplug/perf during exposure windows: avoid running the perf event fuzzer and related perf ioctl workloads concurrently with CPU hotplug operations that trigger DETACH_GROUP until the kernel fix is deployed.