Skip to contentSkip to conversation

CVE-2026-23038: pnfs/flexfiles: Fix memory leak in nfs4_ff_alloc_deviceid_node()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jan 31

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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.

The Linux kernel CVE team has assigned CVE-2026-23038 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.0 with commit d67ae825a59d639e4d8b82413af84d854617a87e and fixed in 6.6.122 with commit 869862056e100973e76ce9f5f1b01837771b7722
	Issue introduced in 4.0 with commit d67ae825a59d639e4d8b82413af84d854617a87e and fixed in 6.12.67 with commit 86da7efd12295a7e2b4abde5e5984c821edd938f
	Issue introduced in 4.0 with commit d67ae825a59d639e4d8b82413af84d854617a87e and fixed in 6.18.7 with commit ed5d3f2f6885eb99f729e6ffd946e3aa058bd3eb
	Issue introduced in 4.0 with commit d67ae825a59d639e4d8b82413af84d854617a87e and fixed in 6.19-rc6 with commit 0c728083654f0066f5e10a1d2b0bd0907af19a58

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-23038

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/nfs/flexfilelayout/flexfilelayoutdev.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/869862056e100973e76ce9f5f1b01837771b7722
	https://git.kernel.org/stable/c/86da7efd12295a7e2b4abde5e5984c821edd938f
	https://git.kernel.org/stable/c/ed5d3f2f6885eb99f729e6ffd946e3aa058bd3eb
	https://git.kernel.org/stable/c/0c728083654f0066f5e10a1d2b0bd0907af19a58