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-98682 Overview
CVE-2026-98682 affects the Linux kernel's SMB client (cifs) implementation. The flaw stems from a race condition in cifs_file_copychunk_range() and the FICLONE path of cifs_remap_file_range(). These functions fail to serialise the destination page cache against server-side copy operations, unlike sibling range operations such as smb3_zero_range(), smb3_punch_hole(), smb3_collapse_range(), and smb3_insert_range(). An asynchronous destination writeback can complete after the server-side copy finishes and overwrite freshly copied data with stale cached pages, corrupting the target file. The issue was observed intermittently in the generic/363 xfstests run against Windows Server.
Critical Impact
Silent file corruption on SMB-mounted shares when applications use copy_file_range() or FICLONE ioctls against the Linux cifs client.
Affected Products
- Linux kernel SMB/CIFS client (fs/smb/client)
- Systems mounting SMB shares that negotiate server-side copy or clone support
- Linux distributions shipping affected stable kernel branches
Discovery Timeline
- 2026-10-18 - CVE-2026-98682 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98682
Vulnerability Analysis
The Linux cifs client exposes two server-side range operations that offload data movement to the SMB server: copychunk (used by copy_file_range()) and clone (used by the FICLONE ioctl). Both operations rewrite file contents on the server without the client's page cache participating in the write path. Correctness therefore depends on the client flushing dirty pages, invalidating the destination range, and preventing new I/O from racing the server ioctl.
cifs_file_copychunk_range() invalidates the destination range by calling filemap_invalidate_inode(), which acquires and releases the mapping's invalidate_lock internally. By the time the copychunk ioctl is dispatched, the lock has already been dropped. The function also never calls netfs_wait_for_outstanding_io() to drain in-flight netfs writes against the target. The clone path is weaker still: it holds only i_rwsem, performs a bare truncate_inode_pages_range(), and likewise skips draining outstanding I/O.
Root Cause
The root cause is a race condition [CWE-362] between asynchronous writeback and server-side range operations. Because the destination mapping's invalidate_lock is not held across the flush, invalidation, and ioctl, a concurrent writeback can land after the server has rewritten the range, reinstating stale cached data over the server-side result. This mirrors the earlier class of corruption fixed in commit d7d2adcd022b for the punch-hole path.
Attack Vector
This is a data-integrity defect triggered by legitimate workloads, not a remote exploitation primitive. Any process with write access to a file on an SMB mount that performs copy_file_range() or FICLONE while writeback is in flight on the destination can trigger silent corruption. The condition has reproduced non-deterministically in the generic/363 fstest against Windows Server.
The fix holds the target inode's invalidate_lock across unmap, flush, and invalidate steps, calls netfs_wait_for_outstanding_io() to drain outstanding writes before issuing the ioctl, and returns early on zero-length copies to avoid range underflow. Lock ordering follows VFS conventions: i_rwsem (already taken via lock_two_nondirectories()) is acquired before invalidate_lock.
Detection Methods for CVE-2026-98682
Indicators of Compromise
- Checksum mismatches or stale content in files recently written through copy_file_range() or ioctl(FICLONE) on cifs mounts.
- Intermittent failures of the xfstests generic/363 case against SMB targets.
- Application-level data integrity alarms on workloads that rely on server-side copy acceleration against Windows Server or Samba shares.
Detection Strategies
- Audit mounted filesystems for cifs/smb3 entries and inventory kernel versions against the fixed stable commits.
- Instrument workloads that use copy_file_range() with post-copy hash verification to catch corruption early.
- Monitor kernel changelogs for backports of commits c9b1194e8ec9 and dc71660f11ef into distribution kernels.
Monitoring Recommendations
- Track uname -r across fleet endpoints and flag kernels on affected stable branches that lack the backport.
- Alert on anomalous rates of file integrity failures on SMB-mounted application data stores.
- Review backup verification jobs that compare source and destination hashes after server-side copies.
How to Mitigate CVE-2026-98682
Immediate Actions Required
- Identify Linux hosts mounting SMB shares and schedule kernel updates once distribution vendors ship backports of the upstream fix.
- Pause reliance on server-side copy acceleration for integrity-sensitive workloads until patched kernels are deployed.
- Validate backup and replication pipelines that use copy_file_range() against SMB targets for silent corruption.
Patch Information
The fix is upstream in the stable kernel tree. Reference the Kernel Git Commit Log and the Kernel Git Commit Update for the authoritative patch content. The fix holds the target mapping's invalidate_lock across unmap, flush, and invalidate; drains outstanding netfs I/O with netfs_wait_for_outstanding_io(); and returns early for zero-length copies.
Workarounds
- Mount SMB shares with options that disable server-side copy offload where supported by the client, forcing data through the normal read/write path.
- Avoid using copy_file_range() and FICLONE on cifs mounts in integrity-critical workflows until the patched kernel is deployed.
- Where feasible, migrate affected workloads to local storage or a patched kernel host while updates are rolled out.
# Verify kernel version and cifs mounts on a Linux host
uname -r
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

