[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <000000000000c5e490061ea9b10f@google.com>
Date: Thu, 01 Aug 2024 19:00:41 -0700
From: syzbot <syzbot+24ac24ff58dc5b0d26b9@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [squashfs?] KMSAN: uninit-value in pick_link
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: Re: [syzbot] [squashfs?] KMSAN: uninit-value in pick_link
Author: lizhi.xu@...driver.com
when i_size in read_inode, check it
#syz test: upstream 2f8c4f506285
diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c
index 16bd693d0b3a..6c5dd225482f 100644
--- a/fs/squashfs/inode.c
+++ b/fs/squashfs/inode.c
@@ -287,6 +287,11 @@ int squashfs_read_inode(struct inode *inode, long long ino)
inode->i_mode |= S_IFLNK;
squashfs_i(inode)->start = block;
squashfs_i(inode)->offset = offset;
+ if ((int)inode->i_size < 0) {
+ ERROR("Wrong i_size %d!\n", inode->i_size);
+ return -EINVAL;
+ }
+
if (type == SQUASHFS_LSYMLINK_TYPE) {
__le32 xattr;
--
2.43.0
Powered by blists - more mailing lists