SMB3.1.1: remove confusing mount warning when no SPNEGO info on negprot rsp
authorSteve French <stfrench@microsoft.com>
Wed, 9 Dec 2020 07:12:35 +0000 (01:12 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:54:17 +0000 (11:54 +0100)
commit639fd38197ee2004c8ce08695f42a49c536173aa
tree04b02b5a26ee8a050a5cceff7d4c176d47e95e9e
parentaa36952c5662894301a9c3ee3760879a450f3bf5
SMB3.1.1: remove confusing mount warning when no SPNEGO info on negprot rsp

commit bc7c4129d4cdc56d1b5477c1714246f27df914dd upstream.

Azure does not send an SPNEGO blob in the negotiate protocol response,
so we shouldn't assume that it is there when validating the location
of the first negotiate context.  This avoids the potential confusing
mount warning:

   CIFS: Invalid negotiate context offset

CC: Stable <stable@vger.kernel.org>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2misc.c