ksmbd: fix uninitialized pointer read in ksmbd_vfs_rename()
authorNamjae Jeon <linkinjeon@kernel.org>
Fri, 12 May 2023 08:05:41 +0000 (17:05 +0900)
committerSteve French <stfrench@microsoft.com>
Sat, 27 May 2023 01:27:46 +0000 (20:27 -0500)
commit48b47f0caaa8a9f05ed803cb4f335fa3a7bfc622
tree4a4fb2965d22021146ac38b26771e1c520090117
parent0d85b27b0cc6b5cf54567c5ad913a247a71583ce
ksmbd: fix uninitialized pointer read in ksmbd_vfs_rename()

Uninitialized rd.delegated_inode can be used in vfs_rename().
Fix this by setting rd.delegated_inode to NULL to avoid the uninitialized
read.

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/vfs.c