This is a note to let you know that I've just added the patch titled ksmbd: block asynchronous requests when making a delay on session setup to the 6.3-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-block-asynchronous-requests-when-making-a-delay-on-session-setup.patch and it can be found in the queue-6.3 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b096d97f47326b1e2dbdef1c91fab69ffda54d17 Mon Sep 17 00:00:00 2001 From: Namjae Jeon <linkinjeon@xxxxxxxxxx> Date: Wed, 3 May 2023 08:43:30 +0900 Subject: ksmbd: block asynchronous requests when making a delay on session setup From: Namjae Jeon <linkinjeon@xxxxxxxxxx> commit b096d97f47326b1e2dbdef1c91fab69ffda54d17 upstream. ksmbd make a delay of 5 seconds on session setup to avoid dictionary attacks. But the 5 seconds delay can be bypassed by using asynchronous requests. This patch block all requests on current connection when making a delay on sesstion setup failure. Cc: stable@xxxxxxxxxxxxxxx Reported-by: zdi-disclosures@xxxxxxxxxxxxxx # ZDI-CAN-20482 Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ksmbd/smb2pdu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -1874,8 +1874,11 @@ out_err: try_delay = true; sess->state = SMB2_SESSION_EXPIRED; - if (try_delay) + if (try_delay) { + ksmbd_conn_set_need_reconnect(conn); ssleep(5); + ksmbd_conn_set_need_negotiate(conn); + } } } Patches currently in stable-queue which might be from linkinjeon@xxxxxxxxxx are queue-6.3/ksmbd-block-asynchronous-requests-when-making-a-delay-on-session-setup.patch queue-6.3/ksmbd-not-allow-guest-user-on-multichannel.patch queue-6.3/ksmbd-fix-racy-issue-from-smb2-close-and-logoff-with-multichannel.patch queue-6.3/ksmbd-fix-memleak-in-session-setup.patch queue-6.3/ksmbd-fix-null-pointer-dereference-in-smb2_get_info_filesystem.patch queue-6.3/ksmbd-fix-racy-issue-from-session-setup-and-logoff.patch queue-6.3/ksmbd-fix-racy-issue-under-cocurrent-smb2-tree-disconnect.patch queue-6.3/ksmbd-fix-deadlock-in-ksmbd_find_crypto_ctx.patch queue-6.3/ksmbd-destroy-expired-sessions.patch queue-6.3/ksmbd-call-rcu_barrier-in-ksmbd_server_exit.patch