79% vs 51%: independent neobanks lag on app security. Read the report

Deep Dive

Deep Dive

Linux Kernel nfsd Pre-Auth Memory Corruption (CVE-2026-99362)

A remote NFSv4.1 client can overflow an nfsd reply-cache slot and leak kernel memory; fixed in 6.12.117, 6.18.61 and 7.3.2.

TL;DR

  • A remote NFSv4.1 client can make the Linux kernel's nfsd write an 80-byte reply into a zero-length reply-cache slot, corrupting adjacent kernel memory. The Linux kernel CNA published CVE-2026-99362 on 2026-11-19.
  • Kernels from 3.16 onward, up to the fixed release for their branch, are affected when nfsd runs with NFSv4.1 or 4.2 enabled and accepts TCP connections on port 2049. NFSv3 and NFSv4.0 are not.
  • The CVE record rates it CVSS v3.1 9.8 Critical. No public proof of concept or exploitation is known, and it is not in CISA KEV as of 2026-11-24.
  • Upgrade to the fixed release for your branch, or to a distribution kernel that names CVE-2026-99362. If you cannot, disable NFSv4.1 and 4.2 or restrict port 2049. See "How do I fix it?".

Am I affected?

All of these must hold for a server to be exposed:

  • nfsd is running and NFSv4.1 or NFSv4.2 is enabled. Both use the session and slot machinery that this flaw corrupts.
  • The running kernel does not contain the fix. The vulnerable code was introduced in Linux 3.16, released in August 2014.
  • A client can open a TCP connection to the nfsd port, 2049 by default, from a network the server does not fully trust.
  • The server accepts AUTH_SYS or AUTH_NULL for the session operations, as a stock nfsd does.

A valid export and a mounted file system are not needed. The attack uses three operations: EXCHANGE_ID, CREATE_SESSION and SEQUENCE. All three are allowed without a filehandle, and the CVE record states that they never call fh_verify or check export access. A Kerberos-only export policy does not remove this path, because these three operations run before any export check.

Branch Affected versions Fixed version
5.10.y 5.10.274 and earlier 5.10.275
5.15.y 5.15.225 and earlier 5.15.226
6.1.y 6.1.192 and earlier 6.1.193
6.6.y 6.6.162 and earlier 6.6.163
6.12.y 6.12.116 and earlier 6.12.117
6.18.y 6.18.60 and earlier 6.18.61
7.3.y 7.3.1 and earlier 7.3.2

Mainline 7.4-rc1 and later also carry the fix. The CVE record lists no fixed release for branches older than 5.10.y, so ask your vendor if you run one. Distribution kernels carry their own version numbers, and the upstream list does not show whether a given distribution build is fixed.

Distribution kernels include nfsd. Debian's opt-in popularity contest listed 15,907 installations of the nfs-kernel-server package when checked on 2026-11-24, which is a lower bound rather than a count of exposed servers.

Check the running kernel and whether nfsd is serving NFSv4.1:

uname -r
cat /proc/fs/nfsd/versions
ss -ltn | grep ':2049'

A /proc/fs/nfsd/versions line that contains +4.1 or +4.2 means the vulnerable code is enabled. An absent file usually means that nfsd is not running. Check the installed kernel packages against your distribution's advisory:

# Debian and Ubuntu
apt list --installed 'linux-image-*' 2>/dev/null | tail -n +2
apt list --upgradable 2>/dev/null | grep -i 'linux-image'

# Fedora, RHEL and derivatives
rpm -q kernel
dnf check-update kernel

On an upstream kernel, compare the running version with the table. On a distribution kernel, the version string alone does not prove the fix, so confirm that the vendor's changelog names CVE-2026-99362 or the fix commit.

How do I fix it?

Install a kernel that contains the fix (commit 35ff1a7a7e38 upstream) and reboot. The upstream fixed releases are 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61 and 7.3.2.

  1. On Debian or Ubuntu, upgrade the kernel package and reboot:
sudo apt update
sudo apt install --only-upgrade linux-image-generic
sudo reboot

