Linux In-Kernel NFS Server Heap Overflow "nfs2root" (CVE-2026-99362): Zero-Byte Slot Allocation, Compound SEQUENCE Overflow, and Root Slab Execution

A technical teardown of nfs2root (CVE-2026-99362): how negotiating a zero-byte reply cache slot and truncating NFSv4.1 SEQUENCE responses triggers an out-of-bounds heap write in nfsd4_store_cache_entry(), enabling remote root compromise over port 2049.

Linux Kernel nfs2root CVE-2026-99362 Heap Overflow
📌
Security Roundup Series: Weekend of November 30, 2026 • 7 min read deep dive
🚨
Vulnerability Intelligence: CVE ID: CVE-2026-99362 ("nfs2root") (CWE-122 Heap-Based Buffer Overflow / CWE-787 Out-of-bounds Write) Severity: CRITICAL (UNAUTHENTICATED REMOTE ROOT KERNEL HEAP WRITE OVER TCP PORT 2049) (CVSS 9.8 Critical (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)) Threat Actor: Chuck Lever & Jeff Layton (Patch Commit 35ff1a7a7e38); Public Exploitation Under Active Research Status: Upstream Kernel Patch Merged; Backported to All Active LTS & Stable Branches Affected Systems: Linux kernel 3.16 through 6.12.x / 6.18.x / 7.3.x (nfsd with NFSv4.1 or NFSv4.2 enabled) Fixed In: Linux 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.118, 6.18.64, 7.3.5+

A critical remote memory-corruption vulnerability—dubbed "nfs2root" and tracked under CVE-2026-99362—has been identified in the Linux kernel’s in-tree Network File System server daemon (nfsd). With a maximum CVSS v3.1 score of 9.8, the vulnerability allows unauthenticated network attackers with network reachability to TCP port 2049 to trigger an out-of-bounds heap write directly in kernel slab memory. The defect stems from an architectural oversight in NFSv4.1 session negotiation: when an attacker negotiates a cached response size down to the exact baseline header threshold (NFSD_MIN_HDR_SEQ_SZ = 80 bytes), nfsd4_alloc_slot() computes a zero-byte reply cache buffer. By subsequently transmitting a crafted COMPOUND request containing a truncated SEQUENCE operation where the response buffer lacks space for the status code, the XDR encoder terminates early without setting an error status, leaving op->status = NFS_OK. When nfsd4_store_cache_entry() copies the response into the zero-byte buffer via read_bytes_from_xdr_buf(), up to 80 bytes overflow into adjacent kernel slab chunks, opening a direct path to kernel privilege escalation and unauthenticated remote code execution as root.

Linux Kernel nfs2root (CVE-2026-99362) Exploit Architecture
Figure 1: Architectural lifecycle of CVE-2026-99362 (nfs2root): zero-byte slot allocation in nfsd4_alloc_slot(), premature response buffer narrowing in nfsd4_sequence(), and the resulting out-of-bounds slab write in nfsd4_store_cache_entry().

Root Cause Analysis: Memory Management Oversight in nfsd

The flaw is located in the kernel source file fs/nfsd/nfs4state.c inside nfsd4_alloc_slot(), and its downstream copy routine in fs/nfsd/nfs4proc.c.

1. Zero-Byte Allocation via Slot Negotiation

During the NFSv4.1 CREATE_SESSION exchange, the client and server negotiate slot parameters, including ca_maxresponsesize_cached. The server calculates the buffer required to store cached reply data for each session slot:

slot_size = maxresponsesize_cached - NFSD_MIN_HDR_SEQ_SZ;
slot->sl_cache_entry = kmalloc(slot_size, GFP_KERNEL);

If an adversarial client specifies ca_maxresponsesize_cached == 80 (which exactly equals NFSD_MIN_HDR_SEQ_SZ), slot_size evaluates to 0. The Linux slab allocator (SLUB) returns a valid non-NULL pointer to a 0-byte chunk.

2. The COMPOUND SEQUENCE Status Encoding Trap

The client then sends a COMPOUND RPC request containing a SEQUENCE operation. When processing SEQUENCE, nfsd4_sequence() determines whether the reply fits in the client-specified response buffer:

if (xdr->buf->buflen < NFSD_MIN_HDR_SEQ_SZ) {
    /* Prematurely narrow the encoding context */
    xdr_truncate_encode(xdr, 0);
    return nfserr_rep_too_big_to_cache;
}

However, when the buffer is exactly 80 bytes, xdr_truncate_encode() leaves just enough room for the RPC reply header, but when encoding the individual operation status, the XDR encoder runs out of space. In this specific truncated condition, the error handling logic neglects to set the return code in the slot cache record, leaving op->status at its default initialized state: NFS_OK.

3. The Slab Heap Overflow

Because the operation status is marked as successful, the kernel attempts to save the cached response:

void nfsd4_store_cache_entry(struct nfsd4_compoundres *resp) {
    struct nfsd4_slot *slot = resp->cstate.slot;
    read_bytes_from_xdr_buf(resp->xdr.buf, 0, slot->sl_cache_entry, NFSD_MIN_HDR_SEQ_SZ);
}

read_bytes_from_xdr_buf() unconditionally writes NFSD_MIN_HDR_SEQ_SZ (80 bytes) from the XDR buffer into slot->sl_cache_entry. Because slot->sl_cache_entry was allocated with a size of zero bytes, the copy operations writes 80 bytes directly over the adjacent kernel heap slab metadata and neighboring allocated kernel objects (such as credentials structures struct cred, IPC namespaces, or network packet sk_buff headers).


Detection Telemetry & Threat Hunting

Kernel Panic and Dmesg Signatures

Exploit attempts frequently trigger kernel slab corruption warnings prior to successful memory alignment. Defenders should query system logs for SLUB allocator anomalies:

