diff options
| author | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-27 14:12:59 +0900 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-28 17:57:07 +0900 |
| commit | 206fc30f71b005156085fd8523ccc84a2c67791b (patch) | |
| tree | 2fa7f716a9d53ca688627f20dc9ad2afe9d5229d /scripts/ipe | |
| parent | 03bd8f5279e490e15e0c0f0fa388ffbd2fbacd65 (diff) | |
ksmbd: return complete and aligned stream information
FILE_STREAM_INFORMATION responses are assembled without aligning entries
and truncated to the client buffer length after the fact. A short query
can therefore return STATUS_BUFFER_OVERFLOW with an incomplete entry and
a nonzero NextEntryOffset, which clients may reject as an invalid
network response. Standalone queries can also exhaust the server
response buffer and silently omit streams while reporting success.
Allocate the same large response buffer used by other variable-length
QUERY_INFO classes for stream queries. Pack only complete entries within
the requested output length and available response space, aligning each
entry to eight bytes and sizing names after UTF-16 conversion. Return
STATUS_BUFFER_OVERFLOW when more entries remain, using an SMB2 error
response if no entry fits.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Fixes: 6b8b79226bc3 ("ksmbd: fix partial file information responses")
Link: https://github.com/namjaejeon/ksmbd/issues/522#issuecomment-6391152923
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/ipe')
0 files changed, 0 insertions, 0 deletions
