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: 11d, last: 11d
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 (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream UBSAN: shift-out-of-bounds in minix_statfs fs C inconclusive error 53 9d03h 1074d 0/28 upstream: reported C repro on 2021/12/13 07:17

Sample crash report:
         option from the mount to silence this warning.
=======================================================
================================================================================
UBSAN: shift-out-of-bounds in fs/minix/inode.c:380:57
shift exponent 22784 is too large for 64-bit type 'unsigned long'
CPU: 0 PID: 4290 Comm: syz-executor286 Not tainted 6.1.116-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x58 lib/dump_stack.c:113
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_shift_out_of_bounds+0x2f4/0x36c lib/ubsan.c:321
 minix_statfs+0x2f0/0x2f4 fs/minix/inode.c:380
 statfs_by_dentry fs/statfs.c:66 [inline]
 vfs_get_fsid+0x17c/0x268 fs/statfs.c:77
 fanotify_test_fsid+0xa4/0x2e4 fs/notify/fanotify/fanotify_user.c:1516
 do_fanotify_mark+0x6a8/0xb64 fs/notify/fanotify/fanotify_user.c:1763
 __do_sys_fanotify_mark fs/notify/fanotify/fanotify_user.c:1840 [inline]
 __se_sys_fanotify_mark fs/notify/fanotify/fanotify_user.c:1836 [inline]
 __arm64_sys_fanotify_mark+0xb8/0xd4 fs/notify/fanotify/fanotify_user.c:1836
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x168 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 22784 is too large for 32-bit type '__u32' (aka 'unsigned int')
CPU: 1 PID: 4290 Comm: syz-executor286 Not tainted 6.1.116-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x58 lib/dump_stack.c:113
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_shift_out_of_bounds+0x2f4/0x36c lib/ubsan.c:321
 minix_count_free_blocks+0x228/0x22c fs/minix/bitmap.c:103
 minix_statfs+0x19c/0x2f4 fs/minix/inode.c:381
 statfs_by_dentry fs/statfs.c:66 [inline]
 vfs_get_fsid+0x17c/0x268 fs/statfs.c:77
 fanotify_test_fsid+0xa4/0x2e4 fs/notify/fanotify/fanotify_user.c:1516
 do_fanotify_mark+0x6a8/0xb64 fs/notify/fanotify/fanotify_user.c:1763
 __do_sys_fanotify_mark fs/notify/fanotify/fanotify_user.c:1840 [inline]
 __se_sys_fanotify_mark fs/notify/fanotify/fanotify_user.c:1836 [inline]
 __arm64_sys_fanotify_mark+0xb8/0xd4 fs/notify/fanotify/fanotify_user.c:1836
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x168 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
================================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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
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.