{"id":41316,"date":"2026-10-19T00:33:11","date_gmt":"2026-10-18T16:33:11","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98844"},"modified":"2026-10-19T00:33:11","modified_gmt":"2026-10-18T16:33:11","slug":"cve-2026-98844","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98844","title":{"rendered":"CVE-2026-98844 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nnetfs: clear post-EOF"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>netfs: clear post-EOF pagecache when extending a file via write<\/p>\n<p>Fix netfs to erase the contents of a hole created after the EOF by an<br \/>\nordinary write if dirty data has been previously left there by writes<br \/>\nthrough an mmapped region.  Neither the buffered nor the unbuffered\/DIO<br \/>\nwrite path clears that stale pagecache.<\/p>\n<p>Zero the tail of the folio straddling the EOF before an extending<br \/>\nwrite.  That is the only folio that can hold data written past the EOF<br \/>\nthrough an mmap, as pages wholly beyond the EOF can&#8217;t be faulted in.<br \/>\nThe folio is zeroed rather than dropped so a concurrent extending write<br \/>\ncan&#8217;t lose data.<\/p>\n<p>Both write paths downgrade the i_rwsem to shared, so extending writes<br \/>\ncan run concurrently and the i_size read by the caller may be stale by<br \/>\nthe time the folio is locked.  Re-read i_size under the folio lock and<br \/>\nclamp the zeroed range up to it, so a racing write that already put<br \/>\ndata into the folio isn&#8217;t clobbered.<\/p>\n<p>Wait for any writeback on the folio to finish before zeroing it so that<br \/>\nthe pagecache isn&#8217;t modified while it may still be read by the transport<br \/>\nduring transmission.  Honour IOCB_NOWAIT by returning -EAGAIN rather<br \/>\nthan blocking on the folio lock, on writeback, or in folio_mkclean()&#8217;s<br \/>\nrmap walk when the folio is mapped.<\/p>\n<p>truncate_pagecache() can&#8217;t be used here: it must be called with the<br \/>\ni_rwsem held exclusively, but these write paths only hold it shared,<br \/>\nand it would block unconditionally, breaking IOCB_NOWAIT.<\/p>\n<p>Callers that hold i_rwsem exclusively for the whole resize (truncate,<br \/>\nsetattr, fallocate, clone) exclude any genuine concurrent buffered<br \/>\nwriter, so staleness can instead be decided from the folio&#8217;s dirty<br \/>\nstate, as pagecache_isize_extended() already does for filesystems that<br \/>\nserialise writes against truncate\/setattr via a single i_rwsem.<br \/>\nExport netfs_clear_stale_post_isize() helper to handle such case.<\/p>\n<p>The helper is required by the CIFS client to fix generic\/363.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>netfs: clear post-EOF pagecache when extending a file via write<\/p>\n<p>Fix netfs to erase the contents of a hole created after the EOF by<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-41316","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/41316","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=41316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=41316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=41316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}