kernel BUG in ntfs_lookup_inode_by_name

27 views
Skip to first unread message

syzbot

unread,
Jun 6, 2022, 6:51:29 AM6/6/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14f75093f00000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=30b7f850c6d98ea461d2
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+30b7f8...@syzkaller.appspotmail.com

------------[ cut here ]------------
kernel BUG at fs/ntfs/dir.c:99!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 13110 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ntfs_lookup_inode_by_name+0xd50/0x3bd0 fs/ntfs/dir.c:99
Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 29 29 00 00 48 8b 44 24 50 49 8d 5d 07 48 c7 00 00 00 00 00 e9 d8 fa ff ff e8 00 dd 1b ff <0f> 0b e8 f9 dc 1b ff 0f 0b e8 f2 dc 1b ff 48 8b 74 24 70 4c 89 e1
RSP: 0018:ffff888049c57938 EFLAGS: 00010246
RAX: 0000000000040000 RBX: 0000000000008000 RCX: ffffc9000a253000
RDX: 0000000000040000 RSI: ffffffff8246a870 RDI: 0000000000000003
RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000004000
R10: 0000000000000003 R11: 0000000000000001 R12: ffff8880979bd450
R13: 1ffff1100938af4b R14: ffff8880528e0700 R15: ffff888054007180
FS: 00007efdbd305700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555555c10708 CR3: 0000000097380000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
load_and_init_quota+0xd7/0x3d0 fs/ntfs/super.c:1381
load_system_files fs/ntfs/super.c:2117 [inline]
ntfs_fill_super+0x6815/0x7e10 fs/ntfs/super.c:2908
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7efdbe99163a
Code: 48 c7 c2 b8 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007efdbd304f88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007efdbe99163a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007efdbd304fe0
RBP: 00007efdbd305020 R08: 00007efdbd305020 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000
R13: 0000000020000100 R14: 00007efdbd304fe0 R15: 000000002007dc00
Modules linked in:
---[ end trace d2b595be1980ea9e ]---
IPVS: ftp: loaded support on port[0] = 21
RIP: 0010:ntfs_lookup_inode_by_name+0xd50/0x3bd0 fs/ntfs/dir.c:99
Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 29 29 00 00 48 8b 44 24 50 49 8d 5d 07 48 c7 00 00 00 00 00 e9 d8 fa ff ff e8 00 dd 1b ff <0f> 0b e8 f9 dc 1b ff 0f 0b e8 f2 dc 1b ff 48 8b 74 24 70 4c 89 e1
RSP: 0018:ffff888049c57938 EFLAGS: 00010246
RAX: 0000000000040000 RBX: 0000000000008000 RCX: ffffc9000a253000
RDX: 0000000000040000 RSI: ffffffff8246a870 RDI: 0000000000000003
RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000004000
R10: 0000000000000003 R11: 0000000000000001 R12: ffff8880979bd450
R13: 1ffff1100938af4b R14: ffff8880528e0700 R15: ffff888054007180
FS: 00007efdbd305700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
BFS-fs: bfs_fill_super(): No BFS filesystem on loop4 (magic=00000000)
audit: type=1800 audit(1654512640.864:90): pid=13207 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.4" name="bus" dev="sda1" ino=14094 res=0
CR2: 00007ffcaa3d3f80 CR3: 0000000097380000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jun 6, 2022, 8:36:24 AM6/6/22
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16401ffbf00000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=30b7f850c6d98ea461d2
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1062254ff00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15a0f073f00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+30b7f8...@syzkaller.appspotmail.com

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:99!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8089 Comm: syz-executor611 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ntfs_lookup_inode_by_name+0xd50/0x3bd0 fs/ntfs/dir.c:99
Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 29 29 00 00 48 8b 44 24 50 49 8d 5d 07 48 c7 00 00 00 00 00 e9 d8 fa ff ff e8 00 dd 1b ff <0f> 0b e8 f9 dc 1b ff 0f 0b e8 f2 dc 1b ff 48 8b 74 24 70 4c 89 e1
RSP: 0018:ffff888097897938 EFLAGS: 00010293
RAX: ffff8880b4dba200 RBX: 0000000000008000 RCX: ffffffff82469b88
RDX: 0000000000000000 RSI: ffffffff8246a870 RDI: 0000000000000003
RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000004000
R10: 0000000000000003 R11: 0000000000000001 R12: ffff8880b0facfd0
R13: 1ffff11012f12f4b R14: ffff888095794d80 R15: ffff88808e528180
FS: 0000555556f4c300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff9e8f22000 CR3: 00000000b0040000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
load_and_init_quota+0xd7/0x3d0 fs/ntfs/super.c:1381
load_system_files fs/ntfs/super.c:2117 [inline]
ntfs_fill_super+0x6815/0x7e10 fs/ntfs/super.c:2908
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f573c6ccb0a
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:00007ffe570c7a18 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe570c7a70 RCX: 00007f573c6ccb0a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffe570c7a30
RBP: 00007ffe570c7a30 R08: 00007ffe570c7a70 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020001208
R13: 0000000000000003 R14: 0000000000000004 R15: 00000000000000ab
Modules linked in:
---[ end trace 5639cca4b639ac68 ]---
RIP: 0010:ntfs_lookup_inode_by_name+0xd50/0x3bd0 fs/ntfs/dir.c:99
Code: ff df 48 c1 ea 03 80 3c 02 00 0f 85 29 29 00 00 48 8b 44 24 50 49 8d 5d 07 48 c7 00 00 00 00 00 e9 d8 fa ff ff e8 00 dd 1b ff <0f> 0b e8 f9 dc 1b ff 0f 0b e8 f2 dc 1b ff 48 8b 74 24 70 4c 89 e1
RSP: 0018:ffff888097897938 EFLAGS: 00010293
RAX: ffff8880b4dba200 RBX: 0000000000008000 RCX: ffffffff82469b88
RDX: 0000000000000000 RSI: ffffffff8246a870 RDI: 0000000000000003
RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000004000
R10: 0000000000000003 R11: 0000000000000001 R12: ffff8880b0facfd0
R13: 1ffff11012f12f4b R14: ffff888095794d80 R15: ffff88808e528180
FS: 0000555556f4c300(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055f9a4adb160 CR3: 00000000b0040000 CR4: 00000000003406e0

syzbot

unread,
Jun 7, 2022, 4:28:26 AM6/7/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b8f3be299d51 Linux 4.14.282
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1232d300080000
kernel config: https://syzkaller.appspot.com/x/.config?x=6f19bc3398ea47b8
dashboard link: https://syzkaller.appspot.com/bug?extid=380b8d7ef89582312566
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1217c8e3f00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1253d673f00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+380b8d...@syzkaller.appspotmail.com

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:99!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7979 Comm: syz-executor324 Not tainted 4.14.282-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880b33be5c0 task.stack: ffff88809ce98000
RIP: 0010:ntfs_lookup_inode_by_name+0xca8/0x3820 fs/ntfs/dir.c:99
RSP: 0018:ffff88809ce9fa08 EFLAGS: 00010297
RAX: ffff8880b33be5c0 RBX: ffff8880b3cbd360 RCX: ffff88809ce9fc20
RDX: 0000000000000000 RSI: ffffffff87b14240 RDI: ffff88808df3c448
RBP: ffff8880b325e850 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
R13: ffff8880b3cbd400 R14: ffff8880b3cbd368 R15: ffff88808df3c180
FS: 00005555555af300(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000100 CR3: 000000009d4c4000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
load_and_init_quota fs/ntfs/super.c:1381 [inline]
load_system_files fs/ntfs/super.c:2117 [inline]
ntfs_fill_super+0x5d08/0x7170 fs/ntfs/super.c:2908
mount_bdev+0x2b3/0x360 fs/super.c:1134
mount_fs+0x92/0x2a0 fs/super.c:1237
vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2572 [inline]
do_mount+0xe65/0x2a30 fs/namespace.c:2905
SYSC_mount fs/namespace.c:3121 [inline]
SyS_mount+0xa8/0x120 fs/namespace.c:3098
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7fb36eaebb0a
RSP: 002b:00007ffc79082d48 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffc79082da0 RCX: 00007fb36eaebb0a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffc79082d60
RBP: 00007ffc79082d60 R08: 00007ffc79082da0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020001208
R13: 0000000000000003 R14: 0000000000000004 R15: 00000000000000ab
Code: fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 7a 27 00 00 48 8b 44 24 40 49 8d 5d 07 48 c7 00 00 00 00 00 e9 c8 fa ff ff e8 28 c4 43 ff <0f> 0b e8 21 c4 43 ff 0f 0b e8 1a c4 43 ff 48 8b 74 24 60 4c 89
RIP: ntfs_lookup_inode_by_name+0xca8/0x3820 fs/ntfs/dir.c:99 RSP: ffff88809ce9fa08
---[ end trace 308b0a61eda6ed78 ]---


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages