NFS2ROOT: 12-year-old Linux kernel NFS server flaw gives remote root without authentication
A heap buffer overflow in nfsd, the Linux kernel's NFS server, lets crafted requests to port 2049 write into kernel memory and run a command as root.
- Affected
- Linux kernels from 3.16 up to before 6.12.117, 6.18.61, 7.3.2 or 7.4-rc1, when nfsd (NFSv4.1 or 4.2) is running and TCP port 2049 is reachable by an attacker.
- Risk
- Full control of file servers, NAS appliances, build farms or Kubernetes storage nodes with no password and no user interaction.
- What to do
- Install your distribution's patched kernel and reboot; until then, limit TCP 2049 to trusted networks or disable nfs-server.
CVE-2026-99362 was found by Jérémy Jean of ANSSI, France's cybersecurity agency, who submitted a fix in August; security firm OpenSec dubbed it NFS2ROOT and shared a full remote-root exploit and a patch with the nfsd maintainers in late September. Crafted requests make the server write past an allocated buffer, letting the attacker read kernel memory, defeat KASLR (kernel address randomization) and plant a command callback in freed memory. When the NFS (Network File System) connection closes, the kernel runs that command as root. Kernel hardening does not remove the overflow, so OpenSec advises patching every host. No in-the-wild exploitation has been reported, and the attack leaves no network signature.
- The flaw has existed since kernel 3.16, released in 2014
- Signs of attempts include nfsd4_check_resp_size kernel warnings, shells spawned by kernel workers and bursts of short NFSv4.1 sessions from one source
- Kernel oopses with nfsd4_*, svc_* or call_usermodehelper* frames can also indicate exploitation
created 27 November at 12:56