提交 952d0a63 编写于 作者: S Steve French 提交者: Zheng Zengkai

smb3: do not attempt multichannel to server which does not support it

stable inclusion
from stable-5.10.36
commit d35c4c959eb48c0f14179dbeb28672bdd400b1c9
bugzilla: 51867
CVE: NA

--------------------------------

commit 9c2dc11d upstream.

We were ignoring CAP_MULTI_CHANNEL in the server response - if the
server doesn't support multichannel we should not be attempting it.

See MS-SMB2 section 3.2.5.2
Reviewed-by: NShyam Prasad N <sprasad@microsoft.com>
Reviewed-By: NTom Talpey <tom@talpey.com>
Cc: <stable@vger.kernel.org> # v5.8+
Signed-off-by: NSteve French <stfrench@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 5a9940b0
......@@ -92,6 +92,12 @@ int cifs_try_adding_channels(struct cifs_ses *ses)
return 0;
}
if (!(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname);
ses->chan_max = 1;
return 0;
}
/*
* Make a copy of the iface list at the time and use that
* instead so as to not hold the iface spinlock for opening
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册