[syzbot] UBSAN: shift-out-of-bounds in dbUpdatePMap

From: syzbot
Date: Sat Oct 01 2022 - 09:37:12 EST


Hello,

syzbot found the following issue on:

HEAD commit: 49c13ed0316d Merge tag 'soc-fixes-6.0-rc7' of git://git.ke..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=146eade4880000
kernel config: https://syzkaller.appspot.com/x/.config?x=ba0d23aa7e1ffaf5
dashboard link: https://syzkaller.appspot.com/bug?extid=9a9e47d79d7201c7b73e
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=120912e0880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=124eb2e0880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/418654aab051/disk-49c13ed0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/49c501fc7ae3/vmlinux-49c13ed0.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+9a9e47d79d7201c7b73e@xxxxxxxxxxxxxxxxxxxxxxxxx

================================================================================
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:454:12
shift exponent 4096 is too large for 64-bit type 'long long'
CPU: 0 PID: 122 Comm: jfsCommit Not tainted 6.0.0-rc7-syzkaller-00068-g49c13ed0316d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_shift_out_of_bounds+0x33d/0x3b0 lib/ubsan.c:322
dbUpdatePMap+0xdf5/0xef0 fs/jfs/jfs_dmap.c:454
txAllocPMap+0x581/0x6c0 fs/jfs/jfs_txnmgr.c:2420
txUpdateMap+0x883/0xaa0 fs/jfs/jfs_txnmgr.c:2358
txLazyCommit fs/jfs/jfs_txnmgr.c:2659 [inline]
jfs_lazycommit+0x433/0xba0 fs/jfs/jfs_txnmgr.c:2727
kthread+0x266/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
================================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 122 Comm: jfsCommit Not tainted 6.0.0-rc7-syzkaller-00068-g49c13ed0316d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106
panic+0x2d6/0x715 kernel/panic.c:274
ubsan_epilogue lib/ubsan.c:158 [inline]
__ubsan_handle_shift_out_of_bounds+0x3af/0x3b0 lib/ubsan.c:322
dbUpdatePMap+0xdf5/0xef0 fs/jfs/jfs_dmap.c:454
txAllocPMap+0x581/0x6c0 fs/jfs/jfs_txnmgr.c:2420
txUpdateMap+0x883/0xaa0 fs/jfs/jfs_txnmgr.c:2358
txLazyCommit fs/jfs/jfs_txnmgr.c:2659 [inline]
jfs_lazycommit+0x433/0xba0 fs/jfs/jfs_txnmgr.c:2727
kthread+0x266/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches