Commit 282343cf authored by Namjae Jeon's avatar Namjae Jeon Committed by Steve French
Browse files

ksmbd: unset conn->binding on failed binding request



When a multichannel SMB2_SESSION_SETUP request with
SMB2_SESSION_REQ_FLAG_BINDING fails ksmbd sets conn->binding = true
but never clears it on the error path. This leaves the connection in
a binding state where all subsequent ksmbd_session_lookup_all() calls
fall back to the global sessions table. This fix it by clearing
conn->binding = false in the error path.

Cc: stable@vger.kernel.org
Reported-by: default avatarHyunwoo Kim <imv4bel@gmail.com>
Signed-off-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 5258572a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1948,6 +1948,7 @@ int smb2_sess_setup(struct ksmbd_work *work)
			}
		}
		smb2_set_err_rsp(work);
		conn->binding = false;
	} else {
		unsigned int iov_len;