This is a note to let you know that I've just added the patch titled ksmbd: smb2: Allow messages padded to 8byte boundary to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ksmbd-smb2-allow-messages-padded-to-8byte-boundary.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e7b8b8ed9960bf699bf4029f482d9e869c094ed6 Mon Sep 17 00:00:00 2001 From: Gustav Johansson <gustajo@xxxxxxxx> Date: Sat, 6 May 2023 00:05:07 +0900 Subject: ksmbd: smb2: Allow messages padded to 8byte boundary From: Gustav Johansson <gustajo@xxxxxxxx> commit e7b8b8ed9960bf699bf4029f482d9e869c094ed6 upstream. 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@xxxxxxxxxxxxxxx Signed-off-by: Gustav Johansson <gustajo@xxxxxxxx> Acked-by: Namjae Jeon <linkinjeon@xxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ksmbd/smb2misc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/fs/ksmbd/smb2misc.c +++ b/fs/ksmbd/smb2misc.c @@ -422,8 +422,11 @@ int ksmbd_smb2_check_message(struct ksmb /* * 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( Patches currently in stable-queue which might be from gustajo@xxxxxxxx are queue-5.15/ksmbd-smb2-allow-messages-padded-to-8byte-boundary.patch