critical

CVE

CVE-2026-99362

CWE

CWE-787

Affected Surface

  • Linux kernel 3.16 and later (since commit `47ee52986472`) before 7.3.2, 6.18.61, 6.12.117, 6.6.163, 6.1.193, 5.15.226 and 5.10.275, when the in-kernel NFS server (`nfsd`) is running with NFSv4.1 or NFSv4.2 enabled and tcp/2049 is reachable
  • Ubuntu xenial, bionic, focal, jammy and noble (fix needed on 29 November 2026); Red Hat Enterprise Linux 9, 7 and 6 and RHEL CoreOS in OpenShift 4 and 5 (listed as affected on 29 November)
  • File servers, NAS appliances, build farms and Kubernetes storage nodes that export NFS from a Linux kernel

TL;DR

CVE-2026-99362 is a pre-authentication heap overflow in nfsd, the NFS server built into the Linux kernel. OpenSec, which published a write-up and a demo video on 25 November, calls it NFS2ROOT. An NFSv4.1 client can shrink the per-slot reply cache of its session to zero bytes, then send a request whose reply doesn’t fit. The encoder gives up without flagging an error, and nfsd copies the full 80-byte reply into the empty slot buffer. That’s 61 bytes past the end of a kernel heap object, 40 of them chosen by the client. Nothing in that sequence checks who the client is.

OpenSec’s automated harness, Antara, turned the overflow into a heap leak that reveals the KASLR slide, an arbitrary free and finally a root shell, all over one TCP connection to port 2049. Jérémy Jean of ANSSI found the same bug independently in August and wrote the upstream fix. The bug arrived with commit 47ee52986472 in Linux 3.16 in 2014, so every kernel since then that serves NFSv4.1 or 4.2 is exposed.

The kernel CVE team scores it CVSS 9.8, Red Hat rates it Critical at 9.4, and Ubuntu gives it critical priority. OpenSec kept its exploit private, but a GitHub repository published on 27 November claims a working unauthenticated root exploit against a Debian 11 kernel. Nobody has reported exploitation in the wild, the CVE isn’t in CISA KEV, and EPSS was 0.0108 on 28 November.

What to do now:

  1. Find every Linux host that runs nfsd with NFSv4.1 or 4.2 enabled. That’s the default when the NFS server is on.
  2. Boot a kernel that carries the fix: 7.3.2, 6.18.61, 6.12.117, 6.6.163, 6.1.193, 5.15.226, 5.10.275 or later upstream, or a distribution kernel that lists CVE-2026-99362. A package update alone doesn’t help until you reboot.
  3. Ubuntu LTS releases had no fixed kernel on 29 November, and neither did RHEL 9. Until yours ships, allow tcp/2049 only from the storage network, or turn off NFSv4.1 and 4.2.
  4. NFS clients aren’t affected. Only machines that run the server matter.

Affected packages and projects

EcosystemPackageAffected versionsFixed or safe version
Linux kernel (mainline)fs/nfsd3.16 up to 7.4-rc17.4-rc1 (35ff1a7a7e38)
Linux kernel (stable)7.3.y7.3.0 to 7.3.17.3.2 (ed98b0c57e5e)
Linux kernel (stable)6.18.y6.18.0 to 6.18.606.18.61 (37fc2ec21163)
Linux kernel (longterm)6.12.y6.12.0 to 6.12.1166.12.117 (1a5a227bca6a)
Linux kernel (longterm)6.6.y6.6.0 to 6.6.1626.6.163 (cd303eb29cf3)
Linux kernel (longterm)6.1.y6.1.0 to 6.1.1926.1.193 (fa85acf074f0)
Linux kernel (longterm)5.15.y5.15.0 to 5.15.2255.15.226 (6a26c5473bb1)
Linux kernel (longterm)5.10.y5.10.0 to 5.10.2745.10.275 (aff12e327620)
Debianlinuxbookworm 6.1.176-1bookworm 6.1.192-3 (DLA-4942-1), trixie 6.12.117-1, forky 7.3.5-1
Debianlinux-6.12bookworm before 6.12.117-1~deb12u16.12.117-1~deb12u1 (DLA-4927-1)
Ubuntulinuxxenial, bionic, focal, jammy, nobleFix needed on 29 November; resolute and stonking pending
Red HatkernelRHEL 9, 7, 6 (affected)RHEL 8 4.18.0-553.190.1.el8_10 (RHSA-2026:103817); RHEL 10.0 EUS RHSA-2026:104032; RHEL 10.2 EUS RHSA-2026:104044

A host is exposed only if all of these are true: the kernel predates the fix, the nfsd module is loaded, /proc/fs/nfsd/versions shows +4.1 or +4.2, and something untrusted can reach tcp/2049. Red Hat points out that default RHEL installs don’t run nfsd at all, and OpenSec lists only the in-kernel server as affected.

Technical analysis

Session slots and the reply cache

