lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZxeT5ig2gOAUC7V4@fedora>
Date: Tue, 22 Oct 2024 20:00:38 +0800
From: Qianqiang Liu <qianqiang.liu@....com>
To: Andreas Gruenbacher <agruenba@...hat.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
	Steven Whitehouse <swhiteho@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-next@...r.kernel.org
Subject: [PATCH v2] KMSAN: uninit-value in inode_go_dump (5)

When mounting of a corrupted disk image fails, the error message printed
can reference uninitialized inode fields.  To prevent that from happening,
always initialize those fields.

Signed-off-by: Qianqiang Liu <qianqiang.liu@....com>
Reported-by: syzbot+aa0730b0a42646eb1359@...kaller.appspotmail.com
Signed-off-by: Andreas Gruenbacher <agruenba@...hat.com>
---
 Changes since v1:
 - Add Signed-off-by tag
---
 fs/gfs2/super.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 23e3a85ab7ef..aadb83e38c17 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1553,11 +1553,13 @@ static struct inode *gfs2_alloc_inode(struct super_block *sb)
 	if (!ip)
 		return NULL;
 	ip->i_no_addr = 0;
+	ip->i_no_formal_ino = 0;
 	ip->i_flags = 0;
 	ip->i_gl = NULL;
 	gfs2_holder_mark_uninitialized(&ip->i_iopen_gh);
 	memset(&ip->i_res, 0, sizeof(ip->i_res));
 	RB_CLEAR_NODE(&ip->i_res.rs_node);
+	ip->i_diskflags = 0;
 	ip->i_rahead = 0;
 	return &ip->i_inode;
 }
-- 
2.47.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