Locking Down Linux NFS Servers After NFS2ROOT (CVE-2026-99362): Finding nfsd Hosts, Proving the Running Kernel Is Fixed, Fencing Port 2049 and Disabling NFSv4.1/4.2 Until Reboot

2026-11-30 · By Reef Administrator - H.A

Locking Down Linux NFS Servers After NFS2ROOT (CVE-2026-99362): Finding nfsd Hosts, Proving the Running Kernel Is Fixed, Fencing Port 2049 and Disabling NFSv4.1/4.2 Until Reboot

A hands-on guide to finding every Linux host running the in-kernel NFS server, confirming the NFS2ROOT fix is in the running kernel on RHEL, Debian and Ubuntu, limiting port 2049 to known clients with firewalld, ufw or nftables, and using the NFSv4.1/4.2 switch as a stopgap until reboot.

NFS2ROOT (CVE-2026-99362) is an out-of-bounds write in the Linux kernel's built-in NFS server, nfsd. It sits in NFSv4.1 session handling: a client can negotiate the cached reply size down to the minimum, and the SEQUENCE reply then overruns a zero-length slot buffer. The bug has been in the kernel since 3.16 (2014). The kernel CNA scores it CVSS 9.8, and Red Hat scores it 9.4. It needs no authentication. Fixes have been out since the CVE record was published on 19 November 2026, but distribution status is still uneven. When this guide was written, Ubuntu still listed most of its supported releases as vulnerable.

Our earlier news article covered what the bug is. This tutorial is the hands-on part. You will find every host in your estate that actually runs nfsd, check whether its running kernel carries the fix, and close port 2049 to everyone except known clients. Where you cannot reboot yet, you will turn off NFSv4.1 and 4.2 as a stopgap. At the end you will review your exports so the next nfsd bug finds a smaller target.

Prerequisites

Step 1: Find Every Host That Runs nfsd

Red Hat says default RHEL installs do not run nfsd, so exposure is limited to machines that someone set up to export shares. The problem is that those machines are easy to forget: an old file server, a Kubernetes node backing an NFS provisioner, a NAS built on a stock Linux kernel.

On each host, check the service and the kernel module:

systemctl is-active nfs-server 2>/dev/null || systemctl is-active nfs-kernel-server
lsmod | grep -w nfsd
ss -tln 'sport = :2049'

nfsd runs inside the kernel, so ss shows a listening socket on 2049 with no owning process. If a listener is there, the server is live. Another way to tell is the nfsd control filesystem:

cat /proc/fs/nfsd/versions

Output such as +3 +4 +4.1 +4.2 means NFSv4.1 and 4.2 are enabled, and those are the versions this bug needs.

To sweep a network you are authorized to scan, list the hosts that answer on TCP 2049:

nmap -Pn -p 2049 --open -oG - 10.0.0.0/16 | awk '/2049\/open/{print $2}' > nfs-hosts.txt
wc -l nfs-hosts.txt

Treat anything in that file that is not a known NFS server as an incident to look into, not just an item on the patch list.

Step 2: Confirm the Running Kernel Is Fixed

The upstream fixed releases per stable branch are 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.61 and 7.3.2, plus mainline 7.4-rc1. Distribution kernels backport fixes under their own version numbers, so don't compare uname -r against that list. Ask the package manager instead.

On RHEL, Rocky, AlmaLinux and Fedora:

uname -r
sudo dnf updateinfo list --cve CVE-2026-99362
rpm -q --changelog kernel-core-$(uname -r) | grep -c CVE-2026-99362

A count of 0 for the running kernel means the fix is not in the code you are running.

On Debian:

uname -r
apt changelog linux-image-$(uname -r) 2>/dev/null | grep -m1 CVE-2026-99362

Debian's tracker lists trixie as fixed in 6.12.117-1, bookworm-security as fixed in 6.1.192-3, and the bookworm linux-6.12 backport as fixed in 6.12.117-1~deb12u1.

On Ubuntu, the Pro client can report on (and fix) a single CVE:

pro fix CVE-2026-99362 --dry-run

If you installed the patched kernel but haven't rebooted, you are still exposed. Check whether a reboot is pending:

# RHEL family (dnf-utils / yum-utils)
sudo needs-restarting -r
# Debian / Ubuntu
[ -f /var/run/reboot-required ] && cat /var/run/reboot-required

Step 3: Turn the Service Off Where Nobody Needs It

Red Hat's first mitigation is the simplest one. If a host doesn't need to serve NFS, stop and disable the server:

sudo systemctl stop nfs-server
sudo systemctl disable nfs-server

Debian and Ubuntu use nfs-kernel-server as the unit name. Stopping the service ends active NFS sessions, so check nfsstat -s and the client list in Step 6 first. Do not stop it in the middle of a backup job.

Step 4: Restrict Port 2049 to Known Clients

For servers that must stay up until their reboot window, the interim measure that both the vendor and the researchers recommend is to allow 2049 only from trusted clients. Replace 10.0.20.0/24 with your real client range.

With firewalld (RHEL family), remove the open nfs service and add a rich rule for the client subnet:

sudo firewall-cmd --permanent --remove-service=nfs
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.20.0/24" service name="nfs" accept'
sudo firewall-cmd --reload
sudo firewall-cmd --list-all

With ufw (Ubuntu):

sudo ufw allow from 10.0.20.0/24 to any port 2049 proto tcp
sudo ufw deny 2049/tcp
sudo ufw status numbered

ufw applies rules in order, so make sure the allow line comes before the deny line in the numbered output.

With plain nftables, put a dedicated table in front of everything else:

sudo nft add table inet nfsguard
sudo nft add chain inet nfsguard input '{ type filter hook input priority -10 ; policy accept ; }'
sudo nft add set inet nfsguard nfs_clients '{ type ipv4_addr ; flags interval ; }'
sudo nft add element inet nfsguard nfs_clients '{ 10.0.20.0/24 }'
sudo nft add rule inet nfsguard input tcp dport 2049 ip saddr @nfs_clients accept
sudo nft add rule inet nfsguard input tcp dport 2049 drop
sudo nft list table inet nfsguard

This ruleset is not persistent. Once it behaves correctly, add it to /etc/nftables.conf. It also does not cover IPv6: if the server has a routable IPv6 address, add an ipv6_addr set or drop IPv6 traffic to 2049 entirely.

Also check the cloud layer. A security group or network ACL that allows 2049 from 0.0.0.0/0 defeats a careful host firewall the day someone flushes it.

Step 5: Stopgap — Disable NFSv4.1 and 4.2 Until You Can Reboot

The researchers list a second interim option: switch off NFSv4.1 and 4.2, because the vulnerable code is in the 4.1 session machinery. In /etc/nfs.conf, the [nfsd] section accepts Boolean vers4.1 and vers4.2 keys:

[nfsd]
vers4.1=n
vers4.2=n

Apply the change and confirm it:

sudo systemctl restart nfs-server
cat /proc/fs/nfsd/versions

You should now see -4.1 -4.2. On older systems that start the daemon with flags, rpc.nfsd -N 4.1 -N 4.2 does the same thing.

Know the cost before you do this. Modern clients mount 4.2 by default and will fall back to 4.0 or v3 if allowed. Clients pinned with vers=4.2 in /etc/fstab or in a Kubernetes PersistentVolume will fail to mount. Features such as server-side copy also go away. The upstream advisory does not say whether NFSv4.0 or v3 are safe paths, so treat this step as a way to shrink the attack surface and buy time, not as a fix. Remove these lines after you reboot into a patched kernel.

Step 6: Review Exports and Clients

While you're in there, cut down what each server offers. List the live exports and their options:

sudo exportfs -v

Look for wildcard clients (* or 0.0.0.0/0), no_root_squash, insecure, and exports of / or home directories that nobody uses. Narrow each line in /etc/exports to named hosts or subnets, then apply without a restart:

sudo exportfs -ra

On kernels from 5.3 onward, nfsd lists connected NFSv4 clients under /proc/fs/nfsd/clients:

sudo sh -c 'for f in /proc/fs/nfsd/clients/*/info; do echo "== $f"; cat "$f"; done'

Each entry shows the client address and the minor version it negotiated. Any address outside your client list is worth investigating. One limit to keep in mind: sec=krb5 exports are good practice, but this bug is reachable without authentication (the CVSS vector is PR:N). Kerberos will not protect an unpatched server from it.

