提交 e7b8b8ed 编写于 作者: G Gustav Johansson 提交者: Steve French

ksmbd: smb2: Allow messages padded to 8byte boundary

clc length is now accepted to <= 8 less than length,
rather than < 8.

Solve issues on some of Axis's smb clients which send
messages where clc length is 8 bytes less than length.

The specific client was running kernel 4.19.217 with
smb dialect 3.0.2 on armv7l.

Cc: stable@vger.kernel.org
Signed-off-by: NGustav Johansson <gustajo@axis.com>
Acked-by: NNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: NSteve French <stfrench@microsoft.com>
上级 443d61d1
......@@ -416,8 +416,11 @@ int ksmbd_smb2_check_message(struct ksmbd_work *work)
/*
* Allow a message that padded to 8byte boundary.
* Linux 4.19.217 with smb 3.0.2 are sometimes
* sending messages where the cls_len is exactly
* 8 bytes less than len.
*/
if (clc_len < len && (len - clc_len) < 8)
if (clc_len < len && (len - clc_len) <= 8)
goto validate_credit;
pr_err_ratelimited(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册