mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
ksmbd: fix NULL pointer dereference in smb2_get_info_filesystem()
commit 3ac00a2ab6
upstream.
If share is , share->path is NULL and it cause NULL pointer
dereference issue.
Cc: stable@vger.kernel.org
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20479
Signed-off-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:
parent
d417450501
commit
b35f6c031b
1 changed files with 3 additions and 0 deletions
|
@ -4915,6 +4915,9 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,
|
|||
int rc = 0, len;
|
||||
int fs_infoclass_size = 0;
|
||||
|
||||
if (!share->path)
|
||||
return -EIO;
|
||||
|
||||
rc = kern_path(share->path, LOOKUP_NO_SYMLINKS, &path);
|
||||
if (rc) {
|
||||
pr_err("cannot create vfs path\n");
|
||||
|
|
Loading…
Reference in a new issue