]> git.hungrycats.org Git - linux/commit
ksmbd: send proper error response in smb2_tree_connect()
authorMarios Makassikis <mmakassikis@freebox.fr>
Fri, 23 Dec 2022 10:59:31 +0000 (11:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 11:00:48 +0000 (12:00 +0100)
commitdddaf6a1b0cfe7e068d748ae10ce4a00fba92665
tree50f473e1e4a691b3dc64d44bca1d96104a6c3d0c
parent90fe11b7eb68ceceb63aa16449c83981cd9849d1
ksmbd: send proper error response in smb2_tree_connect()

commit cdfb2fef522d0c3f9cf293db51de88e9b3d46846 upstream.

Currently, smb2_tree_connect doesn't send an error response packet on
error.

This causes libsmb2 to skip the specific error code and fail with the
following:
 smb2_service failed with : Failed to parse fixed part of command
 payload. Unexpected size of Error reply. Expected 9, got 8

Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/smb2pdu.c