syzbot


UBSAN: shift-out-of-bounds in ext4_handle_clustersize

Status: upstream: reported C repro on 2023/12/24 13:33
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+30f90bc7bfdd0cdba283@syzkaller.appspotmail.com
First crash: 130d, last: 12d
Cause bisection: failed (error log, bisect log)
  
Bug presence (2)
Date Name Commit Repro Result
2023/12/24 lts (merge base) 082280fe94a0 C [report] UBSAN: shift-out-of-bounds in ext4_handle_clustersize
2023/12/24 upstream (ToT) 861deac3b092 C [report] UBSAN: shift-out-of-bounds in ext4_handle_clustersize
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: shift-out-of-bounds in ext4_handle_clustersize (2) ext4 C error done 3 127d 131d 26/26 fixed on 2024/02/02 11:15
upstream UBSAN: shift-out-of-bounds in ext4_handle_clustersize ext4 2 299d 315d 0/26 auto-obsoleted due to no activity on 2023/10/16 19:25
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/01/07 13:33 12m retest repro android14-6.1 report log
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2024/04/20 21:26 1h07m bisect fix android14-6.1 job log (0) log
2024/03/19 02:00 55m bisect fix android14-6.1 job log (0) log
2024/02/17 01:23 1h01m bisect fix android14-6.1 job log (0) log

Sample crash report:
loop0: detected capacity change from 0 to 512
================================================================================
UBSAN: shift-out-of-bounds in fs/ext4/super.c:4351:27
shift exponent 59 is too large for 32-bit type 'int'
CPU: 1 PID: 338 Comm: syz-executor170 Not tainted 6.1.57-syzkaller-00065-g401a2769d990 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
 dump_stack+0x15/0x17 lib/dump_stack.c:113
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_shift_out_of_bounds+0x3e1/0x440 lib/ubsan.c:321
 ext4_handle_clustersize+0x593/0x5c0 fs/ext4/super.c:4351
 __ext4_fill_super fs/ext4/super.c:5212 [inline]
 ext4_fill_super+0x49ed/0x8460 fs/ext4/super.c:5651
 get_tree_bdev+0x440/0x680 fs/super.c:1357
 ext4_get_tree+0x1c/0x20 fs/ext4/super.c:5681
 vfs_get_tree+0x88/0x290 fs/super.c:1564
 do_new_mount+0x28b/0xad0 fs/namespace.c:3040
 path_mount+0x671/0x1070 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x2c4/0x3b0 fs/namespace.c:3568
 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff5a9578f6a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff5a9534088 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007ff5a9578f6a
RDX: 0000000020000040 RSI: 0000000020000080 RDI: 00007ff5a95340a0
RBP: 00007ff5a95340a0 R08: 00007ff5a95340e0 R09: 00000000000004d6
R10: 0000000000004500 R11: 0000000000000202 R12: 00007ff5a95340e0
R13: 0000000000004500 R14: 0000000000000003 R15: 0000000000040000
 </TASK>
================================================================================
EXT4-fs (loop0): fragment/cluster size (0) != block size (4096)

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/24 13:31 android14-6.1 401a2769d990 fb427a07 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-6-1 UBSAN: shift-out-of-bounds in ext4_handle_clustersize
* Struck through repros no longer work on HEAD.