CVE-2022-48950: perf: Fix perf_pending_task() UaF
In the Linux kernel, the following vulnerability has been resolved:
perf: Fix perfpendingtask() UaF
Per syzbot it is possible for perfpendingtask() to run after the event is free()'d. There are two related but distinct cases:
- the taskwork was already queued before destroying the event; - destroying the event itself queues the taskwork.
The first cannot be solved using taskworkcancel() since perfrelease() itself might be called from a taskwork (fput), which means the current->taskworks list is already empty and taskworkcancel() won't be able to find the perfpendingtask() entry.
The simplest alternative is extending the perfevent lifetime to cover the taskwork.
The second is just silly, queueing a taskwork while you know the event is going away makes no sense and is easily avoided by re-arranging how the event is marked STATEDEAD and ensuring it goes through STATEOFF on the way down.
Affected Software
Event History
Frequently Asked Questions
What versions of the Linux kernel are affected by CVE-2022-48950?
CVE-2022-48950 affects the Linux kernel versions before 5.15.84 and between 5.16.0 and 6.0.14 inclusive, as well as specific release candidates of version 6.1.
What is the nature of the vulnerability in CVE-2022-48950?
CVE-2022-48950 is a use-after-free vulnerability in the perf_pending_task() function of the Linux kernel, potentially allowing the function to execute after the associated event has been freed.
What is the recommended action to mitigate CVE-2022-48950?
To mitigate CVE-2022-48950, users should upgrade to a fixed version of the Linux kernel, specifically to versions 5.15.84 or later.
How does CVE-2022-48950 impact system security?
The use-after-free vulnerability in CVE-2022-48950 could potentially lead to arbitrary code execution or privilege escalation, compromising system security.
Are there any known exploits for CVE-2022-48950?
As of now, there are no publicly available exploits specifically targeting CVE-2022-48950, but its existence presents a risk that could be exploited.