CVE-2026-143106: fs/splice: clamp an over-reported write_iter result
In the Linux kernel, the following vulnerability has been resolved:
fs/splice: clamp an over-reported writeiter result
iterfilesplicewrite() builds a bvec iterator of at most sd.totallen - left bytes and passes it to ->writeiter(). It then subtracts the returned length from sd.totallen and walks the pipe buffers by that length. A ->writeiter() implementation that reports more bytes than the iterator held makes sd.totallen underflow and the dismissal loop advance pipe->tail past pipe->head, releasing a zeroed pipe buffer:
Splice Exceeded! ret=7 tot=1 left=0 Oops: general protection fault RIP: 0010:iterfilesplicewrite+0xb6f/0x1170
Commit a3de58b12ce0 ("netfs: Fix unbuffered write error handling") added the warning for this condition but only reports it. Clamp the return value to the size of the iterator that was actually handed to ->writeiter(), so the pipe accounting stays consistent even when a producer violates the iterator contract.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch a3de58b12ce0
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems are exposed when iter_file_splice_write() calls a ->write_iter() implementation that reports writing more bytes than were present in the iterator it received. The resulting incorrect pipe accounting can advance pipe->tail beyond pipe->head and release a zeroed pipe buffer.
How can I tell whether this condition has occurred?
Affected execution may produce the warning "Splice Exceeded!" with returned, total, and remaining byte counts. The described failure can then result in an Oops reporting a general protection fault in iter_file_splice_write().
What does the fix change?
The fix clamps the length returned by ->write_iter() to the size of the iterator actually passed to it. This prevents underflow of sd.total_len and keeps pipe-buffer dismissal accounting consistent when an implementation violates the iterator contract.