Debian installations that use the linux-image-amd64 meta package should upgrade that package instead. The same applies to other architecture-specific meta packages.

  1. On Fedora, RHEL or a derivative, upgrade the kernel package and reboot:
sudo dnf update kernel
sudo reboot
  1. On SUSE, upgrade the kernel package and reboot:
sudo zypper update kernel-default
sudo reboot
  1. If you build your own kernel, check out a fixed tag and build it:
git fetch --tags
git checkout v6.12.117
make olddefconfig
make -j"$(nproc)"
sudo make modules_install
sudo make install
sudo reboot

After the reboot, uname -r must show a fixed version for the branch, or a later one. On a distribution kernel, confirm the vendor's advisory names CVE-2026-99362 or the fix commit rather than relying on the version string.

If you cannot upgrade yet, three workarounds reduce the exposure. Each has a cost.

  1. Restrict the nfsd port to the clients that need it. Allow TCP and UDP port 2049 only from known NFS clients at the host firewall or the network firewall. This removes reachability but does not fix the server.
  2. Disable NFSv4.1 and NFSv4.2. Sessions exist only in those minor versions, so NFSv4.0 and NFSv3 cannot reach the vulnerable code. At runtime, remove both versions from the running server:
echo -4.1 | sudo tee /proc/fs/nfsd/versions
echo -4.2 | sudo tee /proc/fs/nfsd/versions

To make the change persistent, set both options in /etc/nfs.conf and restart the server:

[nfsd]
vers4.1=n
vers4.2=n
sudo systemctl restart nfs-server

Clients then negotiate NFSv4.0 or NFSv3 if the server still offers them. Those versions lack the session features of 4.1 and 4.2, including session trunking and the newer delegation behaviour. 3. If the server does not need NFS, stop and disable the service:

sudo systemctl disable --now nfs-server

What is the root cause?

The NFSv4.1 server keeps a reply cache for each session slot, and the slot's buffer is sized from the client's ca_maxresponsesize_cached value. When that value is the minimum of 80 bytes, the buffer is allocated with length zero while the reply is still allowed to fill 80 bytes.

NFSD_MIN_HDR_SEQ_SZ is 80 bytes: 24 for the RPC header, 12 for the COMPOUND header and 44 for a SEQUENCE result. nfsd4_alloc_slot() subtracts that constant from the negotiated cached-reply size:

size = fattrs->maxresp_cached < NFSD_MIN_HDR_SEQ_SZ ?
        0 : fattrs->maxresp_cached - NFSD_MIN_HDR_SEQ_SZ;

slot = kzalloc_flex(*slot, sl_data, size, gfp);

With maxresp_cached equal to 80, size is zero. The flexible array sl_data[] at the end of struct nfsd4_slot therefore has no storage, and the slot is valid only while the reply cache stays empty.

nfsd4_sequence() then narrows the reply buffer to the same negotiated limit before it accepts the slot sequence number:

buflen = (seq->cachethis) ?
        session->se_fchannel.maxresp_cached :
        session->se_fchannel.maxresp_sz;
status = (seq->cachethis) ? nfserr_rep_too_big_to_cache :
                nfserr_rep_too_big;
if (xdr_restrict_buflen(xdr, buflen - rqstp->rq_auth_slack))
    goto out_put_session;

The SEQUENCE operation carries sa_cachethis, and the client sets it to true. The reply buffer is now 80 bytes, including the RPC and COMPOUND headers. A COMPOUND tag of the right length fills it until the buffer holds the SEQUENCE opcode but not the status word that follows.

nfsd4_encode_operation() cannot reserve space for the status word, so it returns without running nfsd4_encode_sequence(). It leaves cstate.data_offset at zero and op->status at nfs_ok, so the COMPOUND is treated as a success.

nfsd4_store_cache_entry() declines to cache a lone SEQUENCE only when the compound status is not nfs_ok. That test reads the status the operation reported, which is nfs_ok here. The copy starts at offset zero and takes the whole reply:

base = resp->cstate.data_offset;
slot->sl_datalen = buf->len - base;
if (read_bytes_from_xdr_buf(buf, base, slot->sl_data, slot->sl_datalen))
    WARN(1, "%s: sessions DRC could not cache compound\n",
         __func__);

