This is a note to let you know that I've just added the patch titled ksmbd: return STATUS_NOT_SUPPORTED on unsupported smb2.0 dialect to the 6.2-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-return-status_not_supported-on-unsupported-smb2.0-dialect.patch and it can be found in the queue-6.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b53e8cfec30b93c120623232ba27c041b1ef8f1a Mon Sep 17 00:00:00 2001 From: Namjae Jeon <linkinjeon@xxxxxxxxxx> Date: Tue, 21 Mar 2023 15:36:40 +0900 Subject: ksmbd: return STATUS_NOT_SUPPORTED on unsupported smb2.0 dialect From: Namjae Jeon <linkinjeon@xxxxxxxxxx> commit b53e8cfec30b93c120623232ba27c041b1ef8f1a upstream. ksmbd returned "Input/output error" when mounting with vers=2.0 to ksmbd. It should return STATUS_NOT_SUPPORTED on unsupported smb2.0 dialect. Cc: stable@xxxxxxxxxxxxxxx Reported-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ksmbd/smb_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/ksmbd/smb_common.c +++ b/fs/ksmbd/smb_common.c @@ -434,7 +434,7 @@ int ksmbd_extract_shortname(struct ksmbd static int __smb2_negotiate(struct ksmbd_conn *conn) { - return (conn->dialect >= SMB21_PROT_ID && + return (conn->dialect >= SMB20_PROT_ID && conn->dialect <= SMB311_PROT_ID); } @@ -465,7 +465,7 @@ int ksmbd_smb_negotiate_common(struct ks } } - if (command == SMB2_NEGOTIATE_HE && __smb2_negotiate(conn)) { + if (command == SMB2_NEGOTIATE_HE) { ret = smb2_handle_negotiate(work); init_smb2_neg_rsp(work); return ret; Patches currently in stable-queue which might be from linkinjeon@xxxxxxxxxx are queue-6.2/ksmbd-fix-wrong-signingkey-creation-when-encryption-is-aes256.patch queue-6.2/ksmbd-set-file_named_streams-attribute-in-fs_attribute_information.patch queue-6.2/ksmbd-add-low-bound-validation-to-fsctl_query_alloca.patch queue-6.2/ksmbd-fix-possible-refcount-leak-in-smb2_open.patch queue-6.2/ksmbd-return-status_not_supported-on-unsupported-smb2.0-dialect.patch queue-6.2/ksmbd-don-t-terminate-inactive-sessions-after-a-few-seconds.patch queue-6.2/ksmbd-return-unsupported-error-on-smb1-mount.patch queue-6.2/ksmbd-add-low-bound-validation-to-fsctl_set_zero_dat.patch