summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorGael Blivet <gael.blivet@gmail.com>2026-07-07 11:55:01 +0200
committerNamjae Jeon <linkinjeon@kernel.org>2026-08-17 15:00:33 +0900
commitd68d4b3293034f549d55f407a23b4c0a6c90e50a (patch)
treecd19c2ffc4f9a4f1c92219082d3c2435929bf84e /tools/perf/scripts/python
parentf4ce7da9b33011d71d66b4eb3b979fa754e5e035 (diff)
ksmbd: fix off-by-one rejecting minimal COPYCHUNK query-limits request
The FSCTL_COPYCHUNK/FSCTL_COPYCHUNK_WRITE input length check uses in_buf_len <= sizeof(struct copychunk_ioctl_req), which rejects a buffer that is exactly sizeof(struct copychunk_ioctl_req) bytes -- the minimal, valid request containing only the fixed header with ChunkCount=0 and no chunk entries, used by clients to query the server's copy limits before issuing a real copychunk. Since copychunk_ioctl_req ends in a flexible array member, the correct minimum is that the buffer covers the fixed header, so use offsetof(..., Chunks) with '<' instead of '<=' against sizeof(): same value, but the boundary case is now correctly accepted. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Gael Blivet <gael.blivet@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions