KernelScan.io

HIGH Introduced in 5.13

nfs pnfs LayoutSeg Leak

CVE-2026-89710

CVSS 7.5 / 10.0 KernelScan AI

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

01

In the Linux kernel, the following vulnerability has been resolved: NFSv4.1: fix layout segment leak on the pnfs_layout_process() forget path When the server returns a new layout stateid while a valid one is still held, pnfs_layout_process() calls pnfs_mark_matching_lsegs_return() on the on-stack free_me list and jumps to out_forget. Segments whose reference count drops to zero are unlinked from lo->plh_segs and moved to free_me by mark_lseg_invalid(); for an idle cached segment the layout header holds the only reference, so this happens on the first decrement. out_forget never drains free_me -- only the success path calls pnfs_free_lseg_list(). Commit 814b84971388 ("pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process()") added the drain; commit 08bd8dbe8882 ("pNFS/NFSv4: Try to return invalid layout in pnfs_layout_process()") removed it while switching the destination to lo->plh_return_segs, which is drained elsewhere. Commit fb700ef02676 ("NFSv4.1: Simplify layout return in pnfs_layout_process()") switched the destination back to free_me without restoring the drain. Restore the pnfs_free_lseg_list() call.

02

Engine v0.6.0

Risk summary

An NFSv4.1 server returning a new layout stateid while a valid one is still held causes the NFS client to leak layout segments on the forget path. The leaked segments are never freed, and repeated triggering can exhaust client memory. The bug is reachable by any NFSv4.1 client communicating with a malicious or misbehaving server.

Affectedfs/nfs/pnfs.c (NFSv4.1 pNFS)

Vulnerability analysis

When an NFSv4.1 server returns a new layout stateid while the client still holds a valid one, the client invalidates the old layout segments and moves them onto a local cleanup list, then jumps to an error path that never frees that list. The segments are unlinked from the layout header but their memory is never released, so each occurrence leaks one or more layout segment objects. The fix restores the missing call that drains the cleanup list on the error path, so the segments are freed before returning. The vulnerable path is reached by an NFSv4.1 client processing layout responses from a server, so a malicious or misbehaving NFS server can trigger the leak repeatedly against any client that mounts it.

03

BranchIntroducedFixed inPatch commit
5.155.135.15.221f52188118d31
6.15.136.1.188ad3e41855325
6.125.136.12.1097c5b0e813efd
6.185.136.18.5036e3f13bf072
6.65.136.6.157a080bb69d30f
7.25.137.2.432ac1b0b7f1c
mainline5.137.3ee5a386cfe60
cip/6.15.136.1.189-cip61ad3e41855325
cip/6.1-rt5.136.1.189-cip61-rt32ad3e41855325
cip/6.125.136.12.111-cip327c5b0e813efd

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.111-cip32
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32