The destination is the zero-length sl_data[], so the copy writes 80 bytes past the end of the slot. The COMPOUND tag is part of the copied reply, so the client chooses most of the bytes written into the adjacent slab object.

How is it exploited?

The attacker needs an NFSv4.1 session and a COMPOUND whose tag is sized so the narrowed reply buffer holds the SEQUENCE opcode but not its status. No public proof of concept is published, and the CVE record carries a KASAN report from a kernel test rather than an exploit program.

  1. The client opens a TCP connection to the server's nfsd port and sends EXCHANGE_ID to obtain a client identifier. AUTH_SYS or AUTH_NULL is enough on a stock nfsd.
  2. It sends CREATE_SESSION with ca_maxresponsesize_cached set to 80, the minimum the server accepts. The server allocates every slot in the session with a zero-length reply cache.
  3. It sends a COMPOUND that starts with SEQUENCE, sets sa_cachethis to true, and carries a tag sized to fill the narrowed 80-byte reply buffer up to the SEQUENCE opcode.
  4. nfsd4_sequence() restricts the reply buffer to 80 bytes and accepts the slot sequence number. The encoder finds no room for the status word and leaves data_offset at zero with the operation status at nfs_ok.
  5. nfsd4_store_cache_entry() copies the whole reply into the zero-length slot cache, writing 80 bytes past the slot. The copied bytes include the client's tag.
  6. On a retransmission that replays the slot, nfsd4_replay_cache_entry() reads sl_datalen bytes from the same buffer. It returns them to the client, including bytes from the adjacent slab object.

Steps 1 to 3 need no export, no mount and no local user. The attacker only needs network reach to port 2049 and a server that accepts AUTH_SYS or AUTH_NULL.

How does the attack flow?

An unauthenticated NFSv4.1 client negotiates the smallest cached-reply size, fills the narrowed reply buffer with a COMPOUND tag, and makes nfsd copy the whole reply past a zero-length slot cache.

flowchart LR A["NFSv4.1 client reaches TCP 2049"] --> B["CREATE_SESSION sets the cached-reply limit to 80 bytes"] B --> C["Every slot in the session is allocated with a zero-length reply cache"] C --> D["COMPOUND tag fills the narrowed reply before the SEQUENCE status"] D --> E["Encoder leaves data_offset zero and status OK"] E --> F["Reply-cache copy writes 80 bytes past the slot"] F --> G["Replay returns adjacent kernel memory"]

What can an attacker do?

A remote unauthenticated client can corrupt kernel slab memory and read adjacent kernel memory back through the reply cache. The CVE record rates confidentiality, integrity and availability impact each High.

The attack writes the whole cached reply, which is 80 bytes at the minimum cache size and includes the client's COMPOUND tag. The bytes land in the slab object next to the slot. The replay path then returns sl_datalen bytes from the same address, so the client receives memory that belonged to the neighbouring object.

A corrupted slab object can crash the nfsd thread. The KASAN report in the CVE record shows an out-of-bounds write in read_bytes_from_xdr_buf(), called from nfsd4_sequence_done(). The record notes that the oops can panic the host.

The CVE record does not demonstrate code execution. The confirmed impact is memory corruption and disclosure, and code execution would depend on the slab layout and on what the attacker can place next to the slot.

Every condition from "Am I affected?" applies in full. The server needs NFSv4.1 or 4.2 enabled, a kernel without the fix, reachability to port 2049, and AUTH_SYS or AUTH_NULL accepted for the session operations. A server that is not reachable from an untrusted network is exposed only if that network is compromised first.

No exploitation in the wild is reported. Neither the CVE record nor the fix commit describes attacks, and the CVE is not in CISA KEV as of 2026-11-24.

Why does the fix work?

The fix computes the size of the SEQUENCE reply before narrowing the buffer and accepting the slot, and it refuses the request when the reply cannot fit. It also checks the negotiated limit against the authentication slack first.

