CVE-2026-143032: smb: client: don't write back through O_DIRECT handles
In the Linux kernel, the following vulnerability has been resolved:
smb: client: don't write back through ODIRECT handles
Writeback uses the first writable handle of the inode, which may have been opened with ODIRECT. Such handles are opened with FILENOINTERMEDIATEBUFFERING, for which Windows rejects any unaligned I/O with STATUSINVALIDPARAMETER. Writeback of partly dirty pages and of the unaligned tail of a file through one of them fails, so netfs ends it with the folios clean and the data never reaches the server.
xfstests generic/051, where fsstress mixes both kinds of opens, loses about 1% of its writes this way:
smb3writeerr: ... offset=0xde90d7 len=0xbd0b rc=-22
All the rejected writes in a network capture were unaligned writes on a no-buffering handle; none of the aligned ones, and none of the unaligned ones on regular handles, were.
Prefer a handle that was not opened with ODIRECT, and use one that was only if there is no other.
Affected Software
Event History
Frequently Asked Questions
When can this cause data loss or failed writeback?
It occurs when the SMB client selects a writable file handle opened with O_DIRECT for writeback and the write is unaligned, including partly dirty pages or an unaligned file tail. Windows rejects these no-buffering writes, and netfs may mark the affected folios clean even though the data did not reach the server.
What workloads are most likely to be affected?
Workloads that mix regular and O_DIRECT opens of the same SMB file are exposed. The reported reproduction uses fsstress with both kinds of opens and loses approximately 1% of writes; aligned writes on no-buffering handles and unaligned writes on regular handles were not observed to fail.
What is the mitigation if an update cannot be applied immediately?
Avoid mixing O_DIRECT and regular writable opens for the same file on SMB mounts, particularly where unaligned writes or partially dirty pages are possible. Using a regular, non-O_DIRECT writable handle avoids the described Windows no-buffering rejection.