CVE-2022-50422
Severity CVSS v4.0:
Pending analysis
Type:
CWE-416
Use After Free
Publication date:
01/10/2025
Last modified:
14/01/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
scsi: libsas: Fix use-after-free bug in smp_execute_task_sg()<br />
<br />
When executing SMP task failed, the smp_execute_task_sg() calls del_timer()<br />
to delete "slow_task->timer". However, if the timer handler<br />
sas_task_internal_timedout() is running, the del_timer() in<br />
smp_execute_task_sg() will not stop it and a UAF will happen. The process<br />
is shown below:<br />
<br />
(thread 1) | (thread 2)<br />
smp_execute_task_sg() | sas_task_internal_timedout()<br />
... |<br />
del_timer() |<br />
... | ...<br />
sas_free_task(task) |<br />
kfree(task->slow_task) //FREE|<br />
| task->slow_task->... //USE<br />
<br />
Fix by calling del_timer_sync() in smp_execute_task_sg(), which makes sure<br />
the timer handler have finished before the "task->slow_task" is<br />
deallocated.
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:*:*:*:*:*:*:*:* | 2.6.19 (including) | 5.4.220 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.150 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.75 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 5.19.17 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.0 (including) | 6.0.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/117331a2a5227fb4369c2a1f321d3e3e2e2ef8fe
- https://git.kernel.org/stable/c/2e12ce270f0d926085c1209cc90397e307deef97
- https://git.kernel.org/stable/c/46ba53c30666717cb06c2b3c5d896301cd00d0c0
- https://git.kernel.org/stable/c/a9e5176ead6de64f572ad5c87a72825d9d3c82ae
- https://git.kernel.org/stable/c/e45a1516d2933703a4823d9db71e17c3abeba24f
- https://git.kernel.org/stable/c/f7a785177611ffc97d645fcbc196e6de6ad2421d



