]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix mount on old smb servers
authorPaulo Alcantara <pc@manguebit.com>
Thu, 16 Feb 2023 18:33:22 +0000 (15:33 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:05 +0000 (09:34 +0100)
commitae042160a8030784d61720852dbb29ff132ea91c
tree304ff8067e85baaa65bcfbf017f531c48842596e
parent92840db97a64ad284d0a1a0f30d9c3809d28dbe6
cifs: fix mount on old smb servers

commit 86bf611eab844fb7ef752b38def6af1f36fe10c2 upstream.

The client was sending rfc1002 session request packet with a wrong
length field set, therefore failing to mount shares against old SMB
servers over port 139.

Fix this by calculating the correct length as specified in rfc1002.

Fixes: 9b923ab1e8c1 ("cifs: use ALIGN() and round_up() macros")
Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/connect.c