NFSv4.1 added sessions so that a retried request gets exactly one answer. Each session has numbered slots, and every request starts with a SEQUENCE operation naming a slot. If the client sets sa_cachethis, the server keeps a copy of the reply in that slot and replays it when the same request comes back.

The client decides how big that copy may be. In CREATE_SESSION it sends ca_maxresponsesize_cached, and nfsd4_alloc_slot() sizes each slot’s buffer from it. This is the pre-fix code in fs/nfsd/nfs4state.c:

#define NFSD_MIN_HDR_SEQ_SZ  (24 + 12 + 44)

static struct nfsd4_slot *nfsd4_alloc_slot(struct nfsd4_channel_attrs *fattrs,
					   int index, gfp_t gfp)
{
	/* ... */
	/*
	 * The RPC and NFS session headers are never saved in
	 * the slot reply cache buffer.
	 */
	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);
	/* ... */
}

NFSD_MIN_HDR_SEQ_SZ is 80 bytes: 24 for the RPC header, 12 for the COMPOUND header and 44 for the SEQUENCE result. A client that asks for exactly 80 gets slots whose sl_data[] array has length zero. That’s allowed, because the comment says the headers are never stored in the slot. The bug is that they can be.

How the reply ends up in a zero-length buffer

When nfsd4_sequence() handles a request with sa_cachethis set, it narrows the reply buffer to the session’s cached limit before it accepts the slot:

	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;
	svc_reserve_auth(rqstp, buflen);

	status = nfs_ok;
	/* Success! accept new slot seqid */
	slot->sl_seqid = seq->seqid;

Every COMPOUND carries a free-form tag of up to 128 bytes that the server echoes back. The kernel CVE record and the community PoC write-ups describe the trick: pad the tag so the narrowed buffer fills up right after the SEQUENCE opcode, with no room for the status word that follows. nfsd4_encode_operation() then returns without encoding the SEQUENCE result and without setting op->status, which stays nfs_ok. Because the result was never encoded, cstate.data_offset stays at zero.

At the end of the request, nfsd4_store_cache_entry() decides what to cache:

	if (resp->opcnt == 1 && resp->cstate.status != nfs_ok)
		return;
	/* ... */
	slot->sl_flags |= NFSD4_SLOT_CACHED;

	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 first check is meant to skip caching when SEQUENCE failed. It reads the status the operation reported, which is still nfs_ok, so it passes.
  • base is the unset data_offset, zero, so the copy starts at the very beginning of the reply: RPC header, COMPOUND header and the client’s tag.
  • sl_datalen is the full reply length and sl_data has room for nothing. read_bytes_from_xdr_buf() writes 80 bytes into the slot allocation, and most of them land in the next object on the slab.

The KASAN report in the fix commit shows it:

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

None of this needs credentials. The CNA record notes that EXCHANGE_ID, CREATE_SESSION and SEQUENCE don’t touch a file handle, so export access checks never run, and the server accepts AUTH_NULL or any AUTH_SYS uid the client claims.

From overflow to root

OpenSec hasn’t released its exploit, but its write-up lists the steps, each an ordinary NFS request:

  1. The overflow corrupts the bookkeeping of the neighbouring slot.
  2. A replay request returns 3.8 KB of kernel heap, which includes enough pointers to compute the KASLR slide. The CNA record describes the same read primitive: the replay path encodes sl_datalen bytes from sl_data back to the client.
  3. A forged pointer makes the kernel free an object the attacker chooses.
  4. The attacker refills that memory with a fake callback built out of NFS client names.
  5. The attacker hangs up, nfsd calls the fake callback, and the kernel runs /bin/sh as root.

OpenSec says kernel hardening doesn’t remove the overflow and that Antara built the leak, the free and the shell without human help. The public Anhydrite/nfs2root repository, created on 27 November, describes a similar remote-only chain that votes the KASLR slide out of the leaked page, and reports five root shells in five runs against Debian 11’s 5.10.0-46-cloud-amd64 with KASLR and SLUB enabled. We haven’t run it and can’t confirm that claim.

The fix

Commit 35ff1a7a7e38 by Jérémy Jean, signed off by NFSD maintainer Chuck Lever, checks that the SEQUENCE result fits before it narrows the buffer and consumes the slot seqid:

@@ -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);
  • respsize is the largest SEQUENCE reply the server could produce, plus room for one error status if more operations follow.
  • If that doesn’t fit, the request fails with NFS4ERR_REP_TOO_BIG_TO_CACHE (or NFS4ERR_REP_TOO_BIG) before the slot is touched, which is what RFC 8881 section 2.10.6.1.2 requires.

A second commit, 241848cc774e (“nfsd: set op->status when an operation’s header cannot be encoded”), makes nfsd4_encode_operation() report NFS4ERR_REP_TOO_BIG when it can’t fit an opcode and status word. Its message calls it a guard rather than a fix. OpenSec and some PoC repositories cite the main fix as 5d5a72e965c8, which carries the same patch but isn’t in mainline history. 35ff1a7a7e38 is the commit that shipped in 7.4-rc1 and the one the CVE record lists.

