CVE-2026-99362: nfsd: preflight SEQUENCE replies before accepting a slot
In the Linux kernel, the following vulnerability has been resolved:
nfsd: preflight SEQUENCE replies before accepting a slot
nfsd4sequence() narrows the reply buffer to the session's cached reply limit before it accepts the slot seqid. A client may negotiate camaxresponsesizecached down to NFSDMINHDRSEQSZ, and nfsd4allocslot() then gives every slot a zero-length sldata[]. A COMPOUND tag can fill that narrowed buffer until it holds the SEQUENCE opcode but not the status word that follows. nfsd4encodeoperation() returns without running nfsd4encodesequence(), so cstate.dataoffset stays zero. It leaves op->status at nfsok as well, so the COMPOUND is treated as having succeeded.
nfsd4storecacheentry() 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 sldata[]. 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 readbytesfromxdrbuf+0x1bc/0x390 Write of size 80 at addr ffff888003a549cd by task kunittrycatch/24 asanmemcpy+0x38/0x60 readbytesfromxdrbuf+0x1bc/0x390 nfsd4sequencedone+0x5b0/0x810 nfs4svcencodecompoundres+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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.3-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1