Verification

From a host that is not on the allow list, the port should now be filtered:

nmap -Pn -p 2049 nfs-server.example.internal

From an allowed client, a mount should still work:

sudo mount -t nfs -o vers=4.2 nfs-server.example.internal:/export /mnt && ls /mnt && sudo umount /mnt

After the reboot, run the Step 2 checks again. uname -r should report the patched kernel, and the changelog count should be non-zero.

Troubleshooting

Wrapping Up

NFS2ROOT is a reminder that the kernel is the server: there is no daemon to update, and no fix takes effect without a reboot. List every host listening on 2049, confirm the running kernel through the package changelog, limit the port to known clients, and use the NFSv4.1/4.2 switch only as a short bridge to the reboot. Once your exports are narrowed and the client list is checked, the next nfsd bug will reach far fewer servers.

Sources

COMPUTE NODE · · --:--:--

Fresh cybersecurity news,
daily threat intelligence.

Daily cyber news, live threat intel and exploited CVEs.

Everything in one place

Self-hosted, hardened, and yours.

RUN IT

Local AI console

Chat with a model on your own hardware via Ollama or any OpenAI-compatible server. No cloud, no key.

DEFEND

Cyber threat feed

Automatic intel from CISA KEV, NVD, GitHub and big-tech vendor advisories (Microsoft, VMware, Cisco, Fortinet…), a live cyber threat map, and your own notes.

NEWS

News & videos

Articles and updates on pentesting, AI, and cyber — with embedded video, including YouTube. Post your own.

DIRECTORY

Registry

Runtimes, models, MCP servers, agents, and a full security & pentest tooling section.

PUBLISH

Posts

Write, edit, publish, and share articles backed by a real database and your account.

COMMUNITY

Forum

Threads and replies across categories from Models to Hardware to Security.

CODE

Repos

Curated AI and security GitHub repos, plus a shelf for pinning your own.

DOWNLOAD

Skill packs

Agent starters, RAG scaffolds, and defensive security & VAPT report templates.

Registry

Runtimes, models, MCP servers, agent frameworks, and a security & pentest tooling section — all links out to the real projects.

Local AI console

Talk to a model running on your own machine through Ollama or an OpenAI-compatible server — your prompts and the model's replies always go straight from your browser to your local model, never through a Reef server. Attach files for context, and pick up saved chats where you left off.

Type /image a prompt in the box below to generate
Not connected

Local AI hardware benchmark

A spec-based compatibility advisor — tells you which local models your hardware can run well, which will be slow, and which to skip. Connect to Ollama below for a real, measured speed test instead of an estimate.

1. Your hardware

2. Live check against your local model server (optional)

If a local model server is running, this cross-references the table above with what you've actually got loaded — and runs a real, measured speed test instead of an estimate.

AI Database

A browsable catalog of AI models across providers — context windows, pricing, and capabilities.

Loading…

Cyber threat feed

Latest threats pulled automatically every hour

⇩ Export STIX
Loading threat feed…

Cyber threat map

Attacks happening right now, all over the world.

Connecting…
LIVE · MAURITIUS TIME--:--:--
attack route, country to country attack route into Mauritius attacker reported worldwide
Loading live data…
attackers reported per minute · click to rewindnow

Top attack routesweb

Attackers based inlast hour

Networkslast hour

Click any dot, feed row or table row to see that IP's profile.

Mauritius

Who attacks Mauritius

Loading…

Web attacks malicious requests to Mauritian websites that were blocked
Network DDoS floods meant to knock Mauritian servers offline

    Mauritius · last 24 h

    How Mauritius is attacked

    Network-level attacks (DDoS) aimed at Mauritius, by method. They try to knock servers and networks offline by sheer volume.

    • Loading…

    The ports or services these floods aimed at aren't published.

    Mauritius · last hour

    Attackers located in Mauritius

    0attackers located in Mauritius were reported in the last hour

    This counts attacks coming from Mauritius, not attacks on it: IPs in Mauritius that servers elsewhere reported for attacking them. Usually zero or one; when it rises, it's often a hacked local server or router.

    Worldwide today

    What attackers are knocking on

    Ports most targeted across a worldwide network of sensors .

    Worldwide today

    Most active attackers

    Ranked by how many separate sensors they hit. Click a row for its profile.

    IPCountryNetworkSensors hitReports
    What you're looking at
    Blue routes

    Share of attack traffic from one country to another. Thicker, faster streams carry more. Particles show volume, not one per attack.

    Every 15 min · published 1–2 h behind
    Amber flashes

    An attacking IP that servers around the world reported in the last minute, placed where the IP is. Its targets aren't published, so there's no line.

    Every minute · shown about 1 min behind
    Locations

    IP locations are approximate (city level at best) and show where the machine is hosted, not who controls it.

    Approximate · city level at best

    News

    Articles, guides and updates on pentesting, AI, and cybersecurity — with embedded video. Add your own, including YouTube.

    Loading…

    Posts

    Loading…

    Loading posts…

    Forum

    Questions, answers, and talk about running AI locally.

    Loading forum…

    GitHub repositories

    Curated AI and security repos, plus your own pinned shelf.

    Command board

    One-liners, configs, and advice worth keeping — shared by everyone here.

    ⚠ Commands are shared with all users. Never include credentials, tokens, or internal hostnames. Review anything before you run it.
    Loading commands…

    Skill packs

    Starter files served from the API — AI agent scaffolds plus defensive security & VAPT reporting templates. Click to download.

    Loading skills…

    Your watchlist

    Follow threat actors, malware, CVEs and vendors — we tell you when a new report, CVE record or exploitation alert mentions them.

    Threat Library

    Threat actors, malware and tools — their attack techniques, Reef Sentinel coverage and indicators of compromise.

    Loading…

    Threat Intelligence

    Curated threat write-ups, advisories and analysis — with cover media.

    Loading…

    Tutorials

    Step-by-step guides for running local AI, using the console, and tracking threats. Admins can add their own.

    Loading…

    Downloads

    Direct links to the official homepage/download page for well-known cybersecurity, penetration-testing, and local-AI software. Always verify checksums/signatures from the vendor before running anything.

    Loading…

    Privacy Policy

    Loading…

    Terms & Conditions

    Loading…

    Help & FAQ

    Answers to common questions about Reef Sentinel, plus a formatting guide for posts, articles, and comments.


    Formatting guide

    Commands you can type into the body of a post, comment, or reply — no HTML needed. Comments and short replies only support bold, italic, and inline code.

    Contact us

    Questions, feedback, or a security disclosure? Reach us directly, or send a message and we'll get back to you by email.

    Loading…

    Send a message

    VAPT Report Generator

    Build an engagement, add findings with a live CVSS calculator, and generate a branded, print-ready report.

    Recon Toolkit

    Investigate any domain, IP, URL, file hash, email or CVE in one search, plus breach and password checks, hash identification and a payload cheatsheet.

    Outage Monitor

    Is Microsoft 365, Facebook, Google, AWS or ChatGPT down? Live status of the big tech services from their official status pages, every incident with its full timeline, and how long each one took to fix.

    Website Checker

    Reads a website's HTTP response headers to identify its framework and server, shows any known CVEs for the exposed versions with details, and recommends what to do.

    Control panel

    Manage everything shown on the site — news & videos, posts, homepage headlines, and subscribers. Admin only.

    Overview
    Content
    Site
    Account & Security

    Email settings

    SMTP on ports 25/465/587 is blocked outbound by some hosts (e.g. DigitalOcean droplets by default) — Resend and Brevo send over their HTTPS API instead, so they work even then. Only the selected provider is used to send; the others stay saved but idle, so you can switch back any time without losing settings.

    Get a key from resend.com/api-keys. Uses the "From address" below as the sender — it must be on a domain you've verified with Resend.

    Get an API key (not an SMTP key) from app.brevo.com/settings/keys/api. Uses the "From address" below as the sender — it must be a verified sender in your Brevo account.

    "From address" and "Site name/URL" are shared by SMTP, Resend, and Brevo — they control what recipients see, regardless of which provider is active.

    Send a test email

    Sends through whichever provider is currently active above. Save your settings first if you just changed them.

    SIGNAL LOST

    We couldn't find this page

    The page may have been moved or deleted, or the address was mistyped.