[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240424041156.45729-1-aha310510@gmail.com>
Date: Wed, 24 Apr 2024 13:11:56 +0900
From: Jeongjun Park <aha310510@...il.com>
To: syzbot+241c815bda521982cb49@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in diFree
please test array-index-out-of-bounds in diFree
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ master
---
fs/jfs/jfs_imap.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index 2ec35889ad24..977751b30489 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -881,6 +881,11 @@ int diFree(struct inode *ip)
*/
agno = BLKTOAG(JFS_IP(ip)->agstart, JFS_SBI(ip->i_sb));
+ if(agno >= MAXAG){
+ jfs_error(ip->i_sb, "invalid array index (agno >= MAXAG), agno = %d\n", agno);
+ return -ENOMEM;
+ }
+
/* Lock the AG specific inode map information
*/
AG_LOCK(imap, agno);
--
2.34.1
Powered by blists - more mailing lists