syzbot


kernel BUG in ntfs_lookup_inode_by_name

Status: upstream: reported C repro on 2022/07/24 08:53
Reported-by: syzbot+d532380eef771ac0034b@syzkaller.appspotmail.com
First crash: 131d, last: 74d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: kernel BUG in ntfs_lookup_inode_by_name (log)
Repro: C syz .config

Fix bisection: the fix commit could be any of (bisect log):
  3245cb65fd91 Merge tag 'devicetree-fixes-for-6.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
  9abf2313adc1 Linux 6.1-rc1
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 kernel BUG in ntfs_lookup_inode_by_name C error 2 175d 175d 0/1 upstream: reported C repro on 2022/06/06 10:51
linux-4.14 kernel BUG in ntfs_lookup_inode_by_name C error 1 84d 174d 0/1 upstream: reported C repro on 2022/06/07 08:28

Sample crash report:
ntfs: (device loop0): map_mft_record_page(): Mft record 0xa 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 0xa as bad.  Run chkdsk.
ntfs: (device loop0): load_and_init_upcase(): Failed to load $UpCase from the volume. Using default.
ntfs: volume version 3.1.
ntfs: (device loop0): map_mft_record_page(): Mft record 0x2 is corrupt.  Run chkdsk.
------------[ cut here ]------------
kernel BUG at fs/ntfs/dir.c:86!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3611 Comm: syz-executor707 Not tainted 5.19.0-rc7-syzkaller-00005-gca85855bdcae #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
RIP: 0010:ntfs_lookup_inode_by_name+0xe4b/0x2ef0 fs/ntfs/dir.c:86
Code: df 48 c1 ea 03 80 3c 02 00 0f 85 ec 1d 00 00 48 8b 44 24 50 49 8d 5c 24 07 48 c7 00 00 00 00 00 e9 1e fa ff ff e8 f5 af d9 fe <0f> 0b e8 ee af d9 fe 0f 0b e8 e7 af d9 fe 48 8b 74 24 70 4c 89 e1
RSP: 0018:ffffc9000347fa30 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000008000 RCX: 0000000000000000
RDX: ffff888020e05880 RSI: ffffffff82a0bc6b RDI: 0000000000000003
RBP: ffff88807bfb8000 R08: 0000000000000003 R09: 0000000000004000
R10: 0000000000008000 R11: 000000000008a07a R12: ffff88807ce82050
R13: ffff88807bfb8000 R14: ffff88807bfb8230 R15: ffff88807ce82000
FS:  00005555555a3300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560fe0051808 CR3: 0000000072caa000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 load_and_init_quota fs/ntfs/super.c:1367 [inline]
 load_system_files fs/ntfs/super.c:2103 [inline]
 ntfs_fill_super+0x59f5/0x9080 fs/ntfs/super.c:2891
 mount_bdev+0x34d/0x410 fs/super.c:1367
 legacy_get_tree+0x105/0x220 fs/fs_context.c:610
 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+0x63/0xcd
RIP: 0033:0x7f6deea26afa
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:00007ffdf3ff3938 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffdf3ff3990 RCX: 00007f6deea26afa
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffdf3ff3950
RBP: 00007ffdf3ff3950 R08: 00007ffdf3ff3990 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020001208
R13: 0000000000000003 R14: 0000000000000004 R15: 00000000000000ab
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ntfs_lookup_inode_by_name+0xe4b/0x2ef0 fs/ntfs/dir.c:86
Code: df 48 c1 ea 03 80 3c 02 00 0f 85 ec 1d 00 00 48 8b 44 24 50 49 8d 5c 24 07 48 c7 00 00 00 00 00 e9 1e fa ff ff e8 f5 af d9 fe <0f> 0b e8 ee af d9 fe 0f 0b e8 e7 af d9 fe 48 8b 74 24 70 4c 89 e1
RSP: 0018:ffffc9000347fa30 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000008000 RCX: 0000000000000000
RDX: ffff888020e05880 RSI: ffffffff82a0bc6b RDI: 0000000000000003
RBP: ffff88807bfb8000 R08: 0000000000000003 R09: 0000000000004000
R10: 0000000000008000 R11: 000000000008a07a R12: ffff88807ce82050
R13: ffff88807bfb8000 R14: ffff88807bfb8230 R15: ffff88807ce82000
FS:  00005555555a3300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560fe0051808 CR3: 0000000072caa000 CR4: 0000000000350ef0

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/07/20 08:51 upstream ca85855bdcae 775344bc .config log report syz C kernel BUG in ntfs_lookup_inode_by_name
ci-upstream-kasan-gce-smack-root 2022/09/15 02:55 upstream 3245cb65fd91 b884348d .config log report syz C kernel BUG in ntfs_lookup_inode_by_name
* Struck through repros no longer work on HEAD.