NFS2ROOT (CVE-2026-99362, CVSS 9.8): 12-Year-Old Linux nfsd Flaw Lets Unauthenticated Attackers Overflow Kernel Memory via Port 2049 — Patch, Reboot or Firewall NFS Now

A pre-authentication heap overflow in the Linux kernel's NFSv4.1/4.2 server, present since kernel 3.16, can be triggered over TCP port 2049 without credentials; upstream fixes are out but Ubuntu and Red Hat kernels are still listed as vulnerable.
A critical flaw in the Linux kernel's built-in NFS server lets an attacker who can reach TCP port 2049 corrupt kernel memory without logging in, mounting a share or holding a file handle. Researchers named it NFS2ROOT. The bug is tracked as CVE-2026-99362 with a CVSS 3.1 score of 9.8, and it has been in the kernel since version 3.16, released in 2014.
Upstream fixes are out in every supported stable branch. The distributions are not all there yet: Debian has fixed kernels, while Ubuntu and Red Hat both rate the bug Critical but, at the time of writing, list most of their releases as still vulnerable. Anyone running an NFS server should check now which of these cases applies to them.
What Happened
The Linux kernel CVE team published CVE-2026-99362 on 19 November at 19:17 Mauritius time (15:17 UTC), under the fix title "nfsd: preflight SEQUENCE replies before accepting a slot". Ubuntu and Red Hat both rated it Critical. The researchers who found it say they built a private exploit that chains the memory corruption into a kernel memory leak, a KASLR bypass and a root shell. They have not released that exploit.
At the time of writing, no public exploit code has appeared and no in-the-wild exploitation has been reported. The flaw is not in CISA's Known Exploited Vulnerabilities catalog. Even so, the full technical root cause is in the public fix and the CVE text. Bugs like this often get independent exploits soon after disclosure, so the patch window should be measured in days, not weeks.
Technical Details
The bug sits in how nfsd handles the SEQUENCE operation. SEQUENCE is the first step of nearly every NFSv4.1 and NFSv4.2 request. It manages "session slots" and a small per-slot reply cache that lets the server replay answers to retransmitted requests.
According to the kernel advisory:
- When a client creates a session, it can negotiate the cached reply size (
ca_maxresponsesize_cached) down to the protocol minimum. nfsd then gives every slot a zero-length reply cache buffer. nfsd4_sequence()narrows the reply buffer to that cached limit before it accepts the slot's sequence ID.- A carefully sized COMPOUND tag can fill the narrowed buffer so that it holds the SEQUENCE opcode but not the status word that follows it. The encoder returns early, the operation is still marked as successful, and the reply's data offset stays at zero.
nfsd4_store_cache_entry()then copies the whole reply, including RPC and COMPOUND headers and the attacker's tag, into the zero-length slot buffer. That is a slab out-of-bounds write. The kernel's own memory checker recorded an 80-byte write, and the client chooses most of the bytes written past the end of the buffer.
Being able to choose the bytes that overflow kernel memory is what turns a crash bug into a potential remote code execution bug. The fix checks that the fixed-size SEQUENCE result, plus room for a following error status, fits within the negotiated limit before it narrows the buffer or uses the slot. The slot is left unchanged, as RFC 8881 requires.
The vulnerable code runs during the session handshake, before the server checks exports. That is why researchers describe the bug as pre-authentication. Red Hat's statement says an unauthenticated network-adjacent or remote attacker can trigger kernel heap corruption, "potentially achieving remote code execution or causing a kernel panic."
Who Is Affected
A system is exposed only if all of these are true:
- It runs a Linux kernel from 3.16 onward without the fix.
- The in-kernel NFS server (nfsd) is running and offers NFSv4.1 or NFSv4.2. On current distributions both are enabled by default once the server is turned on.
- TCP port 2049 can be reached by the attacker.
NFS clients that only mount shares are not affected, and neither are NFSv3 and NFSv4.0. Red Hat notes that default RHEL installs do not run nfsd. Exposure is mostly file servers, NAS appliances and storage gateways built on Linux, backup targets, HPC and research clusters, and Kubernetes nodes that serve NFS volumes. Many of these sit on "trusted" internal networks. An attacker who has already gained a foothold anywhere on such a network could use the flaw to move sideways onto storage.
Patch Status
Upstream fixed kernels, per the kernel CVE record:
- 5.10.275, 5.15.226, 6.1.193, 6.6.163
- 6.12.117, 6.18.61, 7.3.2, and mainline 7.4-rc1
Distribution status at the time of writing:
- Debian: fixed in bookworm security (linux 6.1.192-3, DLA-4942-1; linux-6.12 6.12.117-1~deb12u1, DLA-4927-1), in trixie (6.12.117-1) and in unstable. The plain bookworm point-release kernel 6.1.176-1 is still listed as vulnerable.
- Ubuntu: Critical priority. Fixes are listed as in progress for 26.10 and 26.04 LTS. 24.04, 22.04, 20.04 and older LTS kernels, plus cloud flavours such as AWS, Azure and GCP, are marked vulnerable. 14.04 is not affected.
- Red Hat: Critical, scored 9.4 by Red Hat. Its CVE page lists mitigations but no shipped fixed packages yet.
Distribution kernels backport fixes, so do not rely on the upstream version number. Check your exact package against your vendor's CVE page. The fix only takes effect after a reboot into the new kernel (or a vendor livepatch, if one covers it).
What To Do Now
- Find your NFS servers. On each Linux host, check whether nfsd is running and which versions it serves:
systemctl is-active nfs-server
cat /proc/fs/nfsd/versions # e.g. "+3 +4 +4.1 +4.2" means 4.1/4.2 are on
ss -ltn 'sport = :2049'
uname -r
- Patch and reboot as soon as your distribution ships a fixed kernel.
- Restrict port 2049 to the storage clients that need it. Red Hat's suggested firewalld approach:
sudo firewall-cmd --permanent --remove-service=nfs
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.20.0.0/24" service name="nfs" accept'
sudo firewall-cmd --reload
- If you cannot patch yet and can live without 4.1/4.2 features, turn those versions off in
/etc/nfs.confand restart the server. Clients will fall back to NFSv4.0 or v3. Test this first, because it removes pNFS and some 4.2 features:
[nfsd]
vers4.1=n
vers4.2=n
- If the host does not need to serve NFS, run
sudo systemctl disable --now nfs-server. - Watch for signs of attack: KASAN or slab corruption warnings mentioning
nfsd4_sequenceornfsd4_store_cache_entry, unexplained kernel oopses on file servers, bursts of short-lived NFSv4.1 sessions from unexpected addresses, and root shells spawned by kernel threads. - Ask your NAS and appliance vendors whether their firmware ships an affected kernel with NFSv4.1 enabled. Embedded storage is often patched last.
Why It Matters
NFS has always been treated as a trusted-network protocol, and that assumption is the real exposure here. A remote, unauthenticated bug in kernel code gives root on the machine that holds an organisation's shared files, home directories, VM images or backups. That is exactly where ransomware operators want to be. Scanning projects have long counted a large population of hosts answering on port 2049. Most are internal, but internal is where attackers end up after the first phish or the first exploited edge device.
The fix is a few lines, and it is already in every maintained upstream branch. The gap now is distribution packaging and reboots. Until those are done, a firewall rule on port 2049 is the cheapest protection.
