CVE-2022-50422
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-10-01

Last updated on: 2025-12-11

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: scsi: libsas: Fix use-after-free bug in smp_execute_task_sg() When executing SMP task failed, the smp_execute_task_sg() calls del_timer() to delete "slow_task->timer". However, if the timer handler sas_task_internal_timedout() is running, the del_timer() in smp_execute_task_sg() will not stop it and a UAF will happen. The process is shown below: (thread 1) | (thread 2) smp_execute_task_sg() | sas_task_internal_timedout() ... | del_timer() | ... | ... sas_free_task(task) | kfree(task->slow_task) //FREE| | task->slow_task->... //USE Fix by calling del_timer_sync() in smp_execute_task_sg(), which makes sure the timer handler have finished before the "task->slow_task" is deallocated.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-10-01
Last Modified
2025-12-11
Generated
2026-05-07
AI Q&A
2025-10-01
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 5 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 2.6.19 (inc) to 5.4.220 (exc)
linux linux_kernel From 5.5 (inc) to 5.10.150 (exc)
linux linux_kernel From 5.11 (inc) to 5.15.75 (exc)
linux linux_kernel From 5.16 (inc) to 5.19.17 (exc)
linux linux_kernel From 6.0 (inc) to 6.0.3 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a use-after-free (UAF) bug in the Linux kernel's scsi libsas component, specifically in the smp_execute_task_sg() function. When an SMP task execution fails, smp_execute_task_sg() calls del_timer() to delete a timer associated with the task. However, if the timer handler sas_task_internal_timedout() is running concurrently, del_timer() does not stop it, leading to a situation where the timer handler uses memory that has already been freed. This causes a use-after-free condition. The fix involves replacing del_timer() with del_timer_sync(), ensuring the timer handler finishes before the memory is freed.


How can this vulnerability impact me? :

This use-after-free vulnerability can lead to undefined behavior in the Linux kernel, such as system crashes, data corruption, or potential escalation of privileges if exploited. It affects the stability and security of systems using the vulnerable kernel component, potentially allowing attackers to execute arbitrary code or cause denial of service.


What immediate steps should I take to mitigate this vulnerability?

Update the Linux kernel to a version that includes the fix for the use-after-free bug in smp_execute_task_sg(). The fix involves replacing del_timer() with del_timer_sync() to ensure the timer handler finishes before deallocating the task, preventing the vulnerability.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart