CVE-2025-40001
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-10-18

Last updated on: 2025-10-29

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: scsi: mvsas: Fix use-after-free bugs in mvs_work_queue During the detaching of Marvell's SAS/SATA controller, the original code calls cancel_delayed_work() in mvs_free() to cancel the delayed work item mwq->work_q. However, if mwq->work_q is already running, the cancel_delayed_work() may fail to cancel it. This can lead to use-after-free scenarios where mvs_free() frees the mvs_info while mvs_work_queue() is still executing and attempts to access the already-freed mvs_info. A typical race condition is illustrated below: CPU 0 (remove) | CPU 1 (delayed work callback) mvs_pci_remove() | mvs_free() | mvs_work_queue() cancel_delayed_work() | kfree(mvi) | | mvi-> // UAF Replace cancel_delayed_work() with cancel_delayed_work_sync() to ensure that the delayed work item is properly canceled and any executing delayed work item completes before the mvs_info is deallocated. This bug was found by static analysis.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-10-18
Last Modified
2025-10-29
Generated
2026-05-07
AI Q&A
2025-10-18
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a use-after-free bug in the Linux kernel's Marvell SAS/SATA controller driver (mvsas). When detaching the controller, the code attempts to cancel a delayed work item using cancel_delayed_work(). However, if the work item is already running, the cancellation may fail, leading to a scenario where the memory (mvs_info) is freed while the work item is still executing and accessing that freed memory. This race condition can cause undefined behavior or system instability. The fix replaces cancel_delayed_work() with cancel_delayed_work_sync() to ensure the work item is fully canceled or completed before freeing the memory.


How can this vulnerability impact me? :

This vulnerability can lead to use-after-free conditions in the kernel, which may cause system crashes, instability, or potentially allow attackers to execute arbitrary code or escalate privileges if they can trigger the race condition. It affects the reliability and security of systems using the affected Marvell SAS/SATA controller driver.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, update the Linux kernel to a version where the mvsas driver replaces cancel_delayed_work() with cancel_delayed_work_sync() in the mvs_free() function. This ensures that the delayed work item is properly canceled and any executing delayed work completes before the mvs_info structure is deallocated, preventing use-after-free scenarios.


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