CVE-2022-48950
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
21/10/2024
Last modified:
25/10/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
perf: Fix perf_pending_task() UaF<br />
<br />
Per syzbot it is possible for perf_pending_task() to run after the<br />
event is free()&#39;d. There are two related but distinct cases:<br />
<br />
- the task_work was already queued before destroying the event;<br />
- destroying the event itself queues the task_work.<br />
<br />
The first cannot be solved using task_work_cancel() since<br />
perf_release() itself might be called from a task_work (____fput),<br />
which means the current->task_works list is already empty and<br />
task_work_cancel() won&#39;t be able to find the perf_pending_task()<br />
entry.<br />
<br />
The simplest alternative is extending the perf_event lifetime to cover<br />
the task_work.<br />
<br />
The second is just silly, queueing a task_work while you know the<br />
event is going away makes no sense and is easily avoided by<br />
re-arranging how the event is marked STATE_DEAD and ensuring it goes<br />
through STATE_OFF on the way down.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15.84 (excluding) | |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.0.14 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc6:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc7:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.1:rc8:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page



