mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ksmbd: fix endless loop when encryption for response fails
commit360c8ee6feupstream. If ->encrypt_resp return error, goto statement cause endless loop. It send an error response immediately after removing it. Fixes:0626e6641f("cifsd: add server handler for central processing and tranport layers") Cc: stable@vger.kernel.org Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2b0897e336
commit
39b6855628
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user