diff options
author | Juntong Deng <[email protected]> | 2023-10-02 17:56:58 +0800 |
---|---|---|
committer | Dave Kleikamp <[email protected]> | 2023-10-03 18:26:59 -0500 |
commit | 525b861a008143048535011f3816d407940f4bfa (patch) | |
tree | c31a9cf4a97ab842d6fd3e19c4a746f133b9fff9 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 5e62ed3b1c8a397185af53d6b94f04b9ff21ec7d (diff) |
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: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=debee9ab7ae2b34b0307
Signed-off-by: Juntong Deng <[email protected]>
Signed-off-by: Dave Kleikamp <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions