mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
ksmbd: fix error code overwriting in smb2_get_info_filesystem()
commit88daf2f448upstream. If client doesn't negotiate with SMB3.1.1 POSIX Extensions, then proper error code won't be returned due to overwriting. Return error immediately. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes:e2f34481b2("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Signed-off-by: Matvey Kovalev <matvey.kovalev@ispras.ru> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7eca645917
commit
c6b15a82a5
@@ -5596,7 +5596,8 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,
|
||||
|
||||
if (!work->tcon->posix_extensions) {
|
||||
pr_err("client doesn't negotiate with SMB3.1.1 POSIX Extensions\n");
|
||||
rc = -EOPNOTSUPP;
|
||||
path_put(&path);
|
||||
return -EOPNOTSUPP;
|
||||
} else {
|
||||
info = (struct filesystem_posix_info *)(rsp->Buffer);
|
||||
info->OptimalTransferSize = cpu_to_le32(stfs.f_bsize);
|
||||
|
||||
Reference in New Issue
Block a user