syzbot


kernel BUG in ntfs_read_inode_mount

Status: upstream: reported on 2022/01/17 10:09
Reported-by: syzbot+3c765c5248797356edaa@syzkaller.appspotmail.com
Fix commit: 714fbf2647b1 ntfs: add sanity check on allocation size
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-arm64 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-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 387d, last: 387d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 kernel BUG in ntfs_read_inode_mount ntfs C error 4 47d 141d 0/1 upstream: reported C repro on 2022/09/19 21:45

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/ntfs/malloc.h:31!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 13085 Comm: syz-executor.4 Not tainted 5.16.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__ntfs_malloc fs/ntfs/malloc.h:31 [inline]
RIP: 0010:ntfs_malloc_nofs fs/ntfs/malloc.h:52 [inline]
RIP: 0010:ntfs_read_inode_mount+0x1df3/0x2490 fs/ntfs/inode.c:1884
Code: 24 30 48 39 c3 0f 83 e2 01 00 00 e8 87 85 e5 fe 48 89 ef be 42 0c 00 00 e8 ba c9 21 ff 48 89 c5 e9 59 f4 ff ff e8 6d 85 e5 fe <0f> 0b 4c 8b 7c 24 30 e8 61 85 e5 fe 48 c7 c2 c0 b3 df 89 48 c7 c7
RSP: 0018:ffffc90003a37a80 EFLAGS: 00010212
RAX: 0000000000003063 RBX: 0000000000000000 RCX: ffffc9000fc69000
RDX: 0000000000040000 RSI: ffffffff82924583 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff82923991 R11: 0000000000000000 R12: ffff88807d0f4038
R13: ffff88807d0f4040 R14: ffff888071f5f6a0 R15: ffff88801e2ca000
FS:  00007f29a2160700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555555c25708 CR3: 00000000793be000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 ntfs_fill_super+0xa2f/0x8440 fs/ntfs/super.c:2854
 mount_bdev+0x34d/0x410 fs/super.c:1370
 legacy_get_tree+0x105/0x220 fs/fs_context.c:610
 vfs_get_tree+0x89/0x2f0 fs/super.c:1500
 do_new_mount fs/namespace.c:2994 [inline]
 path_mount+0x1320/0x1fa0 fs/namespace.c:3324
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount fs/namespace.c:3522 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3522
 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:0x7f29a37ec51a
Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29a215ff88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f29a37ec51a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f29a215ffe0
RBP: 00007f29a2160020 R08: 00007f29a2160020 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000
R13: 0000000020000100 R14: 00007f29a215ffe0 R15: 000000002007dd00
 </TASK>
Modules linked in:
---[ end trace 20309b23609f3571 ]---
RIP: 0010:__ntfs_malloc fs/ntfs/malloc.h:31 [inline]
RIP: 0010:ntfs_malloc_nofs fs/ntfs/malloc.h:52 [inline]
RIP: 0010:ntfs_read_inode_mount+0x1df3/0x2490 fs/ntfs/inode.c:1884
Code: 24 30 48 39 c3 0f 83 e2 01 00 00 e8 87 85 e5 fe 48 89 ef be 42 0c 00 00 e8 ba c9 21 ff 48 89 c5 e9 59 f4 ff ff e8 6d 85 e5 fe <0f> 0b 4c 8b 7c 24 30 e8 61 85 e5 fe 48 c7 c2 c0 b3 df 89 48 c7 c7
RSP: 0018:ffffc90003a37a80 EFLAGS: 00010212
RAX: 0000000000003063 RBX: 0000000000000000 RCX: ffffc9000fc69000
RDX: 0000000000040000 RSI: ffffffff82924583 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff82923991 R11: 0000000000000000 R12: ffff88807d0f4038
R13: ffff88807d0f4040 R14: ffff888071f5f6a0 R15: ffff88801e2ca000
FS:  00007f29a2160700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8b9a64ffc8 CR3: 00000000793be000 CR4: 0000000000350ee0

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-root 2022/01/16 15:21 upstream d0a231f01e5b 723cfaf0 .config console log report info kernel BUG in ntfs_read_inode_mount
* Struck through repros no longer work on HEAD.