syzbot


UBSAN: shift-out-of-bounds in ext4_handle_clustersize (2)

Status: fixed on 2024/02/02 11:15
Subsystems: ext4
[Documentation on labels]
Fix commit: 6f861765464f fs: Block writes to mounted block devices
First crash: 125d, last: 121d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit 6f861765464f43a71462d52026fbddfc858239a5
Author: Jan Kara <jack@suse.cz>
Date: Wed Nov 1 17:43:10 2023 +0000

  fs: Block writes to mounted block devices

  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-1 UBSAN: shift-out-of-bounds in ext4_handle_clustersize origin:upstream C error 1 6d08h 124d 0/2 upstream: reported C repro on 2023/12/24 13:33
upstream UBSAN: shift-out-of-bounds in ext4_handle_clustersize ext4 2 293d 309d 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/10 16:19 48m retest repro upstream OK log

Sample crash report:
loop0: detected capacity change from 0 to 512
================================================================================
UBSAN: shift-out-of-bounds in fs/ext4/super.c:4424:27
shift exponent 59 is too large for 32-bit type 'int'
CPU: 0 PID: 5168 Comm: syz-executor311 Not tainted 6.7.0-rc6-syzkaller-00248-g5254c0cbc92d #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+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
 ext4_handle_clustersize+0x592/0x5c0 fs/ext4/super.c:4424
 __ext4_fill_super fs/ext4/super.c:5302 [inline]
 ext4_fill_super+0x3b37/0x6d90 fs/ext4/super.c:5712
 get_tree_bdev+0x416/0x5b0 fs/super.c:1598
 vfs_get_tree+0x8c/0x2a0 fs/super.c:1771
 do_new_mount+0x28f/0xae0 fs/namespace.c:3337
 do_mount fs/namespace.c:3677 [inline]
 __do_sys_mount fs/namespace.c:3886 [inline]
 __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3863
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f4227ebeb9a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 3e 07 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:00007f4227e71fd8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007f4227ebeb9a
RDX: 0000000020000040 RSI: 0000000020000080 RDI: 00007f4227e71ff0
RBP: 00007f4227e71ff0 R08: 00007f4227e72030 R09: 00000000000004d6
R10: 0000000000004500 R11: 0000000000000206 R12: 00007f4227e72030
R13: 0000000000004500 R14: 0000000000000003 R15: 0000000000040000
 </TASK>
================================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/23 18:36 upstream 5254c0cbc92d fb427a07 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs UBSAN: shift-out-of-bounds in ext4_handle_clustersize
2023/12/27 13:21 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: shift-out-of-bounds in ext4_handle_clustersize
2023/12/23 18:06 upstream 5254c0cbc92d fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: shift-out-of-bounds in ext4_handle_clustersize
* Struck through repros no longer work on HEAD.