[syzbot] [jfs?] UBSAN: shift-out-of-bounds in dbUpdatePMap (2)

From: syzbot
Date: Thu Jun 15 2023 - 19:03:24 EST


Hello,

syzbot found the following issue on:

HEAD commit: 4c605260bc60 Merge tag 'x86_urgent_for_v6.4_rc6' of git://..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=170c95b3280000
kernel config: https://syzkaller.appspot.com/x/.config?x=7474de833c217bf4
dashboard link: https://syzkaller.appspot.com/bug?extid=91ad2b52815a08caf4ea
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16bc032d280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14aa25b3280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b8183c640f8a/disk-4c605260.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/66b85f02d905/vmlinux-4c605260.xz
kernel image: https://storage.googleapis.com/syzbot-assets/80073dbaded3/bzImage-4c605260.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/85d11f73be8a/mount_0.gz

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

================================================================================
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:470:12
shift exponent 131072 is too large for 64-bit type 'long long'
CPU: 0 PID: 106 Comm: jfsCommit Not tainted 6.4.0-rc5-syzkaller-00313-g4c605260bc60 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
ubsan_epilogue lib/ubsan.c:217 [inline]
__ubsan_handle_shift_out_of_bounds+0x3c3/0x420 lib/ubsan.c:387
dbUpdatePMap+0xe4e/0xf50 fs/jfs/jfs_dmap.c:470
txAllocPMap+0x57b/0x6b0 fs/jfs/jfs_txnmgr.c:2420
txUpdateMap+0x7cc/0x9e0 fs/jfs/jfs_txnmgr.c:2358
txLazyCommit fs/jfs/jfs_txnmgr.c:2659 [inline]
jfs_lazycommit+0x47a/0xb70 fs/jfs/jfs_txnmgr.c:2727
kthread+0x2b8/0x350 kernel/kthread.c:379
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</TASK>
================================================================================
Kernel panic - not syncing: UBSAN: panic_on_warn set ...
CPU: 0 PID: 106 Comm: jfsCommit Not tainted 6.4.0-rc5-syzkaller-00313-g4c605260bc60 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
panic+0x30f/0x770 kernel/panic.c:340
check_panic_on_warn+0x82/0xa0 kernel/panic.c:236
ubsan_epilogue lib/ubsan.c:223 [inline]
__ubsan_handle_shift_out_of_bounds+0x3e2/0x420 lib/ubsan.c:387
dbUpdatePMap+0xe4e/0xf50 fs/jfs/jfs_dmap.c:470
txAllocPMap+0x57b/0x6b0 fs/jfs/jfs_txnmgr.c:2420
txUpdateMap+0x7cc/0x9e0 fs/jfs/jfs_txnmgr.c:2358
txLazyCommit fs/jfs/jfs_txnmgr.c:2659 [inline]
jfs_lazycommit+0x47a/0xb70 fs/jfs/jfs_txnmgr.c:2727
kthread+0x2b8/0x350 kernel/kthread.c:379
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</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.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup