projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d7cb54
)
ksmbd: fix NULL pointer dereference in smb2_get_info_filesystem()
author
Namjae Jeon
<linkinjeon@kernel.org>
Tue, 2 May 2023 23:38:33 +0000
(08:38 +0900)
committer
Steve French
<stfrench@microsoft.com>
Thu, 4 May 2023 04:03:01 +0000
(23:03 -0500)
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>
fs/ksmbd/smb2pdu.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ksmbd/smb2pdu.c
b/fs/ksmbd/smb2pdu.c
index 1d3931994a5d5a53f72f36c93f6a0160d223e890..b5f1a2a7389dca2bf6354bba31dd52df07a09c9c 100644
(file)
--- a/
fs/ksmbd/smb2pdu.c
+++ b/
fs/ksmbd/smb2pdu.c
@@
-4885,6
+4885,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");