Nfs2root: A 12-year-old pre-auth remote root in the Linux kernel's NFS server
CVE-2026-99362 is a 12-year-old pre-auth heap overflow in the Linux kernel's NFS server that enables remote unauthenticated root access.
read it It offers a deep technical breakdown of a critical kernel vulnerability, its heap corruption mechanism, and exploitation steps.
summary
OpenSec disclosed a pre-auth heap overflow vulnerability in the Linux kernel's NFS server (CVE-2026-99362) present since Linux 3.16 in 2014. By forcing the NFSv4 reply cache slot size to zero, an unauthenticated attacker can overflow kernel heap buffers during request encoding over TCP port 2049. Chaining this memory corruption allows leaking kernel addresses, arbitrary object free, and remote root code execution. Fixed kernels have been released across active branches, and unpatched systems should block port 2049 or disable NFSv4.1 and 4.2.
key points
- CVE-2026-99362 affects Linux hosts running in-kernel nfsd with NFSv4.1 or 4.2 enabled on tcp/2049, remaining unpatched since 2014.
- The vulnerability exploits the NFSv4 reply cache mechanism by letting clients shrink slot reply buffers to zero, leading to an 80-byte copy overflow.
- The complete exploit chain bypasses KASLR via heap leakage, achieves arbitrary memory free, and triggers kernel callbacks to spawn a root shell.
who should read it
Linux kernel developers, systems administrators, and security professionals managing storage infrastructure.
discussion skeptical
consensus
Commenters point out that because NFS is rarely exposed directly to the public internet, the practical attack surface is mostly limited to compromised internal networks.
pushback
Some argue that internal lateral movement makes pre-auth remote root vulnerabilities in default storage stacks a severe risk despite perimeter firewalls.
Just wow. How was this achieved? Let's see:
> Pre-auth heap overflow in the Linux NFS server (nfsd)
> Set it to the minimum and every slot's buffer is zero bytes. nfsd4_sequence() then shrinks the reply buffer to that limit before it accepts the slot. Pad the request's tag so the buffer fills right after the SEQUENCE opcode, and the encoder quits without flagging an error. The server believes SEQUENCE succeeded and caches the whole reply, headers and tag included, into a buffer with room for nothing.
Then it causes an out-of-bounds crash:
>> BUG: KASAN: slab-out-of-bounds in …
It outlines the precise mechanics of the heap overflow and KASAN crash logs from the advisory.
Generated by an LLM from the article and thread. Check the sources before relying on it.