KernelScan.io

HIGH Introduced in 4.2

nfs LayoutStats Overflow

CVE-2026-90103

CVSS 7.5 / 10.0 NVD

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

KernelScan AI7.5HIGH

01

In the Linux kernel, the following vulnerability has been resolved: NFSv4.2: fix LAYOUTSTATS send buffer exhaustion encode_layoutstats_maxsz budgets XDR_QUADLEN(PNFS_LAYOUTSTATS_MAXSIZE), i.e. 256 bytes, for the layoutupdate4 body written by the layout driver. The flexfiles record can exceed that. ff_layout_encode_ff_layoutupdate() emits, per data server, a netaddr4, an nfs_fh4, two ff_io_latency4, an nfstime4 and a bool. A data server whose filehandle is NFS_MAXFHSIZE bytes long already accounts for 132 of those bytes, and the two ff_io_latency4 at 64 bytes each, the nfstime4 and the bool add a further 144, so the body passes 256 bytes before the netaddr4 is encoded at all. encode_layoutstats() additionally writes the deviceid4 and the layoutupdate4 lou_type word, neither of which the macro accounts for. The filehandle and the address are both chosen by the server, through LAYOUTGET and GETDEVICEINFO, so it can drive the encoder past the end of the send buffer. xdr_reserve_space() returns NULL once that happens, and the two ff_layout_encode_io_latency() calls run with dss_info->mirror->lock held, so a NULL return there leaves the lock permanently held. Raise PNFS_LAYOUTSTATS_MAXSIZE to 384 so that the record fits inside the reservation.

02

Engine v0.6.0

Risk summary

A malicious or compromised NFS server can crash or deadlock any client that mounts its shares using the pNFS flexfiles layout. The server supplies oversized filehandles and addresses through standard protocol responses, causing the client's LAYOUTSTATS encoder to exhaust its send buffer. No client-side privileges are needed beyond having the share mounted.

Affectedinclude/linux/nfs_xdr.h (NFSv4.2 pNFS flexfiles)

Vulnerability analysis

The NFSv4.2 pNFS flexfiles layout statistics encoder reserves too little send-buffer space for the data it writes. A malicious NFS server can supply oversized filehandles and network addresses through its LAYOUTGET and GETDEVICEINFO responses, driving the encoder past the reserved buffer. Once the buffer is exhausted, the space-reservation function returns NULL, but the encoding code does not handle this failure — it leaves a spinlock permanently held, deadlocking the client, and may dereference the NULL pointer, crashing the kernel. The fix increases the reserved buffer size from 256 to 384 bytes so the encoded record always fits. Any system that mounts NFS shares using the pNFS flexfiles layout from an untrusted or compromised server is exposed; the trigger requires no privileges on the client beyond having the share mounted and performing normal I/O.

03

BranchIntroducedFixed inPatch commit
5.104.25.10.270842ac2661542
5.154.25.15.221397aa7000bbf
6.64.26.6.1575aca000630c0
6.184.26.18.523815b894b922
7.24.27.2.6a973622da0c6
mainline4.27.3-rc1c75ef2137e74
6.124.26.12.110cb11590c7ddc
6.14.26.1.188e82d7d999fe9
cip/6.124.26.12.111-cip32cb11590c7ddc