CVE-2026-23038
Description
In the Linux kernel, the following vulnerability has been resolved:
pnfs/flexfiles: Fix memory leak in nfs4_ff_alloc_deviceid_node()
In nfs4_ff_alloc_deviceid_node(), if the allocation for ds_versions fails, the function jumps to the out_scratch label without freeing the already allocated dsaddrs list, leading to a memory leak.
Fix this by jumping to the out_err_drain_dsaddrs label, which properly frees the dsaddrs list before cleaning up other resources.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Memory leak in Linux kernel's NFS pNFS flexfiles driver when device ID allocation fails, allowing resource exhaustion.
Vulnerability
A memory leak vulnerability exists in the nfs4_ff_alloc_deviceid_node() function of the Linux kernel's pNFS flexfiles layout driver. When the function successfully allocates the dsaddrs list but subsequently fails to allocate the ds_versions array, the error handling path jumps to the out_scratch label, which frees the scratch buffer but does not free the already allocated dsaddrs list. This oversight causes the memory occupied by dsaddrs to be leaked (Reference [1], [2], [3], [4]).
Exploitation
The vulnerability is triggered during the processing of NFSv4.1 pNFS operations when the client receives device ID information from the server. An attacker with the ability to affect the allocation result (e.g., by exhausting memory on the client or by sending crafted responses that cause the ds_versions allocation to fail) can cause repeated invocation of the buggy code path. No authentication is required beyond the ability to mount an NFS share using the flexfiles layout, which is a standard client-server interaction.
Impact
Successful exploitation leads to a continuous memory leak on the affected NFS client. Over time, repeated triggering can exhaust the system's memory, resulting in denial-of-service conditions such as system instability, OOM (out-of-memory) killer activation, or crash. Linux kernel vulnerability.
Mitigation
The fix modifies the error handling in nfs4_ff_alloc_deviceid_node() to jump to a newly introduced out_err_drain_dsaddrs label, which properly frees the dsaddrs list before cleaning up other resources. The fix has been backported to multiple stable kernel branches (References [1], [2], [3], [4]). Users should apply the latest kernel updates from their distribution or mainline. No workaround is available other than avoiding use of the flexfiles layout.
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
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- git.kernel.org/stable/c/0c728083654f0066f5e10a1d2b0bd0907af19a58nvd
- git.kernel.org/stable/c/27c90d8ed81e7a289c9fe41b5e31d8bb609a3385nvd
- git.kernel.org/stable/c/34b9dd179818ff7af2b36410985fd8166573c62dnvd
- git.kernel.org/stable/c/869862056e100973e76ce9f5f1b01837771b7722nvd
- git.kernel.org/stable/c/86da7efd12295a7e2b4abde5e5984c821edd938fnvd
- git.kernel.org/stable/c/e2dde5dafb80f1af4028ed10ad255f42af71c784nvd
- git.kernel.org/stable/c/ed5d3f2f6885eb99f729e6ffd946e3aa058bd3ebnvd
News mentions
0No linked articles in our index yet.