diff options
| author | Gustav Johansson <gustajo@axis.com> | 2023-05-06 00:05:07 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-24 17:36:54 +0100 |
| commit | 1c2461b41f302948708d9c5db970226d5d2e8474 (patch) | |
| tree | c9ff629223aa89be69ce4a0a1d4b330a3d8e7b16 | |
| parent | 49f47945386e7c202339965e5d5adb294538523f (diff) | |
| download | linux-1c2461b41f302948708d9c5db970226d5d2e8474.tar.gz linux-1c2461b41f302948708d9c5db970226d5d2e8474.tar.bz2 linux-1c2461b41f302948708d9c5db970226d5d2e8474.zip | |
ksmbd: smb2: Allow messages padded to 8byte boundary
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@vger.kernel.org
Signed-off-by: Gustav Johansson <gustajo@axis.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | fs/ksmbd/smb2misc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ksmbd/smb2misc.c b/fs/ksmbd/smb2misc.c index c579d0e09c13..33a927df64f1 100644 --- a/fs/ksmbd/smb2misc.c +++ b/fs/ksmbd/smb2misc.c @@ -422,8 +422,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( |
