syzbot


kernel BUG in ntfs_iget

Status: upstream: reported C repro on 2023/02/23 12:51
Labels: ntfs (incorrect?)
Reported-by: syzbot+d62e6bd2a2d05103d105@syzkaller.appspotmail.com
First crash: 110d, last: 14d

Cause bisection: failed (error log, bisect log)
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly ntfs report (Jun 2023) 0 (1) 2023/06/02 08:40
[syzbot] [ntfs?] kernel BUG in ntfs_iget 0 (2) 2023/05/11 13:35
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 kernel BUG in ntfs_iget origin:upstream C 1 18d 18d 0/3 upstream: reported C repro on 2023/05/15 07:12
linux-6.1 kernel BUG in ntfs_iget origin:upstream C 1 19d 19d 0/3 upstream: reported C repro on 2023/05/14 00:47

Sample crash report:
loop0: detected capacity change from 0 to 190
ntfs: (device loop0): is_boot_sector_ntfs(): Invalid boot sector checksum.
ntfs: (device loop0): map_mft_record_page(): Mft record 0x1 is corrupt.  Run chkdsk.
ntfs: (device loop0): map_mft_record(): Failed with error code 5.
ntfs: (device loop0): ntfs_read_locked_inode(): Failed with error code -5.  Marking corrupt inode 0x1 as bad.  Run chkdsk.
ntfs: (device loop0): load_system_files(): Failed to load $MFTMirr.  Mounting read-only.  Run ntfsfix and/or chkdsk.
------------[ cut here ]------------
kernel BUG at fs/ntfs/malloc.h:31!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 4993 Comm: syz-executor320 Not tainted 6.4.0-rc1-syzkaller-00025-gd295b66a7b66 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
RIP: 0010:__ntfs_malloc fs/ntfs/malloc.h:31 [inline]
RIP: 0010:ntfs_malloc_nofs+0xfd/0x100 fs/ntfs/malloc.h:52
Code: 17 e8 d7 1e c7 fe 48 89 df be 42 0c 00 00 5b 41 5e 41 5f e9 a5 f2 10 ff e8 c0 1e c7 fe 31 c0 5b 41 5e 41 5f c3 e8 b3 1e c7 fe <0f> 0b 90 66 0f 1f 00 55 41 57 41 56 41 55 41 54 53 49 89 fe 49 bc
RSP: 0018:ffffc90003a3f818 EFLAGS: 00010293
RAX: ffffffff82c4488d RBX: 0000000000000000 RCX: ffff88802476bb80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff888073a05118 R08: ffffffff82c447bd R09: ffffed100e9c5323
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff888074e29be0 R14: ffff888073a05147 R15: dffffc0000000000
FS:  000055555752e300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f02336e6000 CR3: 000000007a170000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ntfs_read_locked_inode+0x1fd5/0x49c0 fs/ntfs/inode.c:703
 ntfs_iget+0x113/0x190 fs/ntfs/inode.c:177
 load_and_init_upcase fs/ntfs/super.c:1663 [inline]
 load_system_files+0x151c/0x4840 fs/ntfs/super.c:1818
 ntfs_fill_super+0x19b3/0x2bd0 fs/ntfs/super.c:2900
 mount_bdev+0x274/0x3a0 fs/super.c:1380
 legacy_get_tree+0xef/0x190 fs/fs_context.c:610
 vfs_get_tree+0x8c/0x270 fs/super.c:1510
 do_new_mount+0x28f/0xae0 fs/namespace.c:3039
 do_mount fs/namespace.c:3382 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f023bb1cafa
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:00007fffebbdb6c8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f023bb1cafa
RDX: 000000002001f1c0 RSI: 000000002001f200 RDI: 00007fffebbdb6e0
RBP: 00007fffebbdb6e0 R08: 00007fffebbdb720 R09: 0000000000000987
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000000000004
R13: 000055555752e2c0 R14: 0000000000000000 R15: 00007fffebbdb720
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__ntfs_malloc fs/ntfs/malloc.h:31 [inline]
RIP: 0010:ntfs_malloc_nofs+0xfd/0x100 fs/ntfs/malloc.h:52
Code: 17 e8 d7 1e c7 fe 48 89 df be 42 0c 00 00 5b 41 5e 41 5f e9 a5 f2 10 ff e8 c0 1e c7 fe 31 c0 5b 41 5e 41 5f c3 e8 b3 1e c7 fe <0f> 0b 90 66 0f 1f 00 55 41 57 41 56 41 55 41 54 53 49 89 fe 49 bc
RSP: 0018:ffffc90003a3f818 EFLAGS: 00010293
RAX: ffffffff82c4488d RBX: 0000000000000000 RCX: ffff88802476bb80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff888073a05118 R08: ffffffff82c447bd R09: ffffed100e9c5323
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff888074e29be0 R14: ffff888073a05147 R15: dffffc0000000000
FS:  000055555752e300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f02336e6000 CR3: 000000007a170000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Manager Title
2023/05/11 13:34 upstream d295b66a7b66 0fbd49f4 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in ntfs_iget
2023/05/11 23:12 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a adb9a3cd .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 kernel BUG in ntfs_iget
2023/05/19 13:25 upstream 2d1bcbc6cd70 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in ntfs_iget
2023/05/11 13:23 upstream d295b66a7b66 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in ntfs_iget
2023/02/23 12:50 upstream 307e14c03906 9e2ebb3c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in ntfs_iget
2023/02/16 15:35 upstream 033c40a89f55 38b317a7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in ntfs_iget
2023/02/13 18:11 upstream ceaa837f96ad 957959cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in ntfs_iget
2023/02/12 07:32 upstream d12aca5c0cee 93e26d60 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in ntfs_iget
2023/02/12 07:05 upstream d12aca5c0cee 93e26d60 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in ntfs_iget
* Struck through repros no longer work on HEAD.