perf: Fix __perf_event_overflow() vs perf_remove_from_context() race
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 592903cdcbf606a838056bae6d03fc557806c914 · < c9bc1753b3cc41d0e01fbca7f035258b5f4db0ae| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
perf: Fix __perf_event_overflow() vs perf_remove_from_context() race
Make sure that __perf_event_overflow() runs with IRQs disabled for all possible callchains. Specifically the software events can end up running it with only preemption disabled.
This opens up a race vs perf_event_exit_event() and friends that will go and free various things the overflow path expects to be present, like the BPF program.
From the CVE record · Linux
The Linux kernel’s perf software-event overflow path can run with preemption disabled but IRQs enabled. If event removal races with that path, it can free resources the overflow handler still expects to use, including a BPF program. The input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with perf support should check their vendor’s advisory; affected versions were not provided.