CVE-2025-40342
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-40342 is a race condition vulnerability in the Linux kernel's NVMe-FC (NVMe over Fibre Channel) subsystem, specifically in the remote port registration and association process. The flaw exists because nvme_fc_unregister_remote can remove a remote port on a local port (lport) object at any time when no active association exists, racing with the reconnect logic in nvme_fc_create_association, which does not take a lock before checking port_state or atomically incrementing the active count on the remote port (rport). It was published on December 9, 2025, and affects the Linux kernel across multiple stable branches. The CVSS v3.1 base score is 7.0 (High) (Microsoft MSRC, ENISA EUVD).

Technical details

The root cause is a classic time-of-check to time-of-use (TOCTOU) race condition (CWE-362) in the Linux kernel's drivers/nvme/host/fc.c. When nvme_fc_create_association checks the port_state of an rport and attempts to increment its active reference count, it does so without holding the appropriate lock, allowing a concurrent call to nvme_fc_unregister_remote to remove the rport between the check and the increment. This can result in a use-after-free or null pointer dereference condition. The attack vector is local, requires low privileges, and has high attack complexity due to the need to trigger the specific race window (Microsoft MSRC, ENISA EUVD).

Impact

Successful exploitation of this race condition could result in high confidentiality, integrity, and availability impacts on the affected system. An attacker with local low-privilege access who wins the race could cause kernel memory corruption (use-after-free), potentially leading to system instability, kernel panic, or unauthorized code execution in kernel context. The scope is limited to the affected host, but kernel-level compromise could enable privilege escalation and full system takeover (Microsoft MSRC, ENISA EUVD).

Mitigation and workarounds

Patches have been backported to multiple stable Linux kernel versions. Administrators should update to the following fixed versions or later: 5.10.247, 5.15.197, 6.1.159, 6.6.117, 6.12.58, or 6.17.8/6.18. Debian LTS users should apply the linux-6.1 DLA-4436-1 update, and Ubuntu users should apply USN-8096-1, USN-8096-2, USN-8096-3, or USN-8096-5 as applicable. As a temporary workaround, disabling NVMe-FC on systems where it is not required can eliminate the attack surface (ENISA EUVD, Ubuntu USN-8096-1, Debian LTS).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-64557NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-selftests-internal
NoNoJul 29, 2026
CVE-2026-64556NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-64k-devel
NoNoJul 29, 2026
CVE-2026-64555NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-fde-6.14
NoNoJul 27, 2026
CVE-2026-64554NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-gcp-6.14
NoYesJul 27, 2026
CVE-2026-64553NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-64k-debug-modules-internal
NoYesJul 27, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management