# CVE-2025-40001: scsi: mvsas: Fix use-after-free bugs in mvs\_work\_queue

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.29% (percentile 14, 2026-11-26)
- **Published:** 2025-10-18T08:03:21.935Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< a6f68f219d4d4b92d7c781708d4afc4cc42961ec; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< aacd1777d4a795c387a20b9ca776e2c1225d05d7; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 6ba7e73cafd155a5d3abf560d315f0bab2b9d89f; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< c2c35cb2a31844f84f21ab364b38b4309d756d42; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 3c90f583d679c81a5a607a6ae0051251b6dee35b; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 00d3af40b158ebf7c7db2b3bbb1598a54bf28127; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< feb946d2fc9dc754bf3d594d42cd228860ff8647; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 60cd16a3b7439ccb699d0bf533799eeb894fd217
- Anyone running Linux 2.6.31

## 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.

## Affected and fixed versions

- Linux: \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< a6f68f219d4d4b92d7c781708d4afc4cc42961ec; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< aacd1777d4a795c387a20b9ca776e2c1225d05d7; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 6ba7e73cafd155a5d3abf560d315f0bab2b9d89f; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< c2c35cb2a31844f84f21ab364b38b4309d756d42; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 3c90f583d679c81a5a607a6ae0051251b6dee35b; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 00d3af40b158ebf7c7db2b3bbb1598a54bf28127; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< feb946d2fc9dc754bf3d594d42cd228860ff8647; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 60cd16a3b7439ccb699d0bf533799eeb894fd217 (cvelist)
- Linux: 2.6.31 (cvelist)

## Mitigation

- Upgrade Linux to 60cd16a3b7439ccb699d0bf533799eeb894fd217 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-40001. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40001.md
Affected: Linux >= 20b09c2992fefbe78f8cede7b404fb143a413c52, < a6f68f219d4d4b92d7c781708d4afc4cc42961ec; >= 20b09c2992fefbe78f8cede7b404fb143a413c52, < aacd1777d4a795c387a20b9ca776e2c1225d05d7; >= 20b09c2992fefbe78f8cede7b404fb143a413c52, < 6ba7e73cafd155a5d3abf560d315f0bab2b9d89f; >= 20b09c2992fefbe78f8cede…
Fixed in: Linux 6ba7e73cafd155a5d3abf560d315f0bab2b9d89f, Linux 3c90f583d679c81a5a607a6ae0051251b6dee35b, Linux 00d3af40b158ebf7c7db2b3bbb1598a54bf28127, Linux 60cd16a3b7439ccb699d0bf533799eeb894fd217

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-40001 being exploited?

There is no confirmed exploitation: CVE-2025-40001 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-40001?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2025-40001?

Linux \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< a6f68f219d4d4b92d7c781708d4afc4cc42961ec; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< aacd1777d4a795c387a20b9ca776e2c1225d05d7; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 6ba7e73cafd155a5d3abf560d315f0bab2b9d89f; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< c2c35cb2a31844f84f21ab364b38b4309d756d42; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 3c90f583d679c81a5a607a6ae0051251b6dee35b; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 00d3af40b158ebf7c7db2b3bbb1598a54bf28127; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< feb946d2fc9dc754bf3d594d42cd228860ff8647; \>= 20b09c2992fefbe78f8cede7b404fb143a413c52, \< 60cd16a3b7439ccb699d0bf533799eeb894fd217; Linux 2.6.31.

### Is there a fix for CVE-2025-40001?

Yes. Fixed in Linux 6ba7e73cafd155a5d3abf560d315f0bab2b9d89f, Linux 3c90f583d679c81a5a607a6ae0051251b6dee35b, Linux 00d3af40b158ebf7c7db2b3bbb1598a54bf28127, Linux 60cd16a3b7439ccb699d0bf533799eeb894fd217. Upgrade Linux to 60cd16a3b7439ccb699d0bf533799eeb894fd217 or later.

### How do I check if I'm affected by CVE-2025-40001?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/a6f68f219d4d4b92d7c781708d4afc4cc42961ec>
- other: <https://git.kernel.org/stable/c/aacd1777d4a795c387a20b9ca776e2c1225d05d7>
- other: <https://git.kernel.org/stable/c/6ba7e73cafd155a5d3abf560d315f0bab2b9d89f>
- other: <https://git.kernel.org/stable/c/c2c35cb2a31844f84f21ab364b38b4309d756d42>
- other: <https://git.kernel.org/stable/c/3c90f583d679c81a5a607a6ae0051251b6dee35b>
- other: <https://git.kernel.org/stable/c/00d3af40b158ebf7c7db2b3bbb1598a54bf28127>
- other: <https://git.kernel.org/stable/c/feb946d2fc9dc754bf3d594d42cd228860ff8647>
- other: <https://git.kernel.org/stable/c/60cd16a3b7439ccb699d0bf533799eeb894fd217>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-40001>

HTML: <https://flawdb.com/CVE-2025-40001> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-40001>
