CVE-2026-89678
largeShort-write detection flaw in Linux kernel nfsd direct writes corrupts NFS files
The Linux kernel's NFS server (nfsd) fails to detect partial writes in nfsd_direct_write(): the short-write check compares the bytes written against an iterator count that write_iter() has already reduced to the residual bytes, so a genuine short write is never caught. When a direct write completes short (for example due to an I/O error, interrupted write, or size/resource limit), the loop continues and places the next write segment's data at the wrong file offset, while the server also reports an inflated write count back to the NFS client. An attacker able to send write requests to an affected nfsd export can therefore cause silent data corruption on server-side files, with clients believing their writes fully succeeded; the issue is rated CVSS 7.5 (high, integrity-only) with network access, no privileges, and no user interaction required. Affected systems are Linux machines running the kernel nfsd server with the vulnerable direct-write code, though the record does not enumerate specific kernel version numbers. No public proof of concept and no known in-the-wild exploitation exist, and the flaw is not on the CISA KEV list.
What to do: Upgrade to a kernel build containing the nfsd_direct_write fix as soon as your distribution ships it and reload/reboot the NFS server so the patched kernel is active. In the meantime, restrict write access on NFS exports to trusted clients and keep TCP/2049 off untrusted networks, since any client able to issue writes can trigger the bug. Because corruption is silent and clients are told writes succeeded, audit NFS-written files for data at incorrect offsets, particularly after short-write conditions such as full disks, I/O errors, or interrupted writes.
| Linux kernel (nfsd NFS server, nfsd_direct_write path) | Affected version range not enumerated in this record; resolved by an upstream kernel patch that snapshots the segment byte count before each write. Consult your |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
In the Linux kernel, the following vulnerability has been resolved: nfsd: fix partial-write detection in nfsd_direct_write nfsd_direct_write() walks a list of write segments and, after each vfs_iocb_iter_write(), tries to detect a short write so the loop can stop before placing the next segment at a wrong file offset: host_err = vfs_iocb_iter_write(file, kiocb, &segments[i].iter); if (host_err write_iter(), which advances the iter by the number of bytes written. By the time the check runs, segments[i].iter.count is the residual, not the original request length: before write_iter: iter.count == original_len after write_iter: iter.count == original_len - host_err The condition then reduces to host_err ki_pos only bumped by the short amount, writing the next segment's payload at the wrong offset and over-reporting *cnt to the NFS client. Snapshot the segment's byte count before the write and compare host_err against that snapshot so any short write breaks the loop.
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
In the news0 stories
No ingested article mentions this CVE yet.