]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Fix the error length of VALIDATE_NEGOTIATE_INFO message
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Mon, 26 Sep 2022 03:36:29 +0000 (11:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:12 +0000 (13:22 +0200)
commitcc1cf4a5c4fdfce73001c5e19dc3204d1c6a18d2
treedc8a84d80d21ff303f0ce0c058da7bd6bfc58641
parent106d359a8f7626969d9a5392a0f36e14627f5c4b
cifs: Fix the error length of VALIDATE_NEGOTIATE_INFO message

commit dc608d46455f2a246015122633c5cd143e9e6983 upstream.

Commit ddde1a77a34e ("smb3: add smb3.1.1 to default dialect list")
extend the dialects from 3 to 4, but forget to decrease the extended
length when specific the dialect, then the message length is larger
than expected.

This maybe leak some info through network because not initialize the
message body.

After apply this patch, the VALIDATE_NEGOTIATE_INFO message length is
reduced from 28 bytes to 26 bytes.

Fixes: ddde1a77a34e ("smb3: add smb3.1.1 to default dialect list")
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Cc: <stable@vger.kernel.org>
Acked-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Tom Talpey <tom@talpey.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2pdu.c