summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorMichail Andreas Michalopoulos <mike.michalo@gmail.com>2026-11-13 02:47:44 +0700
committerNamjae Jeon <linkinjeon@kernel.org>2026-11-15 10:08:13 +0900
commit3d322b98b56628ee69e4528a52cc1f445880fa17 (patch)
treebff5afaeaf7c633ca675e46d509381119ad5c841 /tools/lib/python/kdoc/python_version.py
parent91d16c8a2d6b161eac4907eb5a9442510e4f2ce2 (diff)
ksmbd: sign the last response of a compound that ends early
is_chained_smb2_message() ends a compound early when the next command does not fit in the request, or its response would not fit in the response buffer. Since commit e2b76ab8b5c9 ("ksmbd: add support for read compound"), __handle_ksmbd_work() then signs ksmbd_resp_buf_curr(), which is_chained_smb2_message() only moves to the response of the command just processed when it chains to the next command or reaches the last one. On an early end it returns without moving it, so for a command after the first, the previous command's response was signed again, over the iovecs of both responses, and the response of this command was left unsigned. Neither signature verifies at the client. Handle an early end as the end of the compound: pad the response to 8 bytes and make it the current one. smb2_allocate_rsp_buf() leaves room for that padding in the response buffer of a compound. Only a compound whose NextCommand points past the end of the message, or whose responses fill the response buffer, takes this path. Sashiko pointed it out in its review of an unrelated series. An AI assistant was used to draft the patch and as an independent reviewer. Fixes: e2b76ab8b5c9 ("ksmbd: add support for read compound") Signed-off-by: Michail Andreas Michalopoulos <mike.michalo@gmail.com> Reviewed-by: Ian Bridges <icb@fastmail.org> Tested-by: Ian Bridges <icb@fastmail.org> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions