Skip to content

Commit 3ac00a2

Browse files
namjaejeonsmfrench
authored andcommitted
ksmbd: fix NULL pointer dereference in smb2_get_info_filesystem()
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>
1 parent 6d7cb54 commit 3ac00a2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

fs/ksmbd/smb2pdu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4885,6 +4885,9 @@ static int smb2_get_info_filesystem(struct ksmbd_work *work,
48854885
int rc = 0, len;
48864886
int fs_infoclass_size = 0;
48874887

4888+
if (!share->path)
4889+
return -EIO;
4890+
48884891
rc = kern_path(share->path, LOOKUP_NO_SYMLINKS, &path);
48894892
if (rc) {
48904893
pr_err("cannot create vfs path\n");

0 commit comments

Comments
 (0)