]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ksmbd: implement error handling for STATUS_INFO_LENGTH_MISMATCH in smb server
authorAaditya Kansal <aadityakansal390@gmail.com>
Mon, 17 Nov 2025 18:50:31 +0000 (00:20 +0530)
committerSteve French <stfrench@microsoft.com>
Mon, 1 Dec 2025 03:11:45 +0000 (21:11 -0600)
commite4442b2e95baf0901830c924d0a197b100aca970
tree894b09179fae7825f0be369696de20b01c69bc4f
parentb39a1833cc4a2755b02603eec3a71a85e9dff926
ksmbd: implement error handling for STATUS_INFO_LENGTH_MISMATCH in smb server

Add STATUS_INFO_LENGTH_MISMATCH mapping to EMSGSIZE.
Currently, STATUS_INFO_LENGTH_MISMATCH has no mapping to any error code,
making it difficult to distinguish between invalid parameters and length
mismatch.

Map STATUS_INFO_LENGTH_MISMATCH to EMSGSIZE while keeping the EINVAL for
invalid parameters. Although the buf_len check only checks for buf_size
being less than required, there was no error code for lower buf_size.
Hence, EMSGSIZE is used.

Signed-off-by: Aaditya Kansal <aadityakansal390@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/smb2pdu.c