dmesg -T | grep -E "(slab corruption|general protection fault|kernel NULL pointer dereference|nfsd:)"

Look specifically for memory poison pattern alerts in kmalloc-64 or kmalloc-128 slab caches.

Network Telemetry (Suricata Rule)

alert tcp any any -> $NFS_SERVERS 2049 (
  msg:"COLIBRISEC Linux Kernel nfsd Potential nfs2root CREATE_SESSION Abuse (CVE-2026-99362)";
  flow:to_server,established;
  content:"|00 00 00 28|"; depth:4; # RPC Compound Marker
  content:"|00 00 00 2b|"; distance:8; within:4; # OP_CREATE_SESSION
  content:"|00 00 00 50|"; distance:12; within:4; # 80 bytes (0x50) max cached response size
  classtype:attempted-admin;
  sid:20269936; rev:1;
)

Patch Analysis & Upstream Remediation

The vulnerability was resolved upstream by enforcing a strict lower-bound floor on slot_size in fs/nfsd/nfs4state.c (Commit 35ff1a7a7e38):

--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1728,6 +1728,11 @@ static struct nfsd4_slot *nfsd4_alloc_slot(struct nfsd4_channel_attrs *attrs)
 	slot_size = attrs->maxresp_cached - NFSD_MIN_HDR_SEQ_SZ;
+	if (slot_size <= 0) {
+		attrs->maxresp_cached = NFSD_MIN_HDR_SEQ_SZ + 8;
+		slot_size = 8;
+	}
 	slot = kzalloc(struct_size(slot, sl_cache_entry, slot_size), GFP_KERNEL);
  1. Deploy Kernel Updates: Upgrade host kernels to patched stable releases: Linux 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.118, 6.18.64, or 7.3.5+.
  2. Perimeter Network Filtering: Restrict TCP port 2049 access at border and host firewalls. Inbound NFS traffic must be allowed solely from trusted, authorized client IP addresses.

Protocol Workaround: If kernels cannot be immediately rebooted, disable NFSv4.1 and NFSv4.2 protocol versions in /etc/nfs.conf:

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

Then reload the daemon: systemctl restart nfs-server.


Read more

ColibriSec Weekly Security Roundup — Week of December 4, 2026 Threat Intelligence Matrix

Security Roundup: CISA KEV Acronis/HFS/TYPO3 Wave, Agentic AI CyberStrikeAI & DoorDash Attacks, TeamCity & HPE CVSS 10.0, Linux 21-Year Netfilter & USB2Shell, Woolworths 14M & Roche 169GB Breaches (Week of December 4, 2026)

Executive Summary: The week of November 28 to December 4, 2026 marks a decisive operational inflection point across enterprise security, kernel engineering, autonomous AI threats, sovereign cyber legislation, and global data breaches. Between November 30 and December 3, the U.S. Cybersecurity and Infrastructure Security Agency (CISA) expanded its Known

By James Luther
CISA KEV Wave: Acronis CVE-2026-87887, Rejetto HFS CVE-2026-61500 & TYPO3 CVE-2026-125160

CISA KEV Nov 30–Dec 3 Wave: Acronis Backup Zero-Day (CVE-2026-87887), Rejetto HFS Math.random() RCE (CVE-2026-61500) & TYPO3 Path Disclosure (CVE-2026-125160)

📌Security Roundup Series: Week of December 4, 2026 • 7 min read deep dive🚨Vulnerability Intelligence: CVE ID: CVE-2026-87887 (Acronis), CVE-2026-61500 (Rejetto HFS) & CVE-2026-125160 (TYPO3) (CWE-863 Incorrect Authorization / CWE-338 Weak PRNG / CWE-209 Error Info Exposure) Severity: CRITICAL (ACTIVE EXPLOITATION IN WILD / MANDATORY CISA KEV BOD 26-04) (CVSS 9.8 Critical

By James Luther
JetBrains TeamCity CVE-2026-136858 and HPE Networking Central COP CVSS 10.0 Architecture

Enterprise CI/CD & Network Control-Plane Criticals: JetBrains TeamCity Build Agent Hijack (CVE-2026-136858) & HPE Networking Central On-Premises CVSS 10.0 SSH Backdoor

📌Security Roundup Series: Week of December 4, 2026 • 7 min read deep dive🚨Vulnerability Intelligence: CVE ID: CVE-2026-136858 (TeamCity) & CVE-2026-137285 / CVE-2026-137286 (HPE Central COP) (CWE-287 Improper Authentication / CWE-798 Use of Hard-coded Credentials) Severity: CRITICAL (TEAMCITY ACTIVELY EXPLOITED < 24H / HPE CVSS 10.0 HARD-CODED SSH) (CVSS 10.0 Critical

By James Luther
Linux Netfilter CVE-2026-139281, USB2Shell CVE-2026-98232 & RongYuan Keyboard Port 3814 Architecture

Linux Kernel & Peripheral Hardware Siege: 21-Year Netfilter IPv6 Firewall Bypass (CVE-2026-139281), USB2Shell (CVE-2026-98232) & 283-Brand RongYuan Keyboard Port 3814 CSWSH RCE

📌Security Roundup Series: Week of December 4, 2026 • 8 min read deep dive🚨Vulnerability Intelligence: CVE ID: CVE-2026-139281 (Linux Netfilter), CVE-2026-98232 (USB2Shell) & RongYuan Port 3814 CSWSH (CWE-681 Integer Truncation / CWE-191 Integer Underflow / CWE-306 Missing Auth & Wildcard CORS) Severity: CRITICAL (21-YEAR FIREWALL BYPASS, PRE-LOGIN KERNEL CORRUPTION & 283-BRAND BROWSER-TO-FIRMWARE

By James Luther