jfs: fix array-index-out-of-bounds in diAlloc
authorManas Ghandat <ghandatmanas@gmail.com>
Wed, 4 Oct 2023 07:40:40 +0000 (13:10 +0530)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Wed, 4 Oct 2023 14:18:03 +0000 (09:18 -0500)
commit05d9ea1ceb62a55af6727a69269a4fd310edf483
tree7ddef40066c70bc93e0d0acf214df04b56e1d859
parent22cad8bc1d36547cdae0eef316c47d917ce3147c
jfs: fix array-index-out-of-bounds in diAlloc

Currently there is not check against the agno of the iag while
allocating new inodes to avoid fragmentation problem. Added the check
which is required.

Reported-by: syzbot+79d792676d8ac050949f@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=79d792676d8ac050949f
Signed-off-by: Manas Ghandat <ghandatmanas@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
fs/jfs/jfs_imap.c