Skip to main content
Vulnerability Database/CVE-2026-98126

CVE-2026-98126: Linux Kernel Privilege Escalation Vulnerability

CVE-2026-98126 is a privilege escalation flaw in the Linux kernel CIFS client that allows bypassing file size limits. This post explains the technical details, affected versions, impact, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98126 Overview

CVE-2026-98126 is a Linux kernel vulnerability in the SMB client (smb/client) that allows a file on a CIFS mount to grow beyond the caller's configured file-size limit. The flaw resides in smb3_zero_range(), which handles FALLOC_FL_ZERO_RANGE requests. When callers invoke fallocate without FALLOC_FL_KEEP_SIZE, the function extends the end-of-file (EOF) marker without consulting RLIMIT_FSIZE. Local users with write access to a CIFS mount can bypass per-process file-size limits enforced by ulimit. The issue has been resolved upstream through four stable kernel commits.

Critical Impact

Local users can bypass RLIMIT_FSIZE enforcement on CIFS mounts, creating files larger than policy allows and potentially exhausting shared storage resources.

Affected Products

  • Linux kernel SMB/CIFS client (fs/smb/client)
  • Systems mounting remote shares via CIFS/SMB3
  • Distributions shipping kernels prior to the fix commits (06a4f90, 3673f05, 88972e35, f320ca20)

Discovery Timeline

  • 2026-09-25 - CVE-2026-98126 published to NVD
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-98126

Vulnerability Analysis

The vulnerability affects the CIFS client implementation of the fallocate() system call. When userspace invokes fallocate with FALLOC_FL_ZERO_RANGE and omits FALLOC_FL_KEEP_SIZE, the kernel is expected to extend the file to the new offset while honoring per-process resource limits. The CIFS client path in smb3_zero_range() performed the range-zeroing and EOF extension without calling inode_newsize_ok(), which is the standard helper that validates a proposed new size against RLIMIT_FSIZE and filesystem maximums.

As demonstrated in the reproducer, a process with ulimit -f 3072 (a 3 MiB file-size cap) can issue a zero-range request covering 0 to 4 MiB against a 2 MiB file on a CIFS mount. The call returns success and the file reaches 4 MiB, violating the configured limit. On local filesystems the same operation would be rejected or raise SIGXFSZ.

Root Cause

The root cause is a missing input validation check [CWE-20] in smb3_zero_range(). The code path that extends EOF for zero-range fallocate requests did not call inode_newsize_ok() before issuing the SMB operation. Because resource-limit enforcement lives in that helper, the omission allowed the file to grow past RLIMIT_FSIZE without producing an error or signal.

Attack Vector

Exploitation requires a local authenticated user with write access to a file on a CIFS-mounted share. The user issues a fallocate syscall using FALLOC_FL_ZERO_RANGE with an offset and length that extend beyond the current EOF and beyond the active RLIMIT_FSIZE. The impact is a policy bypass rather than memory corruption or code execution. Potential consequences include quota or storage exhaustion on shared SMB backends and bypass of administrative controls that rely on ulimit for containment.

The upstream fix adds an inode_newsize_ok() check before sending the zero-range request when the operation would extend EOF. See the kernel commits 06a4f90, 3673f05, 88972e35, and f320ca20 for the resolved implementation.

Detection Methods for CVE-2026-98126

Indicators of Compromise

  • Files on CIFS mounts whose size exceeds the RLIMIT_FSIZE value of the process that last wrote them.
  • Successful fallocate(2) syscalls with mode containing FALLOC_FL_ZERO_RANGE but not FALLOC_FL_KEEP_SIZE targeting CIFS-backed files that extend EOF.
  • Unexpected storage growth on SMB shares not matched by application-level write patterns.

Detection Strategies

  • Audit the running kernel version against the stable commits listed above to confirm whether the fix is present.
  • Use auditd with a syscall rule for fallocate to capture mode flags, file descriptors, and resulting file sizes on hosts that mount CIFS shares.
  • Correlate ulimit-constrained workloads (containers, batch jobs) with observed on-disk file sizes to identify limit violations.

Monitoring Recommendations

  • Monitor CIFS mount points for anomalous file growth and compare against expected per-process quotas.
  • Alert on kernel versions in the fleet that have not received patches for fs/smb/client after the fix date.
  • Track SIGXFSZ delivery rates; a drop to zero for workloads that previously tripped the limit may indicate the vulnerable code path is in use.

How to Mitigate CVE-2026-98126

Immediate Actions Required

  • Inventory Linux hosts that mount CIFS/SMB shares and identify kernels lacking the fix commits.
  • Apply the vendor-provided kernel update that includes commits 06a4f90, 3673f05, 88972e35, or f320ca20 as appropriate for your stable branch.
  • Reboot affected systems after kernel installation to activate the patched SMB client.

Patch Information

The fix adds a call to inode_newsize_ok() in smb3_zero_range() before issuing the SMB zero-range request when the operation would extend EOF. The change is distributed across four stable backports: 06a4f90, 3673f05, 88972e35, and f320ca20. Consult your distribution's security tracker for the specific package versions that incorporate these commits.

Workarounds

  • Restrict local user access to CIFS mount points where RLIMIT_FSIZE enforcement is a security requirement.
  • Enforce file-size and quota limits at the SMB server side rather than relying solely on client-side ulimit.
  • Where feasible, require applications to use FALLOC_FL_KEEP_SIZE with FALLOC_FL_ZERO_RANGE until the kernel is patched.
bash
# Verify running kernel against fix commits before deploying workloads
uname -r
zcat /proc/config.gz 2>/dev/null | grep CONFIG_CIFS

# Example auditd rule to log fallocate calls on CIFS clients
auditctl -a always,exit -F arch=b64 -S fallocate -k cifs_fallocate

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.