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-&gt;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-&gt;slow_task) //FREE|<br /> | task-&gt;slow_task-&gt;... //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-&gt;slow_task" is<br /> deallocated.

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)