jfs: add a check to prevent array-index-out-of-bounds in dbAdjTree
[ Upstream commit a174706b ] When the value of lp is 0 at the beginning of the for loop, it will become negative in the next assignment and we should bail out. Reported-by:<syzbot+412dea214d8baa3f7483@syzkaller.appspotmail.com> Closes: https://syzkaller.appspot.com/bug?extid=412dea214d8baa3f7483 Tested-by:
<syzbot+412dea214d8baa3f7483@syzkaller.appspotmail.com> Signed-off-by:
Nihar Chaithanya <niharchaithanya@gmail.com> Signed-off-by:
Dave Kleikamp <dave.kleikamp@oracle.com> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading