CVE-2026-98127
Executive Summary
CVE-2026-98127 is an improper input validation flaw in the Linux kernel SMB/CIFS client function smb3_insert_range(). The function fails to validate the resulting file size when handling the FALLOC_FL_INSERT_RANGE operation, allowing the operation to bypass RLIMIT_FSIZE limits, exceed s_maxbytes, or produce a file size outside the valid loff_t range. Systems that mount remote CIFS/SMB shares and permit unprivileged local users to invoke fallocate insert-range operations against files on those mounts are affected; impact is integrity and availability degradation via resourcesize-limit bypass, not code execution or data confidentiality loss.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
The vulnerability resides in the Linux kernel SMB client's handling of the FALLOC_FL_INSERT_RANGE fallocate operation, implemented in the smb3_insert_range() function. When a process invokes fallocate with the insert-range flag against a file residing on a CIFS/SMB mount, the kernel computes the new end-of-file (EOF) as the sum of the current inode size (i_size) and the requested insertion length (len).
The defect is that smb3_insert_range() does not validate this newly calculated EOF before committing the size change. Three distinct boundary conditions are left unchecked:
- RLIMIT_FSIZE bypass — The per-process file-size resource limit is not enforced for this code path. A regular write operation stops at the limit, but an insert-range operation can grow the file beyond it.
s_maxbytesoverflow — The filesystem-level maximum file size is not respected, permitting a file larger than the backing store supports.loff_trange violation — The arithmetici_size + lencan overflow the signed 64-bitloff_ttype, producing a size value outside the representable range.
The upstream resolution changes the computation to use check_add_overflow() to detect integer wraparound during the EOF calculation, then validates the resulting size with inode_newsize_ok() before the file is modified. If validation fails, the operation is rejected and the original file is left unchanged.
The supplied reproducer demonstrates the RLIMIT_FSIZE bypass concretely. With RLIMIT_FSIZE set to 3 MiB (via ulimit -f 3072) and SIGXFSZ trapped, a normal dd write is correctly stopped at 3145728 bytes. However, inserting 2 MiB into a 2 MiB file grows it to 4194304 bytes (4 MiB), exceeding the limit. After the fix, the same insert range fails with "File too large" and the file remains at 2097152 bytes.
The attack surface is the SMB/CIFS client filesystem interface. Any local process with write access to a file on a CIFS mount can issue the FALLOC_FL_INSERT_RANGE operation through the fallocate syscall. The flaw is a client-side kernel validation gap; the remote SMB server is not the enforcement point for the local resource limit.
Exploitation Scenarios
No public proof-of-concept exploit code is available. The attack chain is inferred from the vulnerability class (improper input validation / resource-limit bypass) and the behavior documented in the NVD description.
Reconnaissance / target identification — An attacker obtains a foothold as an unprivileged local user on a Linux host that has one or more CIFS/SMB shares mounted (e.g., entries under a mount point such as
/mnt/cifs). The attacker identifies a file or directory on the CIFS mount to which their user account has write access.Triggering the specific flaw class — The attacker invokes the
fallocateutility (or the correspondingfallocate(2)syscall) with the insert-range option against a file on the CIFS mount. The NVD description provides a concrete form of this action:fallocate -i -o 0 -l 2M "$FILE". Becausesmb3_insert_range()does not validate the new EOF, the size modification proceeds even when it violates RLIMIT_FSIZE,s_maxbytes, or theloff_trange.Payload / execution method at the vulnerability-class level — The flaw is a local resource-limit enforcement bypass rather than a memory-corruption or code-execution primitive. The "payload" is the crafted
fallocateinsert-range request with a length chosen to pushi_size + lenpast the enforcement boundary the attacker wishes to circumvent (the RLIMIT_FSIZE value, the filesystems_maxbytes, or theloff_tboundary).Post-exploitation impact — By bypassing RLIMIT_FSIZE, a process constrained by a file-size quota can write more data to the CIFS mount than policy permits, potentially consuming server-side storage, defeating capacity controls, or interfering with other workloads sharing the share. Exceeding
s_maxbytesor wrapping theloff_tcalculation may produce inconsistent size metadata that could affect subsequent file operations on the mount. The demonstrated outcome is an integrity/size-accounting violation on the affected file.
The NVD description does not document privilege escalation, remote code execution, or data exfiltration resulting from this issue, and no such claims should be inferred.
Impact Assessment
This is a local, low-complexity validation defect with a narrow impact profile. Under CVSS v3.1 the vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L reflects that exploitation requires local access (AV:L) with low privileges (PR:L), needs no user interaction, and affects only the same security scope.
- Confidentiality: None — The flaw does not expose file contents or credentials.
- Integrity: None to Low — The file-size accounting on the affected mount can be driven out of policy, though the demonstrated effect is a size/limit bypass rather than arbitrary content tampering.
- Availability: Low — Unchecked growth can consume storage on the CIFS server and violate
s_maxbytes/loff_tinvariants, potentially causing unpredictable behavior for other consumers of the mount.
Blast radius: Limited to Linux hosts with mounted CIFS/SMB shares where untrusted or resource-limited local users can execute fallocate insert-range operations. Multi-tenant or shared-storage environments using CIFS mounts with per-user RLIMIT_FSIZE policies face the highest exposure, since the limit is the control being bypassed. There is no evidence of wormable, remote, or unauthenticated exploitation. No CVSS base score was assigned by the source; the vector above is a reasoned estimate from the described behavior and should not be treated as an authoritative score.
Detection Guidance
Sigma Rule
title: Potential CVE-2026-98127 CIFS Insert-Range RLIMIT_FSIZE Bypass
id: 7f3a1c9e-2b4d-4e8a-9c1f-0a6d5e2b7c31
status: experimental
description: Detects execution of fallocate with insert-range flag against files on CIFS/SMB mount points, which may indicate abuse of the unvalidated EOF in smb3_insert_range (CVE-2026-98127).
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-98127
author: valtersit.com
date: 2026/01/01
logsource:
category: process_creation
product: linux
detection:
selection_tool:
Image|endswith:
- '/fallocate'
selection_insert:
CommandLine|contains:
- ' -i'
- '--insert-range'
selection_cifs:
CommandLine|contains:
- '/mnt/cifs'
- '/mnt/smb'
- 'cifs'
condition: selection_tool and selection_insert
fields:
- CommandLine
- User
- ParentImage
falsepositives:
- Legitimate administration scripting insert-range operations on CIFS mounts
level: medium
tags:
- attack.t1222
- cve.2026.98127
YARA Rule
rule CVE_2026_98127_CIFS_Insert_Range_Limit_Bypass
{
meta:
description = "Detects references to the CIFS insert-range limit bypass (smb3_insert_range / FALLOC_FL_INSERT_RANGE) in scripts, binaries, or logs"
author = "valtersit.com"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2026-98127"
date = "2026-01-01"
strings:
$s1 = "fallocate -i" ascii wide nocase
$s2 = "FALLOC_FL_INSERT_RANGE" ascii wide
$s3 = "smb3_insert_range" ascii wide
$s4 = "inode_newsize_ok" ascii wide
$s5 = "check_add_overflow" ascii wide
condition:
uint32(0) == 0x464C457F or any of ($s1, $s2, $s3, $s4, $s5)
}
Suricata IDS Rule
alert smb any any -> any 445 (msg:"CVE-2026-98127 Possible SMB/CIFS Large Insert-Range Size Manipulation"; flow:to_server,established; dce_iface:; content:"|FF|SMB"; depth:8; classtype:attempted-admin; reference:cve,2026-98127; reference:url,nvd.nist.gov/vuln/detail/CVE-2026-98127; sid:202698127; rev:1; metadata:created_at 2026_01_01, updated_at 2026_01_01, affected_product Linux_Kernel_SMB_Client, tags CVE_2026_98127;)
Elastic Detection
process where event.type == "start" and
process.name in ("fallocate", "dd", "truncate") and
process.args : ("-i", "--insert-range") and
process.args : ("/mnt/cifs*", "/mnt/smb*")
Splunk SPL Query
index=linux sourcetype=linux_audit OR sourcetype=syslog
("FALLOC_FL_INSERT_RANGE" OR "smb3_insert_range" OR "fallocate -i")
| stats count min(_time) as first_seen max(_time) as last_seen
values(host) as hosts values(user) as users by command, process
| where count > 0
| convert ctime(first_seen) ctime(last_seen)
Wazuh OSSEC Rule
<group name="linux,cifs,vulnerability,">
<rule id="100981" level="10">
<if_sid>80700</if_sid>
<decoded_as>auditd</decoded_as>
<field name="audit.key">fallocate_insert_range</field>
<description>CVE-2026-98127: possible fallocate insert-range on CIFS mount attempting RLIMIT_FSIZE bypass</description>
<mitre>
<id>T1222</id>
</mitre>
<group>cve_2026_98127,</group>
</rule>
</group>
Mitigation & Patch Guidance
Patch confidence: 0/4 (UNPATCHED — no patch evidence from any tracked source). No vendor-fixed version, workaround, or backport reference is currently available in the tracked data.
Immediate mitigations
- Restrict write access to files on CIFS/SMB mounts to trusted local users and groups; the flaw requires local write permission plus the ability to invoke
fallocatewith insert-range. - Apply supplementary filesystem quotas on the SMB server side so that client-side RLIMIT_FSIZE bypass does not translate into unbounded server storage consumption.
- Where operationally feasible, monitor for
fallocate -iinvocation against CIFS mount points (see Detection Guidance) and investigate unexpected file-size growth beyond configured limits. - Consider restricting use of the
FALLOC_FL_INSERT_RANGEoperation on CIFS mounts via policy or application allow-listing until an upstream fix is available.
- Restrict write access to files on CIFS/SMB mounts to trusted local users and groups; the flaw requires local write permission plus the ability to invoke
Patch / upgrade steps
- No patch reference is currently available. When the upstream Linux kernel fix is published, it will use
check_add_overflow()to compute the new EOF and validate it withinode_newsize_ok()before modifying the file. Track the Linux kernel stable and longterm release channels and the upstream SMB client subsystem commits for the fix. - Once a fixed kernel is released, schedule upgrades for hosts mounting CIFS/SMB shares, prioritizing multi-tenant and shared-storage environments.
- No patch reference is currently available. When the upstream Linux kernel fix is published, it will use
Long-term hardening
- Keep kernel SMB/CIFS client code current and subscribe to kernel security advisories.
- Enforce least-privilege on CIFS mounts and avoid granting broad write permissions to untrusted local users.
- Combine server-side quotas with client-side monitoring so that resource-limit enforcement does not depend solely on a single unvalidated code path.
- Validate that RLIMIT_FSIZE and filesystem size limits are independently enforced for all fallocate operation modes on remote filesystems during security regression testing.
References
- NVD — CVE-2026-98127: https://nvd.nist.gov/vuln/detail/CVE-2026-98127
- Linux kernel SMB client subsystem (
fs/smb/client) source tree and commit history (upstream fix location) - CWE-20 Improper Input Validation: https://cwe.mitre.org/data/definitions/20.html
- MITRE ATT&CK T1222 — File and Directory Permissions Modification: https://attack.mitre.org/techniques/T1222/
- Linux
fallocate(2)andfallocate(1)documentation for FALLOC_FL_INSERT_RANGE semantics
No public proof-of-concept exploit code, exploit-in-the-wild telemetry, or threat actor campaign is associated with CVE-2026-98127 in the provided data. CISA KEV status: not listed.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.