CVE-2022-50422: scsi: libsas: Fix use-after-free bug in smp_execute_task_sg()
In the Linux kernel, the following vulnerability has been resolved:
scsi: libsas: Fix use-after-free bug in smpexecutetasksg()
When executing SMP task failed, the smpexecutetasksg() calls deltimer() to delete "slowtask->timer". However, if the timer handler sastaskinternaltimedout() is running, the deltimer() in smpexecutetasksg() will not stop it and a UAF will happen. The process is shown below:
(thread 1) | (thread 2) smpexecutetasksg() | sastaskinternaltimedout() ... | deltimer() | ... | ... sasfreetask(task) | kfree(task->slowtask) //FREE| | task->slowtask->... //USE
Fix by calling deltimersync() in smpexecutetasksg(), which makes sure the timer handler have finished before the "task->slowtask" is deallocated.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50422?
CVE-2022-50422 is classified as a medium severity vulnerability in the Linux kernel due to the use-after-free bug that could potentially lead to denial of service.
How do I fix CVE-2022-50422?
To address CVE-2022-50422, update your Linux kernel to a version that includes the patches for this vulnerability, specifically versions following the fixes provided in the kernel commits.
What are the affected versions for CVE-2022-50422?
CVE-2022-50422 affects multiple versions of the Linux kernel ranging from 2.6.19 to version 6.0.3.
What kind of impact can CVE-2022-50422 have on systems?
CVE-2022-50422 can lead to a denial of service if exploited, impacting the availability of the affected systems.
Is CVE-2022-50422 readily exploitable?
Exploitation of CVE-2022-50422 may require specific conditions and privileges, which could limit its overall impact but still poses a risk.