DEBIAN-CVE-2026-99111: Debian/linux vulnerability
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix data corruption with concurrent writes and OTRUNC cifsdotruncate() flushes dirty pages with filemapwriteandwait() and truncates the file on the server, but in the old code both operations ran without holding irwsem or invalidatelock. A concurrent buffered write via netfsperformwrite() -- which only needs irwsem shared -- could dirty new pages after the flush but before the local truncation, and those pages would be silently discarded by cifssetsize() -> truncatepagecache(). Fix by acquiring inodelock (exclusive irwsem) and filemapinvalidatelock at the top of cifsdotruncate(), so the entire flush-truncate-resize sequence is atomic with respect to: - buffered writes (blocked by exclusive irwsem, since netfsstartiowrite takes irwsem shared), - read page faults (blocked by exclusive invalidatelock, since filemapfault takes it shared), - writeback collection (blocked by netfswbbegin/netfswbend around the server truncate and local resize, since netfswritepages also acquires the wb lock).
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In cifs_do_truncate(), acquire inode_lock (exclusive i_rwsem) and filemap_invalidate_lock at the top, and use netfs_wb_begin/netfs_wb_end around the server truncate and local resize so the flush-truncate-resize sequence is atomic with respect to buffered writes, read page faults, and writeback collection.