summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorWang Zhaolong <wangzhaolong3@outlook.com>2026-10-27 22:43:24 +0800
committerNamjae Jeon <linkinjeon@kernel.org>2026-10-28 07:44:59 +0900
commit2d5c7afbb1d19f51f76c0865b4cb2e4e8347ade6 (patch)
tree435301effa2d0a02a15f1fe1861accb907cec8a6 /scripts/Makefile.thinlto
parenta43e0718a4abed7f859a67bd7b154acf213589fa (diff)
downloadlinux-2d5c7afbb1d19f51f76c0865b4cb2e4e8347ade6.tar.gz
linux-2d5c7afbb1d19f51f76c0865b4cb2e4e8347ade6.zip
ksmbd: fix named-pipe reply loss with small output buffers
FSCTL_PIPE_TRANSCEIVE copies at most MaxOutputResponse bytes from an RPC reply and reports STATUS_BUFFER_OVERFLOW when it does not fit. It then frees the complete IPC reply, including the bytes that were not returned. The client cannot recover those bytes with a subsequent READ, so an RPC call can fail even though userspace produced a complete reply. Pipe READ also ignores the requested Length when copying an IPC reply. In the reproduced Windows NetShareEnum case, a 2632-byte reply is limited to 1024 bytes of SMB output. The remaining 1608 bytes are discarded instead of being available to the follow-up READ. Increasing the application-level enumeration budget does not change that SMB output limit. Keep unread reply data on the pipe and respect each operation's output limit. Preserve it until successfully included in a response: response preparation failures and later input must not discard output that the client has yet to receive. Treat a failed IPC exchange as an I/O error, rather than reporting an empty read or acknowledging a write without an IPC reply. Additional RPC reply queueing remains userspace's responsibility. Reject TRANSCEIVE with STATUS_PIPE_BUSY while cached reply data remains. Do this before contacting userspace, without accepting new input or consuming cached output. The client can drain the reply with READ and explicitly resubmit the transaction. A successful positive-length READ that leaves a suffix of the same cached reply reports STATUS_BUFFER_OVERFLOW. Keep cached bytes on failed requests, and consume them only after the response is pinned successfully. Release the original reply when drained or when its pipe is closed, logged off or disconnected. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Link: https://bugzilla.kernel.org/show_bug.cgi?id=222196 Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202610260610.5prVfJss-lkp@intel.com/ Signed-off-by: Wang Zhaolong <wangzhaolong3@outlook.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions