Skip to contentSkip to conversation

CVE-2025-40210: Revert "NFSD: Remove the cap on number of operations per NFSv4 COMPOUND"

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 21, 2025

lore
Share & tools
lore
#0 lore raw

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

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

Revert "NFSD: Remove the cap on number of operations per NFSv4 COMPOUND"

I've found that pynfs COMP6 now leaves the connection or lease in a strange state, which causes CLOSE9 to hang indefinitely. I've dug into it a little, but I haven't been able to root-cause it yet. However, I bisected to commit 48aab1606fa8 ("NFSD: Remove the cap on number of operations per NFSv4 COMPOUND").

Tianshuo Han also reports a potential vulnerability when decoding an NFSv4 COMPOUND. An attacker can place an arbitrarily large op count in the COMPOUND header, which results in:

[   51.410584] nfsd: vmalloc error: size 1209533382144, exceeds total

pages, mode:0xdc0(GFP_KERNEL|__GFP_ZERO),
nodemask=(null),cpuset=/,mems_allowed=0

when NFSD attempts to allocate the COMPOUND op array.

Let's restore the operation-per-COMPOUND limit, but increased to 200 for now.

The Linux kernel CVE team has assigned CVE-2025-40210 to this issue.

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

	Fixed in 6.17.8 with commit b3ee7ce432289deac87b9d14e01f2fe6958f7f0b
	Fixed in 6.18-rc4 with commit 3e7f011c255582d7c914133785bbba1990441713

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-2025-40210

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/nfsd/nfs4proc.c
	fs/nfsd/nfs4state.c
	fs/nfsd/nfs4xdr.c
	fs/nfsd/nfsd.h
	fs/nfsd/xdr4.h

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/b3ee7ce432289deac87b9d14e01f2fe6958f7f0b
	https://git.kernel.org/stable/c/3e7f011c255582d7c914133785bbba1990441713