]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: send proper error response in smb2_tree_connect()
authorMarios Makassikis <mmakassikis@freebox.fr>
Mon, 18 Dec 2023 15:33:29 +0000 (00:33 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:53 +0000 (10:41 +0100)
commitd7f088dc279441ace8b5ef70259c089142f89497
tree8ed22e4a51c7e6f9d06be9294adb2b7efdc2db36
parentbcab5c810544ea5dda4a1d50319da556677d22a2
ksmbd: send proper error response in smb2_tree_connect()

[ Upstream commit cdfb2fef522d0c3f9cf293db51de88e9b3d46846 ]

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