{"id":"CVE-2026-99362","state":"PUBLISHED","title":"nfsd: preflight SEQUENCE replies before accepting a slot","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: preflight SEQUENCE replies before accepting a slot\n\nnfsd4_sequence() narrows the reply buffer to the session's cached\nreply limit before it accepts the slot seqid. A client may negotiate\nca_maxresponsesize_cached down to NFSD_MIN_HDR_SEQ_SZ, and\nnfsd4_alloc_slot() then gives every slot a zero-length sl_data[]. A\nCOMPOUND tag can fill that narrowed buffer until it holds the\nSEQUENCE opcode but not the status word that follows.\nnfsd4_encode_operation() returns without running\nnfsd4_encode_sequence(), so cstate.data_offset stays zero. It leaves\nop->status at nfs_ok as well, so the COMPOUND is treated as having\nsucceeded.\n\nnfsd4_store_cache_entry() declines to cache a lone SEQUENCE that\nreturned an error. That test reads the status the operation\nreported, so it passes here. The copy starts at offset zero and\ntakes the whole reply, RPC and COMPOUND headers included, into the\nzero-length sl_data[]. The COMPOUND tag is copied along with it, so\nthe client picks most of the bytes written past the end of the slot:\n\n  BUG: KASAN: slab-out-of-bounds in read_bytes_from_xdr_buf+0x1bc/0x390\n  Write of size 80 at addr ffff888003a549cd by task kunit_try_catch/24\n   __asan_memcpy+0x38/0x60\n   read_bytes_from_xdr_buf+0x1bc/0x390\n   nfsd4_sequence_done+0x5b0/0x810\n   nfs4svc_encode_compoundres+0x1bf/0x240\n\nCheck that the fixed-size SEQUENCE result, plus room for a following\noperation's error status, fits the negotiated limit before narrowing\nthe buffer and consuming the slot seqid. The slot and its reply\ncache are left unchanged, as RFC 8881 Section 2.10.6.1.2 requires of\nan error returned from SEQUENCE.","publishedAt":"2026-11-19T14:22:44.299Z","updatedAt":"2026-11-22T11:07:51.882Z","severity":{"score":9.8,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"47ee52986472dba068e8223cbaf1b65d74238781","status":"affected","lessThan":"1a5a227bca6a8a9f9d31230697aeb84c62a21da6","versionType":"git"},{"version":"47ee52986472dba068e8223cbaf1b65d74238781","status":"affected","lessThan":"37fc2ec211630360e9aefcaaec8730db964645f2","versionType":"git"},{"version":"47ee52986472dba068e8223cbaf1b65d74238781","status":"affected","lessThan":"ed98b0c57e5e84290c5b35428144ab26778905f3","versionType":"git"},{"version":"47ee52986472dba068e8223cbaf1b65d74238781","status":"affected","lessThan":"35ff1a7a7e3835c3e974bc5c45d335897564ceae","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfsd/nfs4state.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.16","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfsd/nfs4state.c"]}],"references":["https://git.kernel.org/stable/c/1a5a227bca6a8a9f9d31230697aeb84c62a21da6","https://git.kernel.org/stable/c/37fc2ec211630360e9aefcaaec8730db964645f2","https://git.kernel.org/stable/c/ed98b0c57e5e84290c5b35428144ab26778905f3","https://git.kernel.org/stable/c/35ff1a7a7e3835c3e974bc5c45d335897564ceae"],"weaknesses":[],"ingestedAt":"2026-11-22T11:18:06.032Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99362.json","commit":"247cc9beefd85903834df0592e88a44f4d599223","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99362","state":"PUBLISHED","datePublished":"2026-11-19T14:22:44.299Z","dateUpdated":"2026-11-22T11:07:51.882Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.410Z"},"containers":{"cna":{"title":"nfsd: preflight SEQUENCE replies before accepting a slot","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: preflight SEQUENCE replies before accepting a slot\n\nnfsd4_sequence() narrows the reply buffer to the session's cached\nreply limit before it accepts the slot seqid. A client may negotiate\nca_maxresponsesize_cached down to NFSD_MIN_HDR_SEQ_SZ, and\nnfsd4_alloc_slot() then gives every slot a zero-length sl_data[]. A\nCOMPOUND tag can fill that narrowed buffer until it holds the\nSEQUENCE opcode but not the status word that follows.\nnfsd4_encode_operation() returns without running\nnfsd4_encode_sequence(), so cstate.data_offset stays zero. It leaves\nop->status at nfs_ok as well, so the COMPOUND is treated as having\nsucceeded.\n\nnfsd4_store_cache_entry() declines to cache a lone SEQUENCE that\nreturned an error. That test reads the status the operation\nreported, so it passes here. The copy starts at offset zero and\ntakes the whole reply, RPC and COMPOUND headers included, into the\nzero-length sl_data[]. The COMPOUND tag is copied along with it, so\nthe client picks most of the bytes written past the end of the slot:\n\n  BUG: KASAN: slab-out-of-bounds in read_bytes_from_xdr_buf+0x1bc/0x390\n  Write of size 80 at addr ffff888003a549cd by task kunit_try_catch/24\n   __asan_memcpy+0x38/0x60\n   read_bytes_from_xdr_buf+0x1bc/0x390\n   nfsd4_sequence_done+0x5b0/0x810\n   nfs4svc_encode_compoundres+0x1bf/0x240\n\nCheck that the fixed-size SEQUENCE result, plus room for a following\noperation's error status, fits the negotiated limit before narrowing\nthe buffer and consuming the slot seqid. The slot and its reply\ncache are left unchanged, as RFC 8881 Section 2.10.6.1.2 requires of\nan error returned from SEQUENCE."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"47ee52986472dba068e8223cbaf1b65d74238781","status":"affected","lessThan":"1a5a227bca6a8a9f9d31230697aeb84c62a21da6","versionType":"git"},{"version":"47ee52986472dba068e8223cbaf1b65d74238781","status":"affected","lessThan":"37fc2ec211630360e9aefcaaec8730db964645f2","versionType":"git"},{"version":"47ee52986472dba068e8223cbaf1b65d74238781","status":"affected","lessThan":"ed98b0c57e5e84290c5b35428144ab26778905f3","versionType":"git"},{"version":"47ee52986472dba068e8223cbaf1b65d74238781","status":"affected","lessThan":"35ff1a7a7e3835c3e974bc5c45d335897564ceae","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfsd/nfs4state.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.16","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.61","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.2","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfsd/nfs4state.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/1a5a227bca6a8a9f9d31230697aeb84c62a21da6"},{"url":"https://git.kernel.org/stable/c/37fc2ec211630360e9aefcaaec8730db964645f2"},{"url":"https://git.kernel.org/stable/c/ed98b0c57e5e84290c5b35428144ab26778905f3"},{"url":"https://git.kernel.org/stable/c/35ff1a7a7e3835c3e974bc5c45d335897564ceae"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - svc_tcp_recvfrom delivers an NFSv4.1 TCP RPC to svc_process, nfsd_dispatch, and nfsd4_proc_compound, which calls nfsd4_sequence. The client supplies ca_maxresponsesize_cached in CREATE_SESSION (nfsd4_decode_channel_attrs4) and the COMPOUND tag plus SEQUENCE sa_cachethis (nfsd4_decode_sequence); that reply is what nfsd4_store_cache_entry copies past sl_data.\nAC:L - The client sets ca_maxresponsesize_cached to NFSD_MIN_HDR_SEQ_SZ and a COMPOUND tag that leaves room for the SEQUENCE opcode but not its status word. nfsd4_encode_operation then returns with op->status still nfs_ok and cstate.data_offset still 0, so nfsd4_store_cache_entry copies the reply on that COMPOUND with no further timing or peer state.\nPR:N - EXCHANGE_ID with SP4_NONE, CREATE_SESSION, and SEQUENCE are ALLOWED_WITHOUT_FH and never call fh_verify or check_nfsd_access. svcauth_unix_accept copies the AUTH_SYS uid from the RPC without checking it, and svcauth_null_accept accepts AUTH_NULL; svcauth_unix_set_client only maps the source address to an export.\nUI:N - The attacker opens the TCP connection and sends EXCHANGE_ID, CREATE_SESSION, and the SEQUENCE COMPOUND itself. No local user must mount a share or open a file.\nS:U - The overflow corrupts the nfsd4_slot allocation in the kernel that is running nfsd. It does not cross a guest-to-host or IOMMU boundary.\nC:H - nfsd4_store_cache_entry leaves data_offset at 0, sets sl_datalen to the whole reply, and copies it into a zero-length sl_data[]. nfsd4_replay_cache_entry then xdr-encodes those sl_datalen bytes from sl_data into the RPC reply, so the read extends into the adjacent slab object and is returned to the client.\nI:H - read_bytes_from_xdr_buf writes the reply, including the client-chosen COMPOUND tag, at slot->sl_data. With ca_maxresponsesize_cached equal to NFSD_MIN_HDR_SEQ_SZ, nfsd4_alloc_slot makes sl_data zero-length, so the 80-byte copy runs off the kmalloc'd nfsd4_slot into the next object of that slab.\nA:H - The write is performed from nfs4svc_encode_compoundres via nfsd4_sequence_done on the triggering SEQUENCE. KASAN reports it as a slab-out-of-bounds write in read_bytes_from_xdr_buf, which oopses the nfsd thread and can panic the host."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-22T11:07:51.882Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"6.18.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"7.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.16","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}