JupiteX Get the app
Science & Technology26 Nov 2026 · about 7 min

Nfs2root: A 12-year-old pre-auth remote root in the Linux kernel's NFS server

The brief

The article does not use the name “Nfs2root”; it describes an attack chain that turns a flaw in Linux’s in-kernel NFS server, nfsd, into root access. CVE-2026-99362 is a pre-authentication heap overflow: a remote client can make the kernel write beyond a heap object before logging in. That matters because nfsd processes network requests before it knows who the client is. The attacker can set an NFS reply cache to zero bytes, then cause the server to copy a reply into that empty buffer. The article says the copy is 80 bytes, with 61 bytes past the heap object and 40 chosen by the client. The overflow is only the start of the described exploit. It can corrupt nearby bookkeeping, help disclose kernel memory, and enable later steps that lead to a root shell. The article rates the issue 9.8 Critical and says it affects reachable Linux NFS servers using NFSv4.1 or 4.2. Its advice is to patch and reboot, or block tcp/2049 until then.

01

What is Nfs2root, and what kind of vulnerability is CVE-2026-99362?

The article does not use the name “Nfs2root”; it describes an attack chain that turns a flaw in Linux’s in-kernel NFS server, nfsd, into root access. CVE-2026-99362 is a pre-authentication heap overflow: a remote client can make the kernel write beyond a heap object before logging in.

That matters because nfsd processes network requests before it knows who the client is. The attacker can set an NFS reply cache to zero bytes, then cause the server to copy a reply into that empty buffer. The article says the copy is 80 bytes, with 61 bytes past the heap object and 40 chosen by the client.

The overflow is only the start of the described exploit. It can corrupt nearby bookkeeping, help disclose kernel memory, and enable later steps that lead to a root shell. The article rates the issue 9.8 Critical and says it affects reachable Linux NFS servers using NFSv4.1 or 4.2. Its advice is to patch and reboot, or block tcp/2049 until then.

02

Which Linux systems are exposed to this attack, and what must be reachable for an attacker to try it?

The article identifies Linux systems running the in-kernel NFS server, nfsd, with NFSv4.1 or 4.2 enabled as potentially exposed. It names file servers, NAS appliances, build farms, and Kubernetes storage nodes as examples of places where port 2049 may be open. NFSv4.2 is described as the default.

The important condition is network reachability, not an existing account. The attack is remote and unauthenticated, and the article gives its severity vector as AV:N/AC:L/PR:N/UI:N. In practical terms, an attacker needs a path to the server’s TCP port 2049 and an affected NFS service listening there. The flaw is reached through ordinary NFS requests.

Until the kernel is updated and the host rebooted, the article recommends closing or firewalling tcp/2049. It also suggests turning off NFSv4.1 and 4.2 as a temporary option, then restarting nfs-server. That workaround disables pNFS and some NFSv4.2 features. The article does not say that every Linux machine is exposed; the NFS service and reachable port are key conditions.

03

How does a tiny NFS reply cache trick the server into copying data beyond a kernel buffer?

NFSv4.1 session slots keep a cache of the last reply, so a retried request can receive the same answer. The client chooses how large that cache is. The flaw appears when the client sets the cache size to its minimum: zero bytes.

The server’s nfsd4_sequence() function shrinks the reply buffer to that limit before it accepts the slot. The attacker pads the request’s tag so the buffer fills immediately after the SEQUENCE opcode. The encoder stops without reporting an error, so the server believes the operation succeeded. It then caches the complete reply, including headers and tag, in the empty buffer.

The result is an out-of-bounds kernel heap write. The article says the server copies 80 bytes, 61 of them past the heap object, and the client chooses 40 bytes. The fix checks whether the reply fits before accepting the slot and makes the encoder report data it cannot fit. That addresses the faulty size handling.

04

How much data can the attack write past the heap object, and how much of it can the attacker choose?

The article gives three figures for the vulnerable copy: 80 bytes copied in total, 61 bytes written past the end of the kernel heap object, and 40 bytes chosen by the client. These figures describe the write caused when nfsd caches a full reply in a buffer that the client has reduced to zero bytes.

The attacker influences the data by padding the NFS request’s tag. The server’s encoder stops without flagging an error, then nfsd treats SEQUENCE as successful and caches the reply, including its headers and tag. Because the buffer has no space, the copy crosses the heap object’s boundary. The article calls this a heap overflow.

Those numbers describe the initial corruption, not the full reach of the attack. The article says the overflow corrupts neighboring slot bookkeeping and is followed by a kernel heap leak, a forged free, memory reclamation, and a callback trigger. That chain can end in a remote root shell. The recommended response is to install a fix and reboot, or block tcp/2049 while patching is delayed.

05

How can a heap overflow lead to a remote root shell on the server?

A heap overflow writes beyond the memory object meant to hold the data. Here, the article says the extra bytes corrupt bookkeeping for a neighboring NFS session slot. That corruption gives the attacker a foothold, but the described route to root uses several further steps rather than the overflow alone.

A replay request then returns 3.8 KB of kernel heap memory, including information used to calculate the KASLR slide. The attacker uses a forged pointer to make the kernel free a chosen object, then refills that memory with a fake callback assembled from NFS client names. When the connection is closed, nfsd calls the fake callback.

The article says that callback makes the kernel run /bin/sh as root. In its recording, the command whoami; id; poweroff -f prints root and uid=0(root), then shuts down the victim. The exploit is described as remote and unauthenticated. The article advises patching and rebooting, and says kernel hardening does not remove the overflow.

06

How long had the flaw been present, and which Linux release first included it?

The article dates the bug to Linux 3.16, released in 2014, and describes it as a 12-year-old flaw. It traces the cause to commit 47ee52986472, which narrowed the reply buffer while handling SEQUENCE. According to the timeline, that change shipped in Linux 3.16.

The article says every kernel since 3.16 carried the issue, including long-term-support, distribution, and appliance kernels. The flaw remained in the NFS server’s reply-cache path, where a client could set a reply buffer to zero and provoke a larger copy. Jérémy Jean of ANSSI sent an upstream fix with a KASAN report.

The issue is identified as CVE-2026-99362, with fixes listed in Linux 6.12.117, 6.18.61, 7.3.2, and 7.4-rc1. The article says to install the relevant update and reboot. Until then, administrators are advised to firewall tcp/2049 or turn off NFSv4.1 and 4.2. The article also says the vulnerability was reported in September 2026 and published with fixes in November.

07

What is NFS, and how does it let computers share files over a network?

As general background beyond the article’s explanation, NFS stands for Network File System. It is a protocol that lets a computer access files and directories provided by another computer over a network, rather than only using files stored locally. One machine provides the NFS service, and clients send requests to use its shared files.

The article focuses on Linux’s in-kernel NFS server, nfsd, and NFSv4.1 and 4.2. It explains that nfsd handles network input before it knows who the client is. In NFSv4.1, session slots cache their last replies so a retried request can receive the same answer. The client also decides the size of that reply cache.

That client-controlled size is central to CVE-2026-99362. A zero-byte cache can lead nfsd to copy a full reply beyond a kernel heap object. The article says reachable Linux hosts serving NFSv4.1 or 4.2 on tcp/2049 may be affected. It recommends patching and rebooting, or blocking the port until an update can be installed.

This brief was written by AI from the original reporting and checked by other models. Names, figures and quotes come from the source; read it for full context.

Read more in the JupiteX app

Pulse is free. New stories every 4 hours, each one broken into the questions that explain it.

Or read more news on the web