FALCONINTERNET

CVE-2026-99362 gives remote root on Linux NFS servers back to 3.16

Security
CVE-2026-99362 gives remote root on Linux NFS servers back to 3.16

CVE-2026-99362 is a heap out-of-bounds write in nfsd, the NFS server built into the Linux kernel. Any client that can open a TCP connection to port 2049 can trigger it before authenticating. The kernel.org CNA scores it 9.8 under CVSS 3.1; Red Hat and Amazon rate it 9.4. OpenSec, which reported the flaw as a security issue on September 21 and named it NFS2ROOT, says it has a working exploit that reaches a root shell and is keeping it private. The CVE record and stable patches were published on November 19, and most coverage followed OpenSec's write-up on November 26 and 27.

As of November 26, watchTowr reported no exploitation in the wild, and the CVE is not in CISA's Known Exploited Vulnerabilities catalog.

How a 2014 session-cache bug becomes a kernel memory write

The bug arrived with Linux 3.16 in 2014 and sits in NFSv4.1 session handling. During CREATE_SESSION, the client chooses how much reply data the server caches for each session slot. If the client picks the protocol minimum, every slot gets a zero-length reply buffer. A SEQUENCE request with a padded COMPOUND tag then produces a reply that nfsd treats as successful, and nfsd copies the whole reply, headers included, into the empty slot. The kernel's test case shows an 80-byte write past the end of the allocation, and most of those bytes come from the client's own tag.

When the server replays that cached entry, it returns the overrun bytes and neighboring heap memory to the client, which gives an attacker information about kernel memory layout to pair with the write.

The attack needs three operations: EXCHANGE_ID, CREATE_SESSION and one SEQUENCE compound. The CVE record states that none of them checks a file handle or the export table, and that nfsd accepts AUTH_NULL and unverified AUTH_SYS credentials for them. Restricting an export to specific client addresses in /etc/exports does not protect the server.

Servers that run the vulnerable code

A host is exposed when all four of these hold:

  • The in-kernel NFS server is running (the nfs-server unit, packaged as nfs-kernel-server on Debian and Ubuntu).
  • NFSv4.1 or 4.2 is enabled, which is the default on current distributions.
  • TCP 2049 accepts connections from machines you do not control.
  • The running kernel predates your distribution's fix.

Machines that only mount NFS shares are clients and are not affected. Userspace servers such as NFS-Ganesha do not use nfsd. Servers limited to NFSv3 or NFSv4.0 never reach the session code.

For businesses that run websites, the usual NFS servers are shared storage behind load-balanced web nodes (one uploads or storage directory exported to several PHP servers), backup targets, hypervisor storage and Linux-based NAS appliances. NAS vendors build their own kernels, so check the vendor's advisory instead of the upstream version list.

Fixed kernels by branch and distribution

The upstream stable fixes are 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61 and 7.3.2, plus 7.4-rc1. Each fix applies to its own branch: a 6.18.40 kernel has a higher number than 6.12.117 and is still vulnerable.

Vendor status on November 28:

  • Debian 13: fixed in linux 6.12.117-1; trixie-security carries 6.12.118-1.
  • Debian 12: fixed in linux 6.1.192-3 (DLA-4942-1) and in linux-6.12 6.12.117-1~deb12u1 (DLA-4927-1).
  • RHEL 8.10: kernel-4.18.0-553.190.1.el8_10 in RHSA-2026:103817, released November 26. AlmaLinux 8 and Rocky Linux 8 have shipped the same build.
  • RHEL 10.0 and 10.2 Extended Update Support: fixed November 27 in RHSA-2026:104032 and RHSA-2026:104044.
  • RHEL 9: listed by Red Hat as affected, with no erratum yet. The AlmaLinux and Rocky Linux 9 rebuilds have no fix either.
  • Ubuntu 22.04 and 24.04: marked "needed", nothing released. Ubuntu 26.04 shows a 7.0.0-45.45 kernel in progress.
  • Amazon Linux 2 and 2023: fixed November 27 across the 5.10, 5.15, 6.12 and 6.18 kernel streams.

Commands to check a host

systemctl is-active nfs-server
sudo cat /proc/fs/nfsd/versions
sudo ss -ltnp 'sport = :2049'
uname -r; uname -v

If the versions file shows +4.1 or +4.2, the session code is live. Test reachability from a machine that is not one of your NFS clients, such as an outside VPS, with nc -zv -w3 server.example.com 2049.

On RHEL-family systems, dnf updateinfo list --cve CVE-2026-99362 shows whether any available advisory covers this CVE. A newer kernel in the repository without a matching advisory does not close it. On Ubuntu, sudo pro fix CVE-2026-99362 reports the status for the kernel flavor you run.

Because nfsd runs inside the kernel, restarting the NFS service after a package update leaves the vulnerable code in memory. Reboot, then confirm the build with uname -v.

Stopgaps for RHEL 9 and Ubuntu servers

Port 2049 should not be reachable from the internet on any server. Where it is, close it today and allow only the specific client addresses. With ufw:

sudo ufw allow from 10.0.1.60 to any port 2049 proto tcp

With firewalld, put the client addresses in their own zone with the nfs service and remove nfs from the public zone. Run firewall-cmd --get-active-zones first. If the interface sits in the trusted zone source rules have no effect.

sudo firewall-cmd --permanent --new-zone=nfsclients
sudo firewall-cmd --permanent --zone=nfsclients --add-source=10.0.1.60/32
sudo firewall-cmd --permanent --zone=nfsclients --add-service=nfs
sudo firewall-cmd --permanent --zone=public --remove-service=nfs
sudo firewall-cmd --reload

If clients sit on networks you cannot narrow, turn off the affected minor versions:

sudo nfsconf --set nfsd vers4.1 n
sudo nfsconf --set nfsd vers4.2 n
sudo systemctl restart nfs-server
sudo cat /proc/fs/nfsd/versions   # expect -4.1 -4.2

Clients that do not pin a version fall back to NFSv4.0. Clients with vers=4.1 or vers=4.2 in /etc/fstab will fail at their next mount, so check fstab on every client before making the change. pNFS and NFSv4.2 features such as server-side copy stay off until you re-enable them.

On the servers Falcon Internet manages, NFS runs only on private storage networks and port 2049 is blocked on public interfaces.

Once the patched kernel is running, remove the overrides with sudo nfsconf --unset nfsd vers4.1 and sudo nfsconf --unset nfsd vers4.2, restart nfs-server, and confirm the versions file shows +4.1 +4.2 again.

Tagged: Security Linux CVE NFS

Need this handled instead of explained?

We do this for a living — talk to an engineer about your setup.