CVE-2025-40343: nvmet-fc: avoid scheduling association deletion twice
In the Linux kernel, the following vulnerability has been resolved:
nvmet-fc: avoid scheduling association deletion twice
When forcefully shutting down a port via the configfs interface, nvmetportsubsysdroplink() first calls nvmetportdelctrls() and then nvmetdisableport(). Both functions will eventually schedule all remaining associations for deletion.
The current implementation checks whether an association is about to be removed, but only after the work item has already been scheduled. As a result, it is possible for the first scheduled work item to free all resources, and then for the same work item to be scheduled again for deletion.
Because the association list is an RCU list, it is not possible to take a lock and remove the list entry directly, so it cannot be looked up again. Instead, a flag (terminating) must be used to determine whether the association is already in the process of being deleted.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-40343?
CVE-2025-40343 has a moderate severity rating due to its impact on the stability of the Linux kernel.
How do I fix CVE-2025-40343?
To fix CVE-2025-40343, update the Linux kernel to the latest stable version where the vulnerability has been patched.
What systems are affected by CVE-2025-40343?
CVE-2025-40343 affects Linux kernel versions prior to the security patch addressing this vulnerability.
What are the potential risks of CVE-2025-40343?
The risks of CVE-2025-40343 include potential instability and security issues when forcefully shutting down ports.
When was CVE-2025-40343 discovered?
CVE-2025-40343 was disclosed in 2025 as part of ongoing security assessments of the Linux kernel.