CVE-2026-143107: fs/proc: fix the write length returned by proc_sys_call_handler()
In the Linux kernel, the following vulnerability has been resolved:
fs/proc: fix the write length returned by procsyscallhandler()
procsyscallhandler() reads the write length from iovitercount() and copies that many bytes from the iterator into kbuf. A cgroup/sysctl BPF program can replace the new value through bpfsysctlsetnewvalue() and update count to the length of the replacement value. The handler then returns that adjusted count as the number of bytes written, even though the iterator originally held a different number of bytes.
If the replacement value is longer than the original input, ->writeiter() reports more bytes than the iterator held. splice(2) passes that value to iterfilesplicewrite(), which subtracts it from the pipe length and walks past the pipe head:
Splice Exceeded! ret=7 tot=1 left=0 Oops: general protection fault RIP: 0010:iterfilesplicewrite+0xb6f/0x1170
The write path consumes at most the original iterator length in copyfromiterfull() before the BPF hook runs. Return the smaller of the adjusted and original counts on the write path, so an expanded BPF value cannot exceed the iterator while a handler that reports a shorter parsed length still produces a short write. The read path keeps using the adjusted count for copytoiter().
Affected Software
Event History
Frequently Asked Questions
What conditions are needed to trigger this issue?
The write must go through proc_sys_call_handler() with a cgroup/sysctl BPF program that replaces the sysctl value with one longer than the original input. The problematic oversized write result is then passed through splice(2).
Who is most likely exposed?
Systems using cgroup/sysctl BPF programs that call bpf_sysctl_set_new_value() with replacement values longer than the supplied write input are the relevant exposure group. The provided information does not establish whether such a BPF program is present in default configurations.
What symptoms indicate that the system may have encountered the vulnerability?
The described failure includes a "Splice Exceeded!" message followed by a general protection fault in iter_file_splice_write(). Kernel logs containing these messages during a splice-based sysctl write are indicators.
What is the immediate mitigation if an update cannot be applied?
Avoid cgroup/sysctl BPF programs that expand a replacement sysctl value beyond the length of the original write input, particularly for workflows using splice(2). Keep replacement values no longer than the submitted input.