ksmbd: fix uninitialized pointer read in smb2_create_link()
authorNamjae Jeon <linkinjeon@kernel.org>
Sun, 14 May 2023 01:02:27 +0000 (10:02 +0900)
committerSteve French <stfrench@microsoft.com>
Sat, 27 May 2023 01:27:46 +0000 (20:27 -0500)
commitdf14afeed2e6c1bbadef7d2f9c46887bbd6d8d94
tree497780355af0efa37554a3ef6e89399d4c508884
parent48b47f0caaa8a9f05ed803cb4f335fa3a7bfc622
ksmbd: fix uninitialized pointer read in smb2_create_link()

There is a case that file_present is true and path is uninitialized.
This patch change file_present is set to false by default and set to
true when patch is initialized.

Fixes: 74d7970febf7 ("ksmbd: fix racy issue from using ->d_parent and ->d_name")
Reported-by: Coverity Scan <scan-admin@coverity.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/smb2pdu.c