Skip to content

A Linux kernel NFS bug lets anyone become root, patched after 12 years

A pre-auth heap overflow in nfsd, present since kernel 3.16, lets one TCP connection reach full root on any server exposing NFSv4.1 or 4.2. No exploitation has been reported, but the fix is now out.

A heap overflow in the Linux kernel’s NFS server has allowed unauthenticated remote root since kernel 3.16, which shipped in 2014. The Linux kernel CVE team published CVE-2026-99362 on 20 November, crediting a fix from ANSSI’s Jérémy Jean. Security researchers at OpenSec, who found the bug independently, published a full technical write-up on 25 November and named it NFS2ROOT.

The flaw sits in nfsd4_sequence(), which narrows the reply buffer to a session’s cached reply limit before it checks the slot’s sequence ID. A client can shrink its reply cache to zero bytes, then get the server to copy a full reply into that buffer: one TCP connection to any Linux host serving NFSv4.1 or 4.2 on port 2049 is enough to write past a kernel heap object and reach root, no credentials needed. CVSS is 9.8. The kernel team’s advisory lists fixes in 6.12.117, 6.18.61, 7.3.2 and 7.4-rc1, and recommends upgrading to a full release rather than cherry-picking the patch commit.

Why it matters: if you run NFS on Linux, in a data centre, on a NAS, or behind a Kubernetes NFS-backed volume, check this today. Anything unpatched that answers on port 2049 is one packet from full compromise. Until you can upgrade, firewall port 2049 to trusted hosts only, or turn off NFSv4.1 and 4.2.

The caveat: no exploitation has been reported, and OpenSec’s proof-of-concept exploit is private. But the bug has been exploitable since 2014, and the technique is now public enough that this isn’t one to leave for later.

Share

Related reading

More from The Wire

All briefs