syzbot


UBSAN: shift-out-of-bounds in ntfs_fill_super

Status: upstream: reported C repro on 2022/04/21 08:16
Reported-by: syzbot+1631f09646bc214d2e76@syzkaller.appspotmail.com
Fix commit: a3b774342fa7 fs/ntfs3: validate BOOT sectors_per_clusters
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 69d, last: 1h31m

Cause bisection: introduced by (bisect log) :
commit adf9ea89c719c1d23794e363f631e376b3ff8cbc
Author: Chao Yu <chao@kernel.org>
Date: Thu Aug 26 02:03:15 2021 +0000

  f2fs: fix unexpected ENOENT comes from f2fs_map_blocks()

Crash: BUG: sleeping function called from invalid context in lock_sock_nested (log)
Repro: C syz .config

Sample crash report:
loop0: detected capacity change from 0 to 8189
================================================================================
UBSAN: shift-out-of-bounds in fs/ntfs3/super.c:673:16
shift exponent -192 is negative
CPU: 1 PID: 3587 Comm: syz-executor611 Not tainted 5.18.0-rc3-syzkaller-00016-gb253435746d9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 ubsan_epilogue+0xb/0x50 lib/ubsan.c:151
 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x187 lib/ubsan.c:322
 ntfs_fill_super.cold+0x2bf/0x549 fs/ntfs/bitmap.c:84
 get_tree_bdev+0x440/0x760 fs/super.c:1292
 vfs_get_tree+0x89/0x2f0 fs/super.c:1497
 do_new_mount fs/namespace.c:3040 [inline]
 path_mount+0x1320/0x1fa0 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount fs/namespace.c:3568 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fb8d7bcd7ea
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdfb6d7948 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffdfb6d79a0 RCX: 00007fb8d7bcd7ea
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffdfb6d7960
RBP: 00007ffdfb6d7960 R08: 00007ffdfb6d79a0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020001b80
R13: 0000000000000003 R14: 0000000000000004 R15: 0000000000000110
 </TASK>
================================================================================

Crashes (322):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/04/21 08:37 upstream b253435746d9 d4befee1 .config log report syz C UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-smack-root 2022/06/29 05:45 upstream 941e3e791269 496a8536 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/29 05:23 upstream 941e3e791269 496a8536 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/29 03:35 upstream 941e3e791269 496a8536 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/28 23:40 upstream 941e3e791269 496a8536 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/28 20:09 upstream 941e3e791269 496a8536 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/28 11:42 upstream 03c765b0e3b4 ef82eb2c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/28 04:18 upstream 03c765b0e3b4 ef82eb2c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-smack-root 2022/06/27 19:54 upstream 941e3e791269 ef82eb2c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/27 13:04 upstream 03c765b0e3b4 a371c43c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/27 10:38 upstream 893d1eaa56e8 a371c43c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/27 03:27 upstream 03c765b0e3b4 a371c43c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/26 13:34 upstream 0840a7914caa a371c43c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/26 10:11 upstream 0840a7914caa a371c43c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/25 20:48 upstream 8c23f235a6a8 a371c43c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/25 15:54 upstream 6a0a17e6c6d1 a371c43c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/25 10:07 upstream 6a0a17e6c6d1 a371c43c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/25 03:45 upstream 6a0a17e6c6d1 a371c43c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/24 16:24 upstream 92f20ff72066 a5dbd430 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/24 10:27 upstream 92f20ff72066 a5dbd430 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/24 03:28 upstream de5c208d533a 912f5df7 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/23 15:37 upstream de5c208d533a 912f5df7 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/23 12:08 upstream 3abc3ae553c7 912f5df7 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/23 08:13 upstream 3abc3ae553c7 912f5df7 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/22 13:29 upstream ca1fdab7fd27 0fc5c330 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-smack-root 2022/06/21 23:52 upstream ca1fdab7fd27 0fc5c330 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/21 20:33 upstream 78ca55889a54 0fc5c330 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-smack-root 2022/06/21 04:11 upstream 78ca55889a54 0fc5c330 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/20 16:35 upstream 78ca55889a54 8d15e28d .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/20 06:50 upstream a111daf0c53a 8f633d84 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/20 05:14 upstream a111daf0c53a 8f633d84 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/20 01:31 upstream a111daf0c53a 8f633d84 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/19 17:38 upstream 05c6ca8512f2 8f633d84 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/19 10:57 upstream 354c6e071be9 8f633d84 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/19 05:19 upstream 354c6e071be9 8f633d84 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/19 00:47 upstream 4b35035bcf80 8f633d84 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/18 15:28 upstream 4b35035bcf80 8f633d84 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/18 07:00 upstream 4b35035bcf80 8f633d84 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-selinux-root 2022/06/18 04:15 upstream f0ec9c65a8d6 cb58b3b2 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/18 02:33 upstream f0ec9c65a8d6 cb58b3b2 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-qemu-upstream 2022/06/18 02:10 upstream 274295c6e53f 8f633d84 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/17 07:17 upstream 47700948a4ab 1719ee24 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-smack-root 2022/06/17 04:17 upstream 0639b599f6f3 1719ee24 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/17 00:07 upstream 48a23ec6ff2b 1719ee24 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/06/16 16:41 upstream 30306f6194ca 1719ee24 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-kasan-gce-root 2022/04/21 03:36 upstream b253435746d9 d4befee1 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-qemu-upstream-386 2022/06/14 15:31 upstream b13baccc3850 9ce2c85a .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-qemu-upstream-386 2022/04/21 00:51 upstream b253435746d9 d4befee1 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-linux-next-kasan-gce-root 2022/06/25 03:47 linux-next 2f9cb3d3bd73 a371c43c .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super
ci-upstream-linux-next-kasan-gce-root 2022/06/21 21:37 linux-next 34d1d36073ea 0fc5c330 .config log report info UBSAN: shift-out-of-bounds in ntfs_fill_super