CVE-2025-40001
Gravedad:
Pendiente de análisis
Tipo:
No Disponible / Otro tipo
Fecha de publicación:
18/10/2025
Última modificación:
19/10/2025
Descripción
*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
scsi: mvsas: Fix use-after-free bugs in mvs_work_queue<br />
<br />
During the detaching of Marvell&#39;s SAS/SATA controller, the original code<br />
calls cancel_delayed_work() in mvs_free() to cancel the delayed work<br />
item mwq->work_q. However, if mwq->work_q is already running, the<br />
cancel_delayed_work() may fail to cancel it. This can lead to<br />
use-after-free scenarios where mvs_free() frees the mvs_info while<br />
mvs_work_queue() is still executing and attempts to access the<br />
already-freed mvs_info.<br />
<br />
A typical race condition is illustrated below:<br />
<br />
CPU 0 (remove) | CPU 1 (delayed work callback)<br />
mvs_pci_remove() |<br />
mvs_free() | mvs_work_queue()<br />
cancel_delayed_work() |<br />
kfree(mvi) |<br />
| mvi-> // UAF<br />
<br />
Replace cancel_delayed_work() with cancel_delayed_work_sync() to ensure<br />
that the delayed work item is properly canceled and any executing<br />
delayed work item completes before the mvs_info is deallocated.<br />
<br />
This bug was found by static analysis.
Impacto
Referencias a soluciones, herramientas e información
- https://git.kernel.org/stable/c/00d3af40b158ebf7c7db2b3bbb1598a54bf28127
- https://git.kernel.org/stable/c/3c90f583d679c81a5a607a6ae0051251b6dee35b
- https://git.kernel.org/stable/c/60cd16a3b7439ccb699d0bf533799eeb894fd217
- https://git.kernel.org/stable/c/6ba7e73cafd155a5d3abf560d315f0bab2b9d89f
- https://git.kernel.org/stable/c/c2c35cb2a31844f84f21ab364b38b4309d756d42
- https://git.kernel.org/stable/c/feb946d2fc9dc754bf3d594d42cd228860ff8647