IOCs

No network IOCs have been published, and there are no reports of exploitation outside research. OpenSec notes that the attack is valid NFS traffic, so there’s no simple network signature. These host-side signals come from its write-up:

  • Kernel warnings from nfsd4_check_resp_size. OpenSec says one appears on every attempt, successful or not.
  • Oopses whose stack traces contain nfsd4_*, svc_* or call_usermodehelper* frames.
  • Shells or other processes spawned by kernel workers on a file server.
  • Bursts of short NFSv4.1 sessions from a single source.

On the wire, a CREATE_SESSION that asks for a ca_maxresponsesize_cached of about 80 bytes, followed by a SEQUENCE with sa_cachethis set and a long COMPOUND tag, is the trigger pattern. The initconf/nfs2root Zeek package logs this sequence without blocking it. A patched server answers it with NFS4ERR_REP_TOO_BIG_TO_CACHE (10067).

Detection and remediation

Check whether a host is exposed:

# 1. Running kernel (fixed upstream: 7.3.2, 6.18.61, 6.12.117, 6.6.163, 6.1.193, 5.15.226, 5.10.275)
uname -r

# 2. Is the in-kernel NFS server loaded and which versions does it serve?
lsmod | grep -w nfsd
cat /proc/fs/nfsd/versions        # +4.1 or +4.2 means the vulnerable path is reachable

# 3. Is it listening on anything other than loopback?
ss -ltn 'sport = :2049'

# 4. Distribution kernels: look for the CVE or the fix title in the changelog
apt changelog "linux-image-$(uname -r)" 2>/dev/null | grep -E 'CVE-2026-99362|preflight SEQUENCE replies'
rpm -q --changelog kernel 2>/dev/null | grep -E 'CVE-2026-99362|preflight SEQUENCE'

# 5. Signs of attempts in the kernel log
journalctl -k --since "2026-11-19" | grep -E 'nfsd4_check_resp_size|nfsd4_sequence_done|call_usermodehelper'

Patch and reboot. On Debian bookworm that’s linux 6.1.192-3 or linux-6.12 6.12.117-1~deb12u1, and on trixie 6.12.117-1 or later. On RHEL 8, install kernel-4.18.0-553.190.1.el8_10 from RHSA-2026:103817.

If you can’t reboot into a fixed kernel yet, close the port to everything except the clients that need it. OpenSec’s example with nftables:

nft add rule inet filter input tcp dport 2049 ip saddr != 10.20.0.0/16 drop

Red Hat’s equivalent with firewalld:

firewall-cmd --permanent --remove-service=nfs
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="<trusted_subnet>" service name="nfs" accept'
firewall-cmd --reload

Or turn off NFSv4.1 and 4.2 in /etc/nfs.conf and restart nfs-server. That removes the session code path, but it also turns off pNFS and some 4.2 features, and clients will have to fall back to NFSv4.0 or v3:

[nfsd]
vers4.1=n
vers4.2=n

If the host doesn’t need to export anything, stop the server: systemctl disable --now nfs-server.

Credentials to rotate: none by default, because nobody has reported exploitation. If an unpatched NFS server was reachable from an untrusted network and you see the kernel warnings or crashes above, treat the host as compromised at the kernel level. Rebuild it, and rotate what it held: Kerberos keytabs (/etc/krb5.keytab), SSH host and user keys, and any credentials stored in the exported data.

Timeline

  • 2014-03: Commit 47ee52986472 (“nfsd4: adjust buflen to session channel limit”) narrows the reply buffer in SEQUENCE. It ships in Linux 3.16.
  • 2026-08-17: Jérémy Jean of ANSSI sends the fix upstream with a KASAN report.
  • 2026-09-21: OpenSec’s Antara flags the bug and builds a root exploit.
  • 2026-09-22: OpenSec reports it to the NFSD maintainers and security@kernel.org with the exploit and a patch.
  • 2026-11-01: Linux 7.4-rc1 ships with the fix.
  • 2026-11-06: Stable 7.3.2 and 6.18.61 ship the fix.
  • 2026-11-10: Longterm 6.12.117 ships the fix.
  • 2026-11-19: The kernel CVE team publishes CVE-2026-99362.
  • 2026-11-23: Longterm 6.6.163, 6.1.193, 5.15.226 and 5.10.275 ship the fix. By the end of the day the CVE record lists them, along with a CVSS 9.8 score.
  • 2026-11-25: OpenSec publishes its NFS2ROOT write-up and demo video.
  • 2026-11-27: Debian publishes DLA-4942-1 for bookworm. The Anhydrite/nfs2root repository appears with a claimed remote-root exploit.
  • 2026-11-28: The disclosure reaches the oss-security list. EPSS scores the CVE at 0.0108.
  • 2026-11-29: Ubuntu LTS kernels and RHEL 9 still have no fix.

From research to remediation

Check whether this pattern exists in your codebase

Turn this research into a remediation workflow. Use AI-native static analysis to find similar application vulnerabilities and generate review-ready fixes.

References