VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Namjae Jeon <linkinjeon@kernel.org> 2023-05-03 08:38:33 +0900 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-05-11 23:03:04 +0900 commit: a70751dd7b60eab025e97e19b6b2477c6eaf2bbb parent: b80422474ffe44cb5e813cd6da1f1c6bc50fd9d2
Commit Summary:
ksmbd: fix NULL pointer dereference in smb2_get_info_filesystem()
Diffstat:
1 file changed, 3 insertions, 0 deletions
diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index 0cfa089a4308..8da7be8e45c9 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -4913,6 +4913,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");