{"id":71951,"date":"2025-10-18T11:45:34","date_gmt":"2025-10-18T08:15:34","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-40001-scsi-mvsas-fix-use-after-free-bugs-in-mvs_work_queue\/"},"modified":"2025-10-18T11:45:34","modified_gmt":"2025-10-18T08:15:34","slug":"cve-2025-40001-scsi-mvsas-fix-use-after-free-bugs-in-mvs_work_queue","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-40001-scsi-mvsas-fix-use-after-free-bugs-in-mvs_work_queue\/","title":{"rendered":"CVE-2025-40001 &#8211; scsi: mvsas: Fix use-after-free bugs in mvs_work_queue"},"content":{"rendered":"<p>CVE ID : CVE-2025-40001<\/p>\n<p>Published :  Oct. 18, 2025, 8:15 a.m. | 25\u00a0minutes ago<\/p>\n<p>Description : In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>scsi: mvsas: Fix use-after-free bugs in mvs_work_queue<\/p>\n<p>During the detaching of Marvell&#8217;s SAS\/SATA controller, the original code<br \/>\ncalls cancel_delayed_work() in mvs_free() to cancel the delayed work<br \/>\nitem mwq-&gt;work_q. However, if mwq-&gt;work_q is already running, the<br \/>\ncancel_delayed_work() may fail to cancel it. This can lead to<br \/>\nuse-after-free scenarios where mvs_free() frees the mvs_info while<br \/>\nmvs_work_queue() is still executing and attempts to access the<br \/>\nalready-freed mvs_info.<\/p>\n<p>A typical race condition is illustrated below:<\/p>\n<p>CPU 0 (remove)            | CPU 1 (delayed work callback)<br \/>\nmvs_pci_remove()          |<br \/>\n  mvs_free()              | mvs_work_queue()<br \/>\n    cancel_delayed_work() |<br \/>\n      kfree(mvi)          |<br \/>\n                          |   mvi-&gt; \/\/ UAF<\/p>\n<p>Replace cancel_delayed_work() with cancel_delayed_work_sync() to ensure<br \/>\nthat the delayed work item is properly canceled and any executing<br \/>\ndelayed work item completes before the mvs_info is deallocated.<\/p>\n<p>This bug was found by static analysis.<\/p>\n<p>Severity: 0.0 | NA<\/p>\n<p>Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-40001 Published : Oct. 18, 2025, 8:15 a.m. | 25\u00a0minutes ago 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&#8217;s SAS\/SATA controller, the original code calls cancel_delayed_work() in mvs_free() to cancel the delayed work item mwq-&gt;work_q. However, &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-71951","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/71951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=71951"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/71951\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=71951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=71951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=71951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}