CVE-2026-99373: NFS/localio: detect a short read or write before the iterator has moved
In the Linux kernel, the following vulnerability has been resolved:
NFS/localio: detect a short read or write before the iterator has moved
nfslocalcallread() and nfslocalcallwrite() issue a misaligned DIO as up to three segments and must stop at the first short one, or the next segment lands at the wrong file offset. They test for that by comparing the bytes transferred against iovitercount() of the segment, read after readiter() or writeiter() has advanced the iterator, when the count is the residual rather than the request:
before the call: count == expected after the call: count == expected - status
The test is therefore status < expected - status, and it fires only when less than half of the segment was transferred. A short I/O that covers between 50% and 99% of a segment slips through: the loop moves on with kipos advanced by the short amount, the next segment is issued at the wrong offset, and the header's byte count is over-reported to the caller. A write that slips through also never sets NFSCONTEXTWRITESYNC, which is what makes the writes that follow a short one synchronous.
Take the segment's count before issuing it and compare against that.
This is the same defect that commit 250ec14932d5 ("nfsd: fix partial-write detection in nfsddirectwrite") fixed in NFSD's version of this loop.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.3-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1 - Compensating control
In nfs_local_call_read() and nfs_local_call_write(), capture the segment count before issuing read_iter() or write_iter(), then compare the bytes transferred against that original count to detect a short I/O.