[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241112.231215.1262254749077533950.konishi.ryusuke@gmail.com>
Date: Tue, 12 Nov 2024 23:12:15 +0900 (JST)
From: Ryusuke Konishi <konishi.ryusuke@...il.com>
To: syzbot+96d5d14c47d97015c624@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org, linux-nilfs@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [nilfs?] KASAN: use-after-free Read in
nilfs_find_entry
Test fix for local variable type in nilfs_last_byte()
#syz test
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index a8602729586a..6bc8f474a3e5 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -70,7 +70,7 @@ static inline unsigned int nilfs_chunk_size(struct inode *inode)
*/
static unsigned int nilfs_last_byte(struct inode *inode, unsigned long page_nr)
{
- unsigned int last_byte = inode->i_size;
+ loff_t last_byte = inode->i_size;
last_byte -= page_nr << PAGE_SHIFT;
if (last_byte > PAGE_SIZE)
Powered by blists - more mailing lists