{"id":41154,"date":"2026-10-19T00:32:23","date_gmt":"2026-10-18T16:32:23","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98682"},"modified":"2026-10-19T00:32:23","modified_gmt":"2026-10-18T16:32:23","slug":"cve-2026-98682","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98682","title":{"rendered":"CVE-2026-98682 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: drain an"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>smb: client: drain and invalidate before server-side copy\/clone<\/p>\n<p>cifs_file_copychunk_range() and the clone (FICLONE) path of<br \/>\ncifs_remap_file_range() do not serialise the destination page cache<br \/>\nagainst the server-side copy the way the other server-side range<br \/>\noperations (smb3_zero_range(), smb3_punch_hole(), smb3_collapse_range()<br \/>\nand smb3_insert_range()) do.<\/p>\n<p>cifs_file_copychunk_range() invalidates the destination range with<br \/>\nfilemap_invalidate_inode(), which takes and drops the mapping&#8217;s<br \/>\ninvalidate_lock internally, so the lock is no longer held when the<br \/>\ncopychunk ioctl is issued.  It also never drains in-flight netfs I\/O on<br \/>\nthe target.  The clone path never takes the invalidate_lock at all (only<br \/>\ni_rwsem), uses a bare truncate_inode_pages_range() and likewise does not<br \/>\ndrain outstanding I\/O.<\/p>\n<p>As a result an asynchronous destination writeback can complete after the<br \/>\nserver-side copy\/clone has run and reinstate stale data over the region<br \/>\njust written by the server, corrupting the file.  This is the same class<br \/>\nof corruption as commit d7d2adcd022b (&#8220;smb\/client: flush dirty data<br \/>\nbefore punching a hole&#8221;) and has been seen randomly in generic\/363<br \/>\nagainst Windows Server.<\/p>\n<p>Fix both paths to follow the established ordering: hold the target<br \/>\nmapping&#8217;s invalidate_lock across the flush and invalidation of the<br \/>\ndestination and the server ioctl, and call netfs_wait_for_outstanding_io()<br \/>\non the target to drain in-flight writes before the ioctl is issued.  Only<br \/>\nthe target inode&#8217;s invalidate_lock is required, as the source is merely<br \/>\nflushed and not invalidated; i_rwsem (already held via<br \/>\nlock_two_nondirectories()) is acquired before the invalidate_lock,<br \/>\nmatching the VFS lock ordering.  Since filemap_invalidate_inode() takes<br \/>\nthat same lock internally, replace it with its own unmap\/flush\/invalidate<br \/>\nsteps instead of calling it, and return early on a zero-length copy to<br \/>\navoid a range underflow.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>smb: client: drain and invalidate before server-side copy\/clone<\/p>\n<p>cifs_file_copychunk_range() and the clone (FICLONE) path of<br \/>\ncifs_r<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-41154","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/41154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=41154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=41154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=41154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}