@@ -5130,7 +5132,22 @@ nfsd4_sequence(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
            session->se_fchannel.maxresp_sz;
    status = (seq->cachethis) ? nfserr_rep_too_big_to_cache :
                    nfserr_rep_too_big;
-   if (xdr_restrict_buflen(xdr, buflen - rqstp->rq_auth_slack))
+   if (buflen < rqstp->rq_auth_slack)
+       goto out_put_session;
+   maxlen = buflen - rqstp->rq_auth_slack;
+
+   /*
+    * A SEQUENCE result too large for maxlen never reaches
+    * nfsd4_encode_sequence(), so cstate.data_offset stays zero and
+    * the reply cache overruns the slot.
+    */
+   respsize = nfsd4_max_reply(rqstp, &args->ops[0]);
+   if (!nfsd4_last_compound_op(rqstp))
+       respsize += COMPOUND_ERR_SLACK_SPACE;
+   if (xdr->buf->len + respsize > maxlen)
+       goto out_put_session;
+
+   if (xdr_restrict_buflen(xdr, maxlen))
        goto out_put_session;
    svc_reserve_auth(rqstp, buflen);

nfsd4_max_reply() returns the encoded size that the first operation, SEQUENCE, needs. When SEQUENCE is not the last operation in the COMPOUND, the check adds COMPOUND_ERR_SLACK_SPACE, 16 bytes, for the error status of the operation that follows.

The check compares that requirement with xdr->buf->len + respsize, where xdr->buf->len already holds the RPC and COMPOUND headers and the tag. If the result exceeds the narrowed limit, the function returns an error before it consumes the slot sequence number. The slot and its reply cache stay unchanged, which is what RFC 8881 section 2.10.6.1.2 requires when SEQUENCE returns an error.

The patch is narrow and complete for this bug. It does not change the reply-size checks for other operations, and it does not change the NFSv4.0 or NFSv3 paths, which have no sessions.

How do I check if I was compromised?

No indicators of compromise are published for CVE-2026-99362, and an attempt that does not crash the server may leave no trace. The checks look for the kernel reports that the out-of-bounds write produces and for unexpected NFSv4.1 clients.

  • Search the kernel log for the KASAN signature, the nfsd oops or the reply-cache warning:
dmesg -T | grep -iE 'KASAN|slab-out-of-bounds|read_bytes_from_xdr_buf|sessions DRC could not cache'
journalctl -k --since "14 days ago" | grep -iE 'KASAN|nfsd.*oops|BUG:'
  • Review crash dumps for a stack that runs through read_bytes_from_xdr_buf() and nfsd4_sequence_done().
  • Review NFSv4.1 client addresses against the expected client list. Every legitimate NFSv4.1 client sends EXCHANGE_ID and CREATE_SESSION, so an unexpected address is a lead to verify, not proof of an attack.
  • Check whether the host rebooted or panicked unexpectedly while NFS was in use.

A clean log does not prove that no attempt happened. The write can corrupt memory without an immediate crash, and most production kernels do not enable KASAN.

Timeline

  • 2014-03-12: J. Bruce Fields authors commit 47ee52986472, "nfsd4: adjust buflen to session channel limit". The commit is merged in Linux 3.16.
  • 2026-08-17: Jérémy Jean of ANSSI authors the fix, "nfsd: preflight SEQUENCE replies before accepting a slot". The commit carries an Assisted-by: Codex:gpt-5 trailer and a Tested-by from Mayank Jangid.
  • 2026-11-06: Linux 6.18.61 and 7.3.2 are released with the backport.
  • 2026-11-10: Linux 6.12.117 is released with the backport.
  • 2026-11-19: the Linux kernel CNA publishes CVE-2026-99362.
  • 2026-11-23: Linux 6.6.163, 6.1.193, 5.15.226 and 5.10.275 are released with the backport.

The fix was authored 94 days before the CVE was published
Figure 1: From the fix commit to the CVE record and the longterm backports. Source: CVE-2026-99362 record and kernel.org changelogs, checked November 24, 2026

FAQ

Does this affect NFSv3?

No. The flaw is in the NFSv4.1 session and slot code. NFSv3 has no sessions, so it cannot reach the vulnerable function.

Does this affect NFSv4.0?

No. NFSv4.0 has no sessions either. The vulnerable code runs only for NFSv4.1 and NFSv4.2 requests that carry a session identifier.

Do I need a valid export or credentials?

No. EXCHANGE_ID, CREATE_SESSION and SEQUENCE are allowed without a filehandle, and stock nfsd accepts AUTH_SYS or AUTH_NULL for them. The export's sec= setting is checked only when an operation uses a filehandle.

Is there a public proof of concept?

No public exploit program is published. The CVE record includes a KASAN report from a kernel test that reproduces the out-of-bounds write, and the fix commit describes the exact reply-size condition.

Which kernels are fixed?

The upstream fixed releases are 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61 and 7.3.2, and mainline 7.4-rc1 carries the fix. Distribution kernels need their vendor's advisory, because their version numbers do not match the upstream tags.

Can I just disable NFSv4.1 and 4.2 until I upgrade?

Yes. Sessions exist only in NFSv4.1 and 4.2, so removing both minor versions closes this path while NFSv4.0 and NFSv3 keep working. Clients lose session trunking and the newer delegation features until you restore 4.1 and 4.2.

Does KASAN need to be enabled for the attack to work?

No. KASAN only detects and reports the out-of-bounds write. The corruption happens on a kernel built without KASAN too, and it may crash the nfsd thread or damage memory silently.

References

  • CVE Program, "CVE-2026-99362", https://www.cve.org/CVERecord?id=CVE-2026-99362 (checked November 24, 2026)
  • National Vulnerability Database, "CVE-2026-99362", https://nvd.nist.gov/vuln/detail/CVE-2026-99362 (checked November 24, 2026)
  • Linux kernel, "nfsd: preflight SEQUENCE replies before accepting a slot", commit 35ff1a7a7e38, https://github.com/torvalds/linux/commit/35ff1a7a7e3835c3e974bc5c45d335897564ceae (checked November 24, 2026)
  • Linux stable, "nfsd: preflight SEQUENCE replies before accepting a slot", commit aff12e327620, https://github.com/torvalds/linux/commit/aff12e327620258123f847d7d06565f4555c5cb4 (checked November 24, 2026)
  • Linux kernel, "nfsd4: adjust buflen to session channel limit", commit 47ee52986472, https://github.com/torvalds/linux/commit/47ee52986472dba068e8223cbaf1b65d74238781 (checked November 24, 2026)
  • Linux kernel, fs/nfsd/nfs4state.c at v7.3, https://github.com/torvalds/linux/blob/v7.3/fs/nfsd/nfs4state.c (checked November 24, 2026)
  • Linux kernel, fs/nfsd/nfsd.h at v7.3, https://github.com/torvalds/linux/blob/v7.3/fs/nfsd/nfsd.h (checked November 24, 2026)
  • Linux kernel, "ChangeLog 6.18.61", https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.18.61 (checked November 24, 2026)
  • Linux kernel, "ChangeLog 6.12.117", https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.117 (checked November 24, 2026)
  • Linux kernel, "ChangeLog 6.6.163", https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.163 (checked November 24, 2026)
  • Linux kernel, "ChangeLog 6.1.193", https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.193 (checked November 24, 2026)
  • Linux kernel, "ChangeLog 5.15.226", https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.226 (checked November 24, 2026)
  • Linux kernel, "ChangeLog 5.10.275", https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.10.275 (checked November 24, 2026)
  • Linux kernel, "ChangeLog 7.3.2", https://cdn.kernel.org/pub/linux/kernel/v7.x/ChangeLog-7.3.2 (checked November 24, 2026)
  • Linux kernel archives, https://www.kernel.org/ (checked November 24, 2026)
  • Debian popularity contest, "Installed packages by installation count", https://popcon.debian.org/by_inst (checked November 24, 2026)
  • Cybersecurity and Infrastructure Security Agency, "Known Exploited Vulnerabilities Catalog", https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked November 24, 2026)

Free scan

Scan your own app for free

or book a demo

Keep reading

Related articles

Browse the blog