NFS2ROOT (CVE-2026-99362) is a heap overflow in nfsd, the NFS server built into the Linux kernel. A client that can reach TCP/2049 can make nfsd write past the end of a kernel heap object without logging in, and a public tool turns that into a root shell. I read the fix, the stable backports and the nfsd source around them instead of the write-ups. What follows is what that reading changes: who can actually reach the bug, why the kernel warning other write-ups tell you to hunt for fires once per boot and not once per attempt, which commit is really upstream, and which “patched” builds are still open.

NFS2ROOT: Root Cause Analysis
The client shrinks its session reply cache to almost nothing, then makes nfsd copy a full reply into it. NFSv4.1 sessions give every client a set of slots, and each slot caches its last reply so that a retried request is answered exactly once. The client tells the server, in CREATE_SESSION, how big that cache may be. Linux caps the value at the top and never at the bottom. nfsd4_alloc_slot() gives each slot that value minus 80 bytes. Ask for 80 or less and every slot gets a zero-length sl_data[]; ask for a little more and each slot gets a few bytes. The public exploit uses both 80 and 100.
Then the client sends SEQUENCE with sa_cachethis set and a COMPOUND tag padded so the narrowed reply buffer fills right after the SEQUENCE opcode. The encoder quits without setting an error. op->status stays nfs_ok, cstate.data_offset stays 0, and nfsd4_store_cache_entry() copies the whole reply, RPC headers and tag included, into the empty slot. The tag is client data, so the client picks most of what lands past the end. The KASAN trace in the fix shows an 80-byte write. The bug came in with commit 47ee52986472 (“nfsd4: adjust buflen to session channel limit”) in Linux 3.16, in 2014.
What does the NFS2ROOT fix change?
The fix, commit 35ff1a7a7e38, checks that the SEQUENCE reply fits before it narrows the buffer and takes 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;
SEQUENCE now fails with REP_TOO_BIG before the slot seqid is consumed, and the slot cache is left alone, as RFC 8881 section 2.10.6.1.2 requires.
Who can exploit NFS2ROOT?
Any client that reaches tcp/2049 from an address one of your exports accepts, on a server with NFSv4.1 or 4.2 enabled. Kerberos-only exports do not stop it.
The “Pre-auth” condition is true, but it does not mean “from anywhere”. Before nfsd sees a COMPOUND, the svcauth_unix_set_client() function looks up the source address in the export client cache. No match returns SVC_DENIED. So the attacker needs an address that one of your export lines accepts. The public tool also needs an export path, /srv/nfs/shared by default. An export to * or to a /16 hands that out to everyone on the network. Kerberos does not help either. EXCHANGE_ID, CREATE_SESSION and SEQUENCE are all flagged ALLOWED_WITHOUT_FH, so fh_verify() and the export’s sec=krb5 check never run. AUTH_SYS and AUTH_NULL both pass the address check. A krb5-only server is as reachable as a sys one. A machine that only mounts NFS shares as a client is not exposed.
NFS2ROOT: Attack Path Analysis
A typical attack takes place in six steps: reach TCP/2049, open a session that caches almost nothing, trigger the cache store, overflow the slot, read kernel heap back, and make the kernel run a shell as root.
Steps 1 to 4 come from the CVE record and the source. Steps 5 and 6 come from the public exploit code analysis.
It overflows one slot, then replays the neighbouring slots with a forged sl_datalen. The replay path, nfsd4_replay_cache_entry(), sends back that many bytes, so the client reads kernel heap and works out the KASLR slide. It then reclaims a freed kmalloc-64 nfsd4_conn with a forged usermode-helper request and closes the socket. nfsd uses the forged request and the kernel runs /bin/sh -c as root, with at most 27 characters of command.
How hard is NFS2ROOT to exploit?
Easy since 27 November: the public tool needs only a reachable server, an address an export accepts and an export path. The main thing still slowing mass use is that a miss can crash the server.
CVE-2026-99362 exploit difficulty
- No credentials, no mount, no file handle; one TCP connection
- Public tool, standard-library Python, root in seconds to a minute (README)
- Source address must match an export client entry, and the tool needs an export path
- Tested only on Debian 11 by its author; other kernels may need tuning
- A miss can oops or panic the host (CNA A:H), which is loud
Point and shoot since 27 November
outcome: The skill barrier is gone. What still slows mass use is the export-address requirement and crash risk, not exploit development.
Treat every reachable file server as exposed now
The GitHub repository containing NFS2ROOT poc – Anhydrite/nfs2root had its first commit on 27 November, eight days after the CVE. It gives an interactive root shell or a uid=0 proof file, takes a few seconds to a minute, and was tested on Debian 11. Its forged usermode helper runs /bin/sh -c with a command of up to 27 characters, so a read-only export does not stop it. Its scan mode is not a safe check: in the code it is an alias for the trigger sweep, which performs the out-of-bounds write.
When was NFS2ROOT disclosed and patched?
The fix was posted publicly on 17 August 2026, the CVE was published on 19 November 2026, and upstream stable kernels got the fix between 6 and 23 November. The root cause was public for 94 days before the CVE.
Jérémy Jean of ANSSI posted the fix on 17 August with the KASAN trace and a plain description of the trigger in the commit message. OpenSec’s harness, Antara, found the same bug and reported it on 22 September with a full exploit. Anyone reading the NFS mailing list had the root cause three months before there was a CVE number to scan for. A working public exploit followed the CVE by eight days.
Days from each event to the CVE (19 November 2026)
Which Linux versions are affected by NFS2ROOT?
Every Linux kernel from 3.16 that runs the in-kernel NFS server with NFSv4.1 or 4.2 is affected. Upstream fixed it in 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61, 7.3.2 and 7.4-rc1, and RHEL, Debian, Amazon Linux and Oracle Linux have shipped fixes; Ubuntu had not as of 3 December.
| Kernel | Affected | Fixed | Watch out |
|---|---|---|---|
| Upstream 5.10, 5.15, 6.1, 6.6 | 3.16 and later | 5.10.275, 5.15.226, 6.1.193, 6.6.163 | Backports landed 23 November. A host patched on 6 or 10 November on these branches is still exposed. |
| Upstream 6.12, 6.18, 7.3 | 3.16 and later | 6.12.117, 6.18.61, 7.3.2 | Several write-ups list only these three plus 7.4-rc1. |
| Mainline | up to the 7.4 merge window | 7.4-rc1 (35ff1a7a7e38) | The follow-up encoder guard ec013ca40bd7 has no stable tag. |
| RHEL 8, 9, 10 | when nfs-server is enabled | 8: kernel-4.18.0-553.190.1.el8_10 (RHSA-2026:103817, 26 November); 9: kernel-5.14.0-741.29.1.el9_9 (RHSA-2026:105696, 1 December); 10: kernel-6.12.0-264.22.1.el10_3 (RHSA-2026:105695, 1 December) | None of the three lists sibling CVE-2026-99366. Red Hat’s CVE page still lists no errata; the RHSAs do. EUS streams have their own advisories. |
| Rebuilds follow RHEL | AlmaLinux, Oracle Linux | Same advisory numbers as the RHSAs (for example ALSA-2026:103817, ELSA-2026-105696); Oracle’s own UEK kernels in ELSA-2026-500697 to 500699 (26 November) | Check each rebuild advisory for the exact package version. |
| Amazon Linux 2 and 2023 | core and extra kernels | ALAS2-2026-4166, ALAS2KERNEL-5.4-2026-139, ALAS2KERNEL-5.10-2026-140, ALAS2KERNEL-5.15-2026-123, ALAS2023-2026-3538 to 3540 (27 November) | Covers kernel, kernel6.12 and kernel6.18 on 2023. |
| SUSE | SLES 12 SP5, 15 SP4 to SP7, 16.0, SL Micro | openSUSE Tumbleweed kernel-source 7.3.6-2.1; SLES updates in QA on 3 December | SUSE scores it 9.0 in CVSS v4 with PR:L and AT:P. |
Debian 12 linux | 6.1.176-1 | 6.1.192-3 (DLA-4942-1) | A scanner keyed on 6.1.193 will call this vulnerable. The tracker still lists sibling CVE-2026-99366 open in 6.1.192-3. |
Debian 12 linux-6.12, Debian 13 | earlier builds | 6.12.117-1~deb12u1 (DLA-4927-1), 6.12.117-1; current security builds are 6.12.118 | Tracker shows both CVEs fixed. Its two tables disagree on 6.12.117 versus 6.12.118 for bookworm. |
| Debian 11 | all | none | Debian LTS ended on 31 August 2026. The public exploit was tested on Debian 11. |
| Ubuntu 16.04 to 26.10 | all supported LTS | none as of 3 December | Work in progress in 7.0.0-45.45 (26.04) and 7.3.0-12.13 (26.10). No USN yet. 14.04 is not affected. |
CVE-2026-99366, published the same day, is a use-after-free in the same slot replay path, scored 9.8 by the kernel CNA. Upstream fixed both in the same stable releases. The RHEL 8, 9 and 10 advisories and Debian 12’s linux 6.1.192-3 list NFS2ROOT but not the sibling, so a “patched” server may still be open to it.
How do I fix or mitigate NFS2ROOT?
Install your distribution’s fixed kernel and reboot, after capturing evidence on any server you suspect. Until you can, allow tcp/2049 only from storage subnets and narrow your export client lists.
| Order | Action | Operational impact |
|---|---|---|
| 1 | Patch to the fixed build for your branch and reboot. Confirm with uname -r. | Medium: a file server outage or a failover |
| 2 | Know the limits of indicator scans. The public exploit’s default files (x and p in the export root) and client name are one edit away from changing. The traces an attacker cannot rename are one kernel warning per boot, taint W, and a shell started by the kernel. | None |
| 3 | Interim isolation: allow tcp/2049 only from storage subnets and replace * and wide subnets in export client lists. Red Hat’s page gives firewalld steps and warns that the reload drops clients that are no longer allowed. | Low to medium: unknown clients lose access |
| 4 | Or set vers4.1=n and vers4.2=n under [nfsd] in /etc/nfs.conf, restart nfs-server, and check that /proc/fs/nfsd/versions shows -4.1 and -4.2. | High: pNFS and 4.2 features stop, clients that pin 4.1 or 4.2 fail to mount, and the restart drops sessions |
| 5 | After the patch, the reboot itself ends every NFSv4 session. Clients reclaim state in the grace period. There is no separate session kill to run. | Medium: brief I/O stall on clients |
| 6 | Compromise response on any hit: treat the host and everything on it as owned, including the host Kerberos keytab, rebuild from known-good media and rotate the secrets it held. | High |
Turning off 4.1 and 4.2 pushes clients to NFSv4.0. That path had its own unauthenticated replay-cache heap overflow, CVE-2026-31402, fixed in April 2026. Check that fix is in before you lean on this workaround.
How do I detect NFS2ROOT exploitation?
On the network, look for CREATE_SESSION calls that ask to cache under 512 bytes, SEQUENCE calls with cachethis set and a tag, and NFSv4 calls with AUTH_NULL credentials. On the host, look for one nfsd4_check_resp_size warning per boot, kernel taint W, and shells whose parent is kthreadd.
One claim going around is that the attack is valid NFS, so there is no network signature. I disagree in part. The Linux client asks for a fore-channel cached reply size the size of an OPEN reply, about 5 KB, and sends an empty COMPOUND tag. The tag is capped at 128 bytes, so the trigger needs a cached size of roughly 170 bytes or less. That gap is wide enough to alert on. I have not checked what Windows, VMware ESXi or macOS clients send, so baseline before you alert.
OpenSec tells you to look for warnings from nfsd4_check_resp_size “on every attempt”. The source says otherwise. That warning is WARN_ON_ONCE. It fires on the first hit after boot and never again until the next reboot. One warning means look harder, and no new warning after it means nothing. The warning also sets kernel taint bit 9 (W), which survives log rotation until the reboot.
- Packets:
nfs2root_pcap_hunt.shruns tshark over captures for the three protocol signals plus the public tool’s default client owner prefix,nfs2root-. I checked the field names against tshark 4.2.2 and tested it on hand-built positive and negative captures. It has not seen real exploit traffic. - Public tool defaults: a helper at
<export>/x, a root-owned proof file at<export>/p, COMPOUND tagseidandcs, and sweeps of tag lengths in steps of 4 bytes over short connections in scan mode. All of them cost an attacker one edit to change. - Kernel log: a Sigma rule for
nfsd4_check_resp_size,nfsd4_sequence_doneand the other reply-cache frames. - Shell from the kernel: an auditd rule for execve with parent PID 2, and Sigma rules for auditd and process creation. Usermode helpers that do not wait are reparented to kthreadd in
kernel/umh.c. Helpers that wait have a kworker parent and are not covered. - Zeek: Zeek’s NFS analyzer does not decode NFSv4 sessions as far as I know, so the only Zeek hunt is new source addresses on
id.resp_p == 2049inconn.log.
Full rule bodies, the auditd rule, the pcap hunt and the triage script are in my sigma-rules repository.
Leave a Reply
You must be logged in to post a comment.