syzbot


UBSAN: shift-out-of-bounds in diFree

Status: upstream: reported C repro on 2022/10/01 13:36
Reported-by: syzbot+b4c57cb06cb5a53b7b06@syzkaller.appspotmail.com
First crash: 58d, last: 22h56m

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: UBSAN: shift-out-of-bounds in diFree (log)
Repro: C syz .config
Patch testing requests:
Created Duration User Patch Repo Result
2022/10/04 10:43 7m mudongliangabcd@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git -- error

Sample crash report:
ERROR: (device loop0): xtTruncate_pmap: XT_GETPAGE: xtree page corrupt
ERROR: (device loop0): remounting filesystem as read-only
ERROR: (device loop0): txAbort: 
ERROR: (device loop0): xtTruncate: XT_GETPAGE: xtree page corrupt
================================================================================
UBSAN: shift-out-of-bounds in fs/jfs/jfs_imap.c:881:9
shift exponent 8205 is too large for 64-bit type 'long long unsigned int'
CPU: 0 PID: 3614 Comm: syz-executor393 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+0xcd/0x134 lib/dump_stack.c:106
 ubsan_epilogue+0xb/0x50 lib/ubsan.c:151
 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x187 lib/ubsan.c:322
 diFree.cold+0x17/0x68 fs/jfs/jfs_imap.c:881
 jfs_evict_inode+0x3c1/0x4a0 fs/jfs/inode.c:156
 evict+0x2ed/0x6b0 fs/inode.c:665
 iput_final fs/inode.c:1748 [inline]
 iput.part.0+0x55d/0x810 fs/inode.c:1774
 iput+0x58/0x70 fs/inode.c:1764
 dentry_unlink_inode+0x2b1/0x460 fs/dcache.c:401
 __dentry_kill+0x3c0/0x640 fs/dcache.c:607
 shrink_dentry_list+0x23c/0x800 fs/dcache.c:1201
 shrink_dcache_parent+0x1fe/0x3c0 fs/dcache.c:1628
 do_one_tree fs/dcache.c:1682 [inline]
 shrink_dcache_for_umount+0x71/0x330 fs/dcache.c:1699
 generic_shutdown_super+0x68/0x400 fs/super.c:473
 kill_block_super+0x97/0xf0 fs/super.c:1427
 deactivate_locked_super+0x94/0x160 fs/super.c:332
 deactivate_super+0xad/0xd0 fs/super.c:363
 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1186
 task_work_run+0xdd/0x1a0 kernel/task_work.c:177
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0xad5/0x29b0 kernel/exit.c:795
 do_group_exit+0xd2/0x2f0 kernel/exit.c:925
 __do_sys_exit_group kernel/exit.c:936 [inline]
 __se_sys_exit_group kernel/exit.c:934 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:934
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f72b3c35579
Code: Unable to access opcode bytes at RIP 0x7f72b3c3554f.
RSP: 002b:00007fff12fe7c88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f72b3cb8330 RCX: 00007f72b3c35579
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 0000000000000001 R08: ffffffffffffffc0 R09: 0000000000000000
R10: 0000555556c4c2c0 R11: 0000000000000246 R12: 00007f72b3cb8330
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
 </TASK>
================================================================================

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/11/26 03:23 upstream 644e9524388a e2556bc3 .config log report syz C
* Struck through repros no longer work on HEAD.
Crashes (7):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/09/29 02:37 upstream 49c13ed0316d e2556bc3 .config log report syz C UBSAN: shift-out-of-bounds in diFree
ci2-upstream-fs 2022/10/27 03:02 upstream 4dc12f37a8e9 86777b7f .config log report info UBSAN: shift-out-of-bounds in diFree
ci2-upstream-fs 2022/10/20 11:06 upstream 493ffd6605b2 b31320fc .config log report info UBSAN: shift-out-of-bounds in diFree
ci2-upstream-fs 2022/10/19 16:15 upstream 493ffd6605b2 b31320fc .config log report info UBSAN: shift-out-of-bounds in diFree
ci2-upstream-fs 2022/10/11 04:43 upstream 493ffd6605b2 5bcf0c31 .config log report info UBSAN: shift-out-of-bounds in diFree
ci2-upstream-fs 2022/10/01 03:54 upstream 70575e77839f feb56351 .config log report info UBSAN: shift-out-of-bounds in diFree
ci-upstream-linux-next-kasan-gce-root 2022/10/16 19:23 linux-next aaa11ce2ffc8 67cb024c .config log report info UBSAN: shift-out-of-bounds in diFree
* Struck through repros no longer work on HEAD.