[PATCH] hfs: Fix uninitialized value issue in hfs_iget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix uninitialized value issue in hfs_iget by initializing the hfs_cat_rec 
structure in hfs_lookup.

Reported-by: syzbot+18dd03a3fcf0ffe27da0@xxxxxxxxxxxxxxxxxxxxxxxxx
Closes: https://syzkaller.appspot.com/bug?extid=18dd03a3fcf0ffe27da0
Tested-by: syzbot+18dd03a3fcf0ffe27da0@xxxxxxxxxxxxxxxxxxxxxxxxx
Signed-off-by: SurajSonawane2415 <surajsonawane0215@xxxxxxxxx>
---
 fs/hfs/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c
index b75c26045df4..3b880b3e4b4c 100644
--- a/fs/hfs/dir.c
+++ b/fs/hfs/dir.c
@@ -20,7 +20,7 @@
 static struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry,
 				 unsigned int flags)
 {
-	hfs_cat_rec rec;
+	hfs_cat_rec rec = {0};
 	struct hfs_find_data fd;
 	struct inode *inode = NULL;
 	int res;
-- 
2.34.1





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux