jfs: array-index-out-of-bounds fix in dtReadFirst
authorGhanshyam Agrawal <ghanshyam1898@gmail.com>
Sat, 28 Sep 2024 08:37:22 +0000 (14:07 +0530)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Tue, 29 Oct 2024 21:13:36 +0000 (16:13 -0500)
commitca84a2c9be482836b86d780244f0357e5a778c46
tree4fe5c7e0ddf1c078e96aa27d020476c621c77655
parente42b1a9a2557aa94fee47f078633677198386a52
jfs: array-index-out-of-bounds fix in dtReadFirst

The value of stbl can be sometimes out of bounds due
to a bad filesystem. Added a check with appopriate return
of error code in that case.

Reported-by: syzbot+65fa06e29859e41a83f3@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=65fa06e29859e41a83f3
Signed-off-by: Ghanshyam Agrawal <ghanshyam1898@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
fs/jfs/jfs_dtree.c