Skip to content

Commit b43e297

Browse files
namjaejeonopsiff
authored andcommitted
ksmbd: unset conn->binding on failed binding request
commit 282343cf8a4a5a3603b1cb0e17a7083e4a593b03 upstream. 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: Hyunwoo Kim <imv4bel@gmail.com> 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> (cherry picked from commit 6ebef4a220a1ebe345de899ebb9ae394206fe921) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 5c031f7 commit b43e297

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/smb/server/smb2pdu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,6 +1934,7 @@ int smb2_sess_setup(struct ksmbd_work *work)
19341934
}
19351935
}
19361936
smb2_set_err_rsp(work);
1937+
conn->binding = false;
19371938
} else {
19381939
unsigned int iov_len;
19391940

0 commit comments

Comments
 (0)