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-98127 Overview
CVE-2026-98127 is a Linux kernel vulnerability in the SMB client (smb/client) subsystem. The function smb3_insert_range() fails to validate the resulting file size when handling FALLOC_FL_INSERT_RANGE operations. This oversight allows local users to bypass the RLIMIT_FSIZE resource limit, exceed the filesystem s_maxbytes boundary, and produce file sizes outside the valid loff_t range on CIFS mounts. The flaw stems from missing arithmetic overflow checks and absent size validation before file modification. A reproducer demonstrates the bypass by growing a 2 MiB file to 4 MiB despite an active 3 MiB RLIMIT_FSIZE limit.
Critical Impact
Local users on systems with CIFS/SMB mounts can bypass per-process file size resource limits using fallocate with the insert range flag.
Affected Products
- Linux kernel SMB/CIFS client subsystem
- Systems mounting remote shares via CIFS
- Stable kernel branches referenced in the upstream fix commits
Discovery Timeline
- 2026-09-25 - CVE-2026-98127 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-98127
Vulnerability Analysis
The vulnerability resides in smb3_insert_range(), which implements the FALLOC_FL_INSERT_RANGE fallocate operation for files residing on CIFS mounts. The function accepts an offset and length, then shifts existing file content to make room for a new range. However, it never verifies whether i_size + len produces a valid new end-of-file (EOF) value.
Because the arithmetic result is not checked, the function can produce a size that exceeds the per-process RLIMIT_FSIZE limit, surpasses the superblock s_maxbytes maximum, or overflows the signed loff_t type used to represent file offsets. Regular write paths enforce these limits through standard VFS helpers, so the insert range path becomes an alternative route around them.
The upstream patch replaces direct addition with check_add_overflow() to compute the proposed new EOF safely. It then calls inode_newsize_ok() to validate the result against all applicable kernel limits before any on-disk or in-memory state changes.
Root Cause
The root cause is missing input validation in a filesystem-specific fallocate handler. The CIFS implementation did not mirror the size and overflow checks performed by generic VFS write paths, creating an inconsistency between enforcement surfaces.
Attack Vector
A local user with write access to a file on a CIFS mount can call fallocate(-i) to insert bytes into the file. By choosing an offset and length that push the resulting size past RLIMIT_FSIZE or s_maxbytes, the user bypasses limits that would otherwise terminate a regular write() call. The reproducer in the commit message demonstrates growing a file from 2 MiB to 4 MiB under a 3 MiB RLIMIT_FSIZE.
See the upstream fix in Linux Kernel Commit bc7602b9 for the full patch and context.
Detection Methods for CVE-2026-98127
Indicators of Compromise
- Files on CIFS mounts whose sizes exceed configured RLIMIT_FSIZE for the owning process.
- Audit records showing fallocate syscalls with the FALLOC_FL_INSERT_RANGE flag against CIFS-mounted paths.
- Filesystem quota or capacity anomalies on SMB shares attributable to specific local users.
Detection Strategies
- Enable Linux audit rules to log fallocate syscalls and correlate against CIFS mount points.
- Monitor kernel logs for CIFS write path errors adjacent to successful insert range operations on the same inodes.
- Compare observed file sizes on SMB shares against expected per-user resource limits during routine audits.
Monitoring Recommendations
- Collect endpoint telemetry on fallocate and related filesystem syscalls across Linux hosts that mount CIFS shares.
- Track kernel version inventory to identify unpatched hosts running the vulnerable SMB client code.
- Alert on unexpected growth of files owned by non-privileged users on remote SMB storage.
How to Mitigate CVE-2026-98127
Immediate Actions Required
- Apply the upstream kernel patches referenced in the NVD entry to all Linux systems that mount CIFS shares.
- Inventory hosts running kernels that include smb3_insert_range() without the validation fix.
- Restrict CIFS mount access to trusted users where patching cannot be completed immediately.
Patch Information
The fix is delivered across multiple stable branches. Review and apply the commit matching your kernel version: Linux Kernel Commit 1519dc88, Linux Kernel Commit 7c2c6904, Linux Kernel Commit bc7602b9, and Linux Kernel Commit f8cbfe3a. The patch introduces check_add_overflow() for the new EOF computation and validates the result with inode_newsize_ok().
Workarounds
- Avoid mounting CIFS shares on multi-user hosts until patches are deployed.
- Use filesystem quotas on the SMB server side to enforce size limits independent of client-side RLIMIT_FSIZE.
- Disable or restrict fallocate usage via mandatory access control policies where feasible.
# Verify running kernel version and check for the fix
uname -r
# Apply distribution-provided kernel update, for example:
# Debian/Ubuntu
sudo apt update && sudo apt install --only-upgrade linux-image-$(uname -r | sed 's/.*-//')
# RHEL/CentOS/Fedora
sudo dnf update kernel
# Reboot to activate the patched kernel
sudo systemctl reboot
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

