]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ksmbd: unset conn->binding on failed binding request
authorNamjae Jeon <linkinjeon@kernel.org>
Fri, 13 Mar 2026 01:00:58 +0000 (10:00 +0900)
committerSteve French <stfrench@microsoft.com>
Wed, 18 Mar 2026 02:45:29 +0000 (21:45 -0500)
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>
fs/smb/server/smb2pdu.c

index 9f7ff7491e9a8828ef4c846f0f0995b51fc44084..78d2d79d09b46863571d245a898fbe9499f1fcf4 100644 (file)
@@ -1948,6 +1948,7 @@ out_err:
                        }
                }
                smb2_set_err_rsp(work);
+               conn->binding = false;
        } else {
                unsigned int iov_len;