KernelScan.io

CRITICAL Introduced in 3.16

nfsd Sequence Overflow

CVE-2026-99362

CVSS 9.8 / 10.0 NVD

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

KernelScan AI9.8CRITICAL

01

In the Linux kernel, the following vulnerability has been resolved: nfsd: preflight SEQUENCE replies before accepting a slot nfsd4_sequence() narrows the reply buffer to the session's cached reply limit before it accepts the slot seqid. A client may negotiate ca_maxresponsesize_cached down to NFSD_MIN_HDR_SEQ_SZ, and nfsd4_alloc_slot() then gives every slot a zero-length sl_data[]. A COMPOUND tag can fill that narrowed buffer until it holds the SEQUENCE opcode but not the status word that follows. nfsd4_encode_operation() returns without running nfsd4_encode_sequence(), so cstate.data_offset stays zero. It leaves op->status at nfs_ok as well, so the COMPOUND is treated as having succeeded. nfsd4_store_cache_entry() declines to cache a lone SEQUENCE that returned an error. That test reads the status the operation reported, so it passes here. The copy starts at offset zero and takes the whole reply, RPC and COMPOUND headers included, into the zero-length sl_data[]. The COMPOUND tag is copied along with it, so the client picks most of the bytes written past the end of the slot: BUG: KASAN: slab-out-of-bounds in read_bytes_from_xdr_buf+0x1bc/0x390 Write of size 80 at addr ffff888003a549cd by task kunit_try_catch/24 __asan_memcpy+0x38/0x60 read_bytes_from_xdr_buf+0x1bc/0x390 nfsd4_sequence_done+0x5b0/0x810 nfs4svc_encode_compoundres+0x1bf/0x240 Check that the fixed-size SEQUENCE result, plus room for a following operation's error status, fits the negotiated limit before narrowing the buffer and consuming the slot seqid. The slot and its reply cache are left unchanged, as RFC 8881 Section 2.10.6.1.2 requires of an error returned from SEQUENCE.

02

Engine v0.10.0

Risk summary

An unauthenticated NFSv4.1 client can trigger a heap buffer overflow in the kernel NFS server by negotiating a minimal cached reply size and sending a crafted COMPOUND request. This allows remote code execution or kernel crash on any system running the NFS server with NFSv4.1 sessions enabled.

Affectedfs/nfsd/nfs4state.c (nfsd)

Vulnerability analysis

The NFSv4.1 server lets a client negotiate the maximum cached reply size down to a minimum that leaves each session slot with a zero-length data buffer. When the server processes a COMPOUND request, it narrows the reply buffer to this limit before accepting the slot sequence ID. A malicious request can fill the narrowed buffer with just the SEQUENCE opcode but no status word, causing the encoder to skip writing the SEQUENCE result while still marking the operation as successful. The reply cache then copies the entire RPC and COMPOUND response — including headers and the COMPOUND tag — into the zero-length slot buffer, writing dozens of bytes past its end. The fix adds a preflight check that verifies the fixed-size SEQUENCE result plus room for a following operation's error status will fit in the negotiated limit before the buffer is narrowed and the slot is consumed, returning an error to the client without corrupting memory. Any network peer that can open an NFSv4.1 session to the server can trigger this vulnerability without authentication or special privileges.

03

BranchIntroducedFixed inPatch commit
5.103.165.10.275aff12e327620
5.153.165.15.2266a26c5473bb1
6.13.166.1.193fa85acf074f0
6.123.166.12.1171a5a227bca6a
6.183.166.18.6137fc2ec21163
6.63.166.6.163cd303eb29cf3
7.33.167.3.2ed98b0c57e5e
mainline3.167.4-rc135ff1a7a7e38
cip/6.123.166.12.117-cip351a5a227bca6a

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.117-cip35
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip137)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip137-rt51)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip116)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)