# CVE-2025-40342: nvme-fc: use lock accessing port\_state and rport state

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

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.46% (percentile 32, 2026-11-26)
- **Published:** 2025-12-09T04:09:59.673Z
- **Modified:** 2026-10-14T21:10:00.183Z

## Who should check

- Anyone running Linux \>= e399441de9115cd472b8ace6c517708273ca7997, \< de3d91af47bc015031e7721b100a29989f6498a5; \>= e399441de9115cd472b8ace6c517708273ca7997, \< e8cde03de8674b05f2c5e0870729049eba517800; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 4253e0a4546138a2bf9cb6acf66b32fee677fc7c; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 25f4bf1f7979a7871974fd36c79d69ff1cf4b446; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 9950af4303942081dc8c7a5fdc3688c17c7eb6c0; \>= e399441de9115cd472b8ace6c517708273ca7997, \< a2f7fa75c4a2a07328fa22ccbef461db76790b55; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 891cdbb162ccdb079cd5228ae43bdeebce8597ad
- Anyone running Linux 4.10

## Description

In the Linux kernel, the following vulnerability has been resolved:

nvme-fc: use lock accessing port\_state and rport state

nvme\_fc\_unregister\_remote removes the remote port on a lport object at
any point in time when there is no active association. This races with
with the reconnect logic, because nvme\_fc\_create\_association is not
taking a lock to check the port\_state and atomically increase the
active count on the rport.

## Affected and fixed versions

- Linux: \>= e399441de9115cd472b8ace6c517708273ca7997, \< de3d91af47bc015031e7721b100a29989f6498a5; \>= e399441de9115cd472b8ace6c517708273ca7997, \< e8cde03de8674b05f2c5e0870729049eba517800; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 4253e0a4546138a2bf9cb6acf66b32fee677fc7c; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 25f4bf1f7979a7871974fd36c79d69ff1cf4b446; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 9950af4303942081dc8c7a5fdc3688c17c7eb6c0; \>= e399441de9115cd472b8ace6c517708273ca7997, \< a2f7fa75c4a2a07328fa22ccbef461db76790b55; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 891cdbb162ccdb079cd5228ae43bdeebce8597ad (cvelist)
- Linux: 4.10 (cvelist)

## Mitigation

- Upgrade Linux to 891cdbb162ccdb079cd5228ae43bdeebce8597ad 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-40342. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40342.md
Affected: Linux >= e399441de9115cd472b8ace6c517708273ca7997, < de3d91af47bc015031e7721b100a29989f6498a5; >= e399441de9115cd472b8ace6c517708273ca7997, < e8cde03de8674b05f2c5e0870729049eba517800; >= e399441de9115cd472b8ace6c517708273ca7997, < 4253e0a4546138a2bf9cb6acf66b32fee677fc7c; >= e399441de9115cd472b8ace…
Fixed in: Linux 4253e0a4546138a2bf9cb6acf66b32fee677fc7c, Linux 25f4bf1f7979a7871974fd36c79d69ff1cf4b446, Linux 9950af4303942081dc8c7a5fdc3688c17c7eb6c0, Linux 891cdbb162ccdb079cd5228ae43bdeebce8597ad

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-40342 being exploited?

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

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

High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= e399441de9115cd472b8ace6c517708273ca7997, \< de3d91af47bc015031e7721b100a29989f6498a5; \>= e399441de9115cd472b8ace6c517708273ca7997, \< e8cde03de8674b05f2c5e0870729049eba517800; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 4253e0a4546138a2bf9cb6acf66b32fee677fc7c; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 25f4bf1f7979a7871974fd36c79d69ff1cf4b446; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 9950af4303942081dc8c7a5fdc3688c17c7eb6c0; \>= e399441de9115cd472b8ace6c517708273ca7997, \< a2f7fa75c4a2a07328fa22ccbef461db76790b55; \>= e399441de9115cd472b8ace6c517708273ca7997, \< 891cdbb162ccdb079cd5228ae43bdeebce8597ad; Linux 4.10.

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

Yes. Fixed in Linux 4253e0a4546138a2bf9cb6acf66b32fee677fc7c, Linux 25f4bf1f7979a7871974fd36c79d69ff1cf4b446, Linux 9950af4303942081dc8c7a5fdc3688c17c7eb6c0, Linux 891cdbb162ccdb079cd5228ae43bdeebce8597ad. Upgrade Linux to 891cdbb162ccdb079cd5228ae43bdeebce8597ad or later.

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

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/de3d91af47bc015031e7721b100a29989f6498a5>
- other: <https://git.kernel.org/stable/c/e8cde03de8674b05f2c5e0870729049eba517800>
- other: <https://git.kernel.org/stable/c/4253e0a4546138a2bf9cb6acf66b32fee677fc7c>
- other: <https://git.kernel.org/stable/c/25f4bf1f7979a7871974fd36c79d69ff1cf4b446>
- other: <https://git.kernel.org/stable/c/9950af4303942081dc8c7a5fdc3688c17c7eb6c0>
- other: <https://git.kernel.org/stable/c/a2f7fa75c4a2a07328fa22ccbef461db76790b55>
- other: <https://git.kernel.org/stable/c/891cdbb162ccdb079cd5228ae43bdeebce8597ad>

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

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