CVE-2025-40171
Description
In the Linux kernel, the following vulnerability has been resolved:
nvmet-fc: move lsop put work to nvmet_fc_ls_req_op
It’s possible for more than one async command to be in flight from __nvmet_fc_send_ls_req. For each command, a tgtport reference is taken.
In the current code, only one put work item is queued at a time, which results in a leaked reference.
To fix this, move the work item to the nvmet_fc_ls_req_op struct, which already tracks all resources related to the command.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In the Linux kernel's nvmet-fc, a race condition in the lsop work item handling leads to a tgtport reference leak when multiple async LS commands are in flight, potentially causing resource exhaustion.
Root
Cause The vulnerability resides in the Linux kernel's nvmet-fc (NVMe over Fabrics target for Fibre Channel) subsystem. When the function __nvmet_fc_send_ls_req() dispatches multiple asynchronous Link Service (LS) requests, each request acquires a reference on the tgtport object. However, the code that releases these references was incorrectly structured: only a single work item was queued globally to perform the put operation. Consequently, if multiple LS commands are in flight concurrently, only the last command's reference is released, while the references for preceding commands are leaked [1][2][3].
Exploitation
An attacker capable of sending multiple concurrent LS requests to a vulnerable NVMe-oF target over Fibre Channel can trigger this race condition. No authentication is required beyond network access to the target's Fibre Channel fabric. The flaw is exercised simply by normal command processing; no unusual privileges are needed.
Impact
A successful exploitation results in a reference count leak on the nvmet_fc_tgtport structure. Over time, this leads to memory exhaustion as the leaked references prevent the port from being freed. The kernel may eventually run out of memory, causing a denial-of-service (DoS) condition that disrupts all NVMe-oF operations on the affected system.
Mitigation
The fix moves the put work item from a global schedule to the per-command nvmet_fc_ls_req_op structure, ensuring each command individually cleans up its own reference. The patch has been applied to the stable kernel branches and is available in commits [1], [2], and [3]. Users should update to a kernel version containing the fix.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
611269c08013fa28112cc5501060ecc81240e7331925c247b7a619f8c8691db5a5406fb7eVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- git.kernel.org/stable/c/060ecc81240ef9d60d9485a3a5eb55a0d6e7a25cnvd
- git.kernel.org/stable/c/11269c08013f4ee8b8f5edc6c56700acb34092d0nvd
- git.kernel.org/stable/c/7331925c247b03b7767b8cd93cfe1b7aa2377850nvd
- git.kernel.org/stable/c/7a619f8c869117ffed08365b377f66b7e1d941b4nvd
- git.kernel.org/stable/c/a28112cc55013cd8cbd5d36b5115a5b851151bd9nvd
- git.kernel.org/stable/c/db5a5406fb7e5337a074385c7a3e53c77f2c1bd3nvd
News mentions
0No linked articles in our index yet.