Skip to content
/ linux Public

Commit 9feb2d1

Browse files
namjaejeongregkh
authored andcommitted
ksmbd: unset conn->binding on failed binding request
commit 282343c 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>
1 parent 9ee803b commit 9feb2d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/smb/server/smb2pdu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,6 +1957,7 @@ int smb2_sess_setup(struct ksmbd_work *work)
19571957
}
19581958
}
19591959
smb2_set_err_rsp(work);
1960+
conn->binding = false;
19601961
} else {
19611962
unsigned int iov_len;
19621963

0 commit comments

Comments
 (0)