syzbot


UBSAN: shift-out-of-bounds in minix_statfs

Status: upstream: reported C repro on 2024/11/09 11:46
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+e8422ab0c2a90434ef95@syzkaller.appspotmail.com
First crash: 375d, last: 18d
Fix bisection: failed (error log, bisect log)
  
Bug presence (1)
Date Name Commit Repro Result
2024/11/15 upstream (ToT) cfaaa7d010d1 C [report] UBSAN: shift-out-of-bounds in minix_statfs
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 UBSAN: shift-out-of-bounds in minix_statfs origin:lts-only -1 C done 4 4d21h 93d 0/3 upstream: reported C repro on 2025/08/18 07:52
upstream UBSAN: shift-out-of-bounds in minix_statfs fs -1 C inconclusive error 71 26m 1437d 0/29 upstream: reported C repro on 2021/12/13 07:17
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2025/03/01 16:22 1h30m bisect fix linux-6.1.y error job log
2025/01/28 16:04 2h12m bisect fix linux-6.1.y OK (0) job log log
2024/12/22 15:44 2h33m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
================================================================================
UBSAN: shift-out-of-bounds in fs/minix/inode.c:380:57
shift exponent 1024 is too large for 64-bit type 'unsigned long'
CPU: 1 PID: 4554 Comm: syz.0.29 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106
 dump_stack+0x1c/0x5c lib/dump_stack.c:113
 ubsan_epilogue+0x14/0x48 lib/ubsan.c:151
 __ubsan_handle_shift_out_of_bounds+0x2b0/0x34c lib/ubsan.c:321
 minix_statfs+0x2c0/0x2ec fs/minix/inode.c:380
 statfs_by_dentry fs/statfs.c:66 [inline]
 vfs_statfs+0x13c/0x2b0 fs/statfs.c:90
 ovl_check_namelen fs/overlayfs/super.c:921 [inline]
 ovl_lower_dir fs/overlayfs/super.c:941 [inline]
 ovl_get_lowerstack+0x1a0/0x175c fs/overlayfs/super.c:1837
 ovl_fill_super+0x1214/0x2294 fs/overlayfs/super.c:2105
 mount_nodev+0x68/0x104 fs/super.c:1489
 ovl_mount+0x3c/0x50 fs/overlayfs/super.c:2186
 legacy_get_tree+0xd4/0x16c fs/fs_context.c:632
 vfs_get_tree+0x90/0x274 fs/super.c:1573
 do_new_mount+0x228/0x810 fs/namespace.c:3078
 path_mount+0x5b4/0xe78 fs/namespace.c:3408
 do_mount fs/namespace.c:3421 [inline]
 __do_sys_mount fs/namespace.c:3629 [inline]
 __se_sys_mount fs/namespace.c:3606 [inline]
 __arm64_sys_mount+0x49c/0x584 fs/namespace.c:3606
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
================================================================================
================================================================================
UBSAN: shift-out-of-bounds in fs/minix/bitmap.c:103:3
shift exponent 1024 is too large for 32-bit type '__u32' (aka 'unsigned int')
CPU: 1 PID: 4554 Comm: syz.0.29 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106
 dump_stack+0x1c/0x5c lib/dump_stack.c:113
 ubsan_epilogue+0x14/0x48 lib/ubsan.c:151
 __ubsan_handle_shift_out_of_bounds+0x2b0/0x34c lib/ubsan.c:321
 minix_count_free_blocks+0x234/0x238 fs/minix/bitmap.c:103
 minix_statfs+0x19c/0x2ec fs/minix/inode.c:381
 statfs_by_dentry fs/statfs.c:66 [inline]
 vfs_statfs+0x13c/0x2b0 fs/statfs.c:90
 ovl_check_namelen fs/overlayfs/super.c:921 [inline]
 ovl_lower_dir fs/overlayfs/super.c:941 [inline]
 ovl_get_lowerstack+0x1a0/0x175c fs/overlayfs/super.c:1837
 ovl_fill_super+0x1214/0x2294 fs/overlayfs/super.c:2105
 mount_nodev+0x68/0x104 fs/super.c:1489
 ovl_mount+0x3c/0x50 fs/overlayfs/super.c:2186
 legacy_get_tree+0xd4/0x16c fs/fs_context.c:632
 vfs_get_tree+0x90/0x274 fs/super.c:1573
 do_new_mount+0x228/0x810 fs/namespace.c:3078
 path_mount+0x5b4/0xe78 fs/namespace.c:3408
 do_mount fs/namespace.c:3421 [inline]
 __do_sys_mount fs/namespace.c:3629 [inline]
 __se_sys_mount fs/namespace.c:3606 [inline]
 __arm64_sys_mount+0x49c/0x584 fs/namespace.c:3606
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
================================================================================
overlayfs: fs on '.' does not support file handles, falling back to index=off,nfs_export=off.

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/01 01:56 linux-6.1.y f6e38ae624cf 2c50b6a9 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan-arm64 UBSAN: shift-out-of-bounds in minix_statfs
2024/11/09 14:12 linux-6.1.y d7039b844a1c 6b856513 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 UBSAN: shift-out-of-bounds in minix_statfs
2024/11/09 13:23 linux-6.1.y d7039b844a1c 6b856513 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 UBSAN: shift-out-of-bounds in minix_statfs
2024/11/09 12:35 linux-6.1.y d7039b844a1c 6b856513 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 UBSAN: shift-out-of-bounds in minix_statfs
2025/11/01 00:57 linux-6.1.y f6e38ae624cf 2c50b6a9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 UBSAN: shift-out-of-bounds in minix_statfs
2024/11/09 11:45 linux-6.1.y d7039b844a1c 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 UBSAN: shift-out-of-bounds in minix_statfs
* Struck through repros no longer work on HEAD.