]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: workaround negprot bug in some Samba servers
authorSteve French <stfrench@microsoft.com>
Tue, 12 Jul 2022 05:11:42 +0000 (00:11 -0500)
committerSteve French <stfrench@microsoft.com>
Thu, 14 Jul 2022 00:59:47 +0000 (19:59 -0500)
commit536388ce1928acfae2ad06fbd536d5915dc55c31
tree1f245440fa1ac47a2be016c5d5b73f3fd8ba7e74
parent6b871b9a4c17095c83e3ed470f83ad9ea4a43378
smb3: workaround negprot bug in some Samba servers

Mount can now fail to older Samba servers due to a server
bug handling padding at the end of the last negotiate
context (negotiate contexts typically are rounded up to 8
bytes by adding padding if needed). This server bug can
be avoided by switching the order of negotiate contexts,
placing a negotiate context at the end that does not
require padding (prior to the recent netname context fix
this was the case on the client).

Fixes: cc725151f990 ("smb3: fix empty netname context on secondary channels")
Reported-by: Julian Sikorski <belegdol@gmail.com>
Tested-by: Julian Sikorski <belegdol+github@gmail.com>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2pdu.c