syzbot


UBSAN: shift-out-of-bounds in dbFree

Status: fixed on 2023/10/12 12:47
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+d2cd27dcf8e04b232eb2@syzkaller.appspotmail.com
Fix commit: 11509910c599 jfs: jfs_dmap: Validate db_l2nbperpage while mounting
First crash: 435d, last: 366d
Cause bisection: failed (error log, bisect log)
  
Discussions (6)
Title Replies (including bot) Last reply
[PATCH] fs: jfs: fixed UBSAN: shift-out-of-bounds in dbFree 2 (2) 2023/06/20 20:24
[PATCH v3] jfs: jfs_dmap: Validate db_l2nbperpage while mounting 2 (2) 2023/06/20 17:43
[PATCH v2] jfs: jfs_dmap: Validate db_l2nbperpage while mounting 2 (2) 2023/06/20 16:41
[PATCH] jfs: jfs_dmap: Validate db_l2nbperpage while mounting 3 (3) 2023/06/19 12:02
[PATCH] fs: jfs: fixed UBSAN: shift-out-of-bounds in dbFree 2 (2) 2023/04/07 20:47
[syzbot] [jfs?] UBSAN: shift-out-of-bounds in dbFree 0 (1) 2023/03/20 19:28
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 UBSAN: shift-out-of-bounds in dbFree origin:upstream C done 1 329d 391d 3/3 fixed on 2023/09/19 11:28
linux-6.1 UBSAN: shift-out-of-bounds in dbFree origin:upstream C done 1 325d 389d 3/3 fixed on 2023/09/23 10:26
Last patch testing requests (4)
Created Duration User Patch Repo Result
2023/06/19 12:33 25m code@siddh.me patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2023/06/05 10:32 48m code@siddh.me patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2023/04/14 11:43 31m anupnewsmail@gmail.com patch upstream OK log
2023/04/07 12:22 31m anupnewsmail@gmail.com patch upstream OK log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/05/25 11:27 48m bisect fix upstream job log (0) log
2023/04/16 05:46 45m bisect fix upstream job log (0) log

Sample crash report:
         option from the mount to silence this warning.
=======================================================
find_entry called with index = 0
read_mapping_page failed!
ERROR: (device loop0): txCommit: 
ERROR: (device loop0): remounting filesystem as read-only
================================================================================
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:381:12
shift exponent 134217736 is too large for 64-bit type 'long long'
CPU: 1 PID: 5068 Comm: syz-executor350 Not tainted 6.3.0-rc2-syzkaller-00069-g0ddc84d2dd43 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/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
 dbFree+0x46e/0x650 fs/jfs/jfs_dmap.c:381
 txFreeMap+0x96a/0xd50 fs/jfs/jfs_txnmgr.c:2510
 xtTruncate+0xe5c/0x3260 fs/jfs/jfs_xtree.c:2467
 jfs_free_zero_link+0x46e/0x6e0 fs/jfs/namei.c:758
 jfs_evict_inode+0x35f/0x440 fs/jfs/inode.c:153
 evict+0x2a4/0x620 fs/inode.c:665
 __dentry_kill+0x436/0x650 fs/dcache.c:607
 shrink_dentry_list+0x39c/0x6a0 fs/dcache.c:1201
 shrink_dcache_parent+0xcd/0x480
 do_one_tree+0x23/0xe0 fs/dcache.c:1682
 shrink_dcache_for_umount+0x7d/0x120 fs/dcache.c:1699
 generic_shutdown_super+0x67/0x340 fs/super.c:472
 kill_block_super+0x7e/0xe0 fs/super.c:1398
 deactivate_locked_super+0xa4/0x110 fs/super.c:331
 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1177
 task_work_run+0x24a/0x300 kernel/task_work.c:179
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0x68f/0x2290 kernel/exit.c:869
 do_group_exit+0x206/0x2c0 kernel/exit.c:1019
 __do_sys_exit_group kernel/exit.c:1030 [inline]
 __se_sys_exit_group kernel/exit.c:1028 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1028
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fa87e2289b9
Code: Unable to access opcode bytes at 0x7fa87e22898f.
RSP: 002b:00007fff4bfe3938 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007fa87e2a3330 RCX: 00007fa87e2289b9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 0000000000000001 R08: ffffffffffffffc0 R09: 00007fa87e29de40
R10: 00007fff4bfe3850 R11: 0000000000000246 R12: 00007fa87e2a3330
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
 </TASK>
================================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/16 22:57 upstream 0ddc84d2dd43 18b58603 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs UBSAN: shift-out-of-bounds in dbFree
2023/03/16 19:40 linux-next 6f72958a49f6 18b58603 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in dbFree
2023/03/16 19:16 linux-next 6f72958a49f6 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in dbFree
* Struck through repros no longer work on HEAD.