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-98686 Overview
CVE-2026-98686 is an information disclosure vulnerability in the Linux kernel's SMB client implementation. The flaw resides in smb3_zero_range(), which failed to discard pagecache folios straddling the old end-of-file (EOF) when extending a file through a zero-range operation. Data previously dirtied past EOF through an mmap mapping could become visible as legitimate file content once the file was extended. The issue has been resolved upstream by lowering the discard boundary to the smaller of the zero-range offset and the old EOF.
Critical Impact
Stale pagecache contents dirtied past EOF through memory-mapped writes can leak into file content on SMB-mounted shares, exposing data that should never have been persisted.
Affected Products
- Linux kernel SMB client (fs/smb/client)
- Distributions shipping affected stable kernel branches prior to the referenced fix commits
- SMB3 clients using smb3_zero_range() for file extension operations
Discovery Timeline
- 2026-10-18 - CVE-2026-98686 published to NVD
- 2026-10-21 - Last updated in NVD database
Technical Details for CVE-2026-98686
Vulnerability Analysis
The Linux kernel's SMB client exposes a FALLOC_FL_ZERO_RANGE operation through smb3_zero_range(). When the requested zero range extended beyond the file's current EOF, the function invalidated the pagecache only for the explicit zero-range interval. The folio that straddled the previous EOF was not dropped. Any data dirtied past EOF through an existing mmap mapping persisted in that folio. Once the file length was extended, those stale bytes became observable as valid file content on subsequent reads.
This is an information disclosure issue rooted in a pagecache coherency gap between memory-mapped writes and the fallocate-based extension path. The exposed bytes may originate from the calling process itself, but can include data never intended to be written to the share.
Root Cause
The discard boundary in smb3_zero_range() was set relative to the zero-range offset rather than the smaller of the zero-range offset and the old EOF. As a result, the straddling folio at the old EOF boundary was retained with its dirty post-EOF bytes intact. The fix lowers the discard boundary so the straddling folio is always invalidated before the file is extended.
Attack Vector
A local user with write access to a file on an SMB-mounted share can trigger the condition by memory-mapping the file, dirtying bytes past the current EOF through the mapping, and then issuing a fallocate(FALLOC_FL_ZERO_RANGE) call that extends the file length. Subsequent reads return the previously stale post-EOF bytes as file content. The vulnerability requires local access to a system with an active SMB client mount and does not provide code execution.
No verified public exploit code is available. The upstream patches detailing the fix are available in the stable kernel tree: 3df27277f8f9, 6a8279c98ad2, 94949b6b2f2b, b75dadb50a25, and da4fe97fb6c7.
Detection Methods for CVE-2026-98686
Indicators of Compromise
- Unexpected content appearing in files on SMB-mounted shares immediately after fallocate operations that extended the file.
- Files on SMB shares containing data that was never explicitly written through standard write syscalls.
- Audit traces showing mmap followed by fallocate(FALLOC_FL_ZERO_RANGE) sequences on the same file descriptor targeting an offset beyond current file length.
Detection Strategies
- Inventory running kernel versions across Linux hosts and compare against the fixed stable branches referenced in the upstream commits.
- Monitor syscall telemetry for fallocate calls with the FALLOC_FL_ZERO_RANGE flag targeting offsets past file length on CIFS/SMB mounts.
- Review file integrity monitoring data on SMB-mounted directories for unexpected content changes that do not correlate with legitimate writes.
Monitoring Recommendations
- Enable auditd rules for fallocate syscalls on filesystems of type cifs or smb3 to establish a baseline of normal usage.
- Track kernel package versions in configuration management inventories to confirm patch deployment.
- Correlate SMB client activity with mmap-based file operations to flag unusual sequences on sensitive shares.
How to Mitigate CVE-2026-98686
Immediate Actions Required
- Apply the stable kernel updates that include the referenced upstream commits to all Linux systems that mount SMB shares.
- Prioritize patching on multi-tenant hosts, build servers, and systems where untrusted local users have access to SMB-mounted content.
- Audit SMB shares for files that may contain unintended data exposed through this condition and rotate any sensitive material if exposure is suspected.
Patch Information
The fix lowers the pagecache discard boundary in smb3_zero_range() to the smaller of the zero-range offset and the old EOF, ensuring that the folio straddling the prior EOF is invalidated before the file is extended. Patches are available in the stable kernel tree under commits 3df27277f8f9, 6a8279c98ad2, 94949b6b2f2b, b75dadb50a25, and da4fe97fb6c7. Consult your distribution's security tracker for the specific backport applicable to your running kernel branch.
Workarounds
- Avoid mixing mmap-based writes past EOF with fallocate(FALLOC_FL_ZERO_RANGE) extension operations on SMB-mounted files until the kernel is patched.
- Restrict local write access to SMB mounts where feasible, limiting exposure to trusted users only.
- Where application behavior permits, switch to explicit pwrite or ftruncate operations instead of zero-range extension on SMB clients.
# Verify running kernel version and compare against distribution advisories
uname -r
# Identify active SMB/CIFS mounts that are in scope
mount -t cifs,smb3
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

