Description
In the Linux kernel, the following vulnerability has been resolved:

smb: client: drain and invalidate before server-side copy/clone

cifs_file_copychunk_range() and the clone (FICLONE) path of
cifs_remap_file_range() do not serialise the destination page cache
against the server-side copy the way the other server-side range
operations (smb3_zero_range(), smb3_punch_hole(), smb3_collapse_range()
and smb3_insert_range()) do.

cifs_file_copychunk_range() invalidates the destination range with
filemap_invalidate_inode(), which takes and drops the mapping's
invalidate_lock internally, so the lock is no longer held when the
copychunk ioctl is issued. It also never drains in-flight netfs I/O on
the target. The clone path never takes the invalidate_lock at all (only
i_rwsem), uses a bare truncate_inode_pages_range() and likewise does not
drain outstanding I/O.

As a result an asynchronous destination writeback can complete after the
server-side copy/clone has run and reinstate stale data over the region
just written by the server, corrupting the file. This is the same class
of corruption as commit d7d2adcd022b ("smb/client: flush dirty data
before punching a hole") and has been seen randomly in generic/363
against Windows Server.

Fix both paths to follow the established ordering: hold the target
mapping's invalidate_lock across the flush and invalidation of the
destination and the server ioctl, and call netfs_wait_for_outstanding_io()
on the target to drain in-flight writes before the ioctl is issued. Only
the target inode's invalidate_lock is required, as the source is merely
flushed and not invalidated; i_rwsem (already held via
lock_two_nondirectories()) is acquired before the invalidate_lock,
matching the VFS lock ordering. Since filemap_invalidate_inode() takes
that same lock internally, replace it with its own unmap/flush/invalidate
steps instead of calling it, and return early on a zero-length copy to
avoid a range underflow.
Published: 2026-10-18
Score: 2.5 Low
EPSS: < 1% Very Low
KEV: No
Impact: Data corruption
Action: Apply patch
AI Analysis

Impact

The vulnerability originates from the SMB/CIFS client in the Linux kernel not properly synchronizing the destination file’s page cache during server‑side copy and clone operations. Because the client flushes and invalidates the target mapping incorrectly—releasing the invalidate_lock before issuing the copy‑chunk or clone ioctl—an asynchronous writeback can finish after the server operation and restore stale data, overwriting the freshly written region and corrupting the file. The flaw does not provide remote code execution or privilege escalation, but it does compromise data integrity for SMB‑managed files.

Affected Systems

Linux kernel builds that predate the patch, which add the SMB/CIFS client’s cifs_file_copychunk_range and cifs_remap_file_range paths, are affected. All kernel versions that include these routines in the SMB client are vulnerable until they are updated with the fix.

Risk and Exploitability

The CVSS score of 2.5 signals low severity, and the EPSS score of less than 1% indicates a very low probability of exploitation at this time; the vulnerability is not listed in CISA’s KEV catalog. An attacker who can perform SMB copy or clone operations against a vulnerable client can trigger the race condition and overwrite data, leading to corruption. The desired effect requires only local or network access to the SMB client and does not need special privileges or remote code execution.

Generated by OpenCVE AI on October 23, 2026 at 05:13 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that incorporates the patch fixing the SMB client page cache race condition
  • Check the kernel changelog or vendor announcement to identify the commit that addresses the cifs_file_copychunk_range and cifs_remap_file_range race conditions
  • After updating, verify that SMB file copy and clone operations no longer cause integrity issues by performing end‑to‑end test copies to remote SMB shares

Generated by OpenCVE AI on October 23, 2026 at 05:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 06 Nov 2026 17:30:00 +0000


Fri, 23 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362

Thu, 22 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-664
References
Metrics threat_severity

None

cvssV3_1

{'score': 2.5, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N'}

threat_severity

Low


Sun, 18 Oct 2026 19:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362

Sun, 18 Oct 2026 16:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: smb: client: drain and invalidate before server-side copy/clone cifs_file_copychunk_range() and the clone (FICLONE) path of cifs_remap_file_range() do not serialise the destination page cache against the server-side copy the way the other server-side range operations (smb3_zero_range(), smb3_punch_hole(), smb3_collapse_range() and smb3_insert_range()) do. cifs_file_copychunk_range() invalidates the destination range with filemap_invalidate_inode(), which takes and drops the mapping's invalidate_lock internally, so the lock is no longer held when the copychunk ioctl is issued. It also never drains in-flight netfs I/O on the target. The clone path never takes the invalidate_lock at all (only i_rwsem), uses a bare truncate_inode_pages_range() and likewise does not drain outstanding I/O. As a result an asynchronous destination writeback can complete after the server-side copy/clone has run and reinstate stale data over the region just written by the server, corrupting the file. This is the same class of corruption as commit d7d2adcd022b ("smb/client: flush dirty data before punching a hole") and has been seen randomly in generic/363 against Windows Server. Fix both paths to follow the established ordering: hold the target mapping's invalidate_lock across the flush and invalidation of the destination and the server ioctl, and call netfs_wait_for_outstanding_io() on the target to drain in-flight writes before the ioctl is issued. Only the target inode's invalidate_lock is required, as the source is merely flushed and not invalidated; i_rwsem (already held via lock_two_nondirectories()) is acquired before the invalidate_lock, matching the VFS lock ordering. Since filemap_invalidate_inode() takes that same lock internally, replace it with its own unmap/flush/invalidate steps instead of calling it, and return early on a zero-length copy to avoid a range underflow.
Title smb: client: drain and invalidate before server-side copy/clone
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-11-06T17:15:01.310Z

Reserved: 2026-09-25T10:25:14.364Z

Link: CVE-2026-98682

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-18T16:17:21.557

Modified: 2026-11-06T18:18:29.600

Link: CVE-2026-98682

cve-icon Redhat

Severity : Low

Publid Date: 2026-10-18T00:00:00Z

Links: CVE-2026-98682 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T05:15:14Z

Weaknesses
  • CWE-664

    Improper Control of a Resource Through its Lifetime