Juntong Deng 525b861a00 fs/jfs: Add check for negative db_l2nbperpage
l2nbperpage is log2(number of blks per page), and the minimum legal
value should be 0, not negative.

In the case of l2nbperpage being negative, an error will occur
when subsequently used as shift exponent.

Syzbot reported this bug:

UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:799:12
shift exponent -16777216 is negative

Reported-by: syzbot+debee9ab7ae2b34b0307@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=debee9ab7ae2b34b0307
Signed-off-by: Juntong Deng <juntong.deng@outlook.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
2023-10-03 18:26:59 -05:00
..
2023-07-24 10:30:01 +02:00
2022-04-25 14:00:33 -05:00
2023-08-31 15:25:01 -07:00
2022-04-25 14:00:33 -05:00
2023-08-31 15:25:01 -07:00
2021-10-18 14:43:23 -06:00