This is a note to let you know that I've just added the patch titled ksmbd: fix endless loop when encryption for response fails to the 5.19-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-fix-endless-loop-when-encryption-for-response-fails.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 360c8ee6fefdb496fffd2c18bb9a96a376a1a804 Mon Sep 17 00:00:00 2001 From: Namjae Jeon <linkinjeon@xxxxxxxxxx> Date: Thu, 22 Sep 2022 23:35:43 +0900 Subject: ksmbd: fix endless loop when encryption for response fails From: Namjae Jeon <linkinjeon@xxxxxxxxxx> commit 360c8ee6fefdb496fffd2c18bb9a96a376a1a804 upstream. If ->encrypt_resp return error, goto statement cause endless loop. It send an error response immediately after removing it. Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ksmbd/server.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/fs/ksmbd/server.c +++ b/fs/ksmbd/server.c @@ -235,10 +235,8 @@ send: if (work->sess && work->sess->enc && work->encrypted && conn->ops->encrypt_resp) { rc = conn->ops->encrypt_resp(work); - if (rc < 0) { + if (rc < 0) conn->ops->set_rsp_status(work, STATUS_DATA_ERROR); - goto send; - } } ksmbd_conn_write(work); Patches currently in stable-queue which might be from linkinjeon@xxxxxxxxxx are queue-5.19/ksmbd-fix-incorrect-handling-of-iterate_dir.patch queue-5.19/ksmbd-fix-user-namespace-mapping.patch queue-5.19/ksmbd-fix-wrong-return-value-and-message-length-check-in-smb2_ioctl.patch queue-5.19/ksmbd-fix-endless-loop-when-encryption-for-response-fails.patch