kernel BUG in ntfs_read_inode_mount

5 views
Skip to first unread message

syzbot

unread,
Sep 19, 2022, 5:45:43 PM9/19/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=1653dfb4880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=dc4c8bac1ce6f4fc3cbc
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

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

Downloadable assets:
disk image: https://storage.googleapis.com/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/ea228ff02669/vmlinux-3f8a27f9.xz

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

------------[ cut here ]------------
kernel BUG at fs/ntfs/malloc.h:45!
audit: type=1804 audit(1663623902.894:1581): pid=28561 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir1661001145/syzkaller.N1V5cA/1243/file0/file0" dev="loop2" ino=1 res=1
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 28555 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:__ntfs_malloc fs/ntfs/malloc.h:45 [inline]
RIP: 0010:ntfs_malloc_nofs fs/ntfs/malloc.h:66 [inline]
RIP: 0010:ntfs_read_inode_mount+0x1bc3/0x22b0 fs/ntfs/inode.c:1909
Code: ba 63 01 00 00 00 00 00 80 48 23 15 f7 54 de 08 48 89 ef be 42 00 60 00 e8 7a 87 48 ff 48 89 c5 e9 d9 f4 ff ff e8 cd fd 19 ff <0f> 0b e8 c6 fd 19 ff e8 c1 fd 19 ff 48 c7 c2 80 6c 94 88 4c 89 fe
RSP: 0018:ffff888090e1fa40 EFLAGS: 00010216
RAX: 0000000000040000 RBX: 0000000000000000 RCX: ffffc90007f25000
RDX: 0000000000019007 RSI: ffffffff824887a3 RDI: 0000000000000007
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000007 R11: 0000000000000001 R12: ffff88808c4523f8
R13: ffff88808c452400 R14: ffff8880528b5a08 R15: ffff8880576bebc0
FS: 00007f93051ed700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005555560ea708 CR3: 00000000a2e29000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ntfs_fill_super+0xa16/0x7e10 fs/ntfs/super.c:2871
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:0x7f930687993a
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:00007f93051ecf88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f930687993a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f93051ecfe0
RBP: 00007f93051ed020 R08: 00007f93051ed020 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000
R13: 0000000020000100 R14: 00007f93051ecfe0 R15: 0000000020079ca0
Modules linked in:
---[ end trace 1ca5adf5e55a1184 ]---
RIP: 0010:__ntfs_malloc fs/ntfs/malloc.h:45 [inline]
RIP: 0010:ntfs_malloc_nofs fs/ntfs/malloc.h:66 [inline]
RIP: 0010:ntfs_read_inode_mount+0x1bc3/0x22b0 fs/ntfs/inode.c:1909
Code: ba 63 01 00 00 00 00 00 80 48 23 15 f7 54 de 08 48 89 ef be 42 00 60 00 e8 7a 87 48 ff 48 89 c5 e9 d9 f4 ff ff e8 cd fd 19 ff <0f> 0b e8 c6 fd 19 ff e8 c1 fd 19 ff 48 c7 c2 80 6c 94 88 4c 89 fe
RSP: 0018:ffff888090e1fa40 EFLAGS: 00010216
RAX: 0000000000040000 RBX: 0000000000000000 RCX: ffffc90007f25000
RDX: 0000000000019007 RSI: ffffffff824887a3 RDI: 0000000000000007
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
MINIX-fs: bad superblock or unable to read bitmaps
R10: 0000000000000007 R11: 0000000000000001 R12: ffff88808c4523f8
R13: ffff88808c452400 R14: ffff8880528b5a08 R15: ffff8880576bebc0
FS: 00007f93051ed700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555556bbf848 CR3: 00000000a2e29000 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,
Sep 19, 2022, 6:01:42 PM9/19/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=142ba654880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=dc4c8bac1ce6f4fc3cbc
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=172d1e7f080000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=112b3628880000

Downloadable assets:
disk image: https://storage.googleapis.com/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/ea228ff02669/vmlinux-3f8a27f9.xz

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

ntfs: (device loop0): is_boot_sector_ntfs(): Invalid end of sector marker.
------------[ cut here ]------------
kernel BUG at fs/ntfs/malloc.h:45!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8113 Comm: syz-executor422 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:__ntfs_malloc fs/ntfs/malloc.h:45 [inline]
RIP: 0010:ntfs_malloc_nofs fs/ntfs/malloc.h:66 [inline]
RIP: 0010:ntfs_read_inode_mount+0x1bc3/0x22b0 fs/ntfs/inode.c:1909
Code: ba 63 01 00 00 00 00 00 80 48 23 15 f7 54 de 08 48 89 ef be 42 00 60 00 e8 7a 87 48 ff 48 89 c5 e9 d9 f4 ff ff e8 cd fd 19 ff <0f> 0b e8 c6 fd 19 ff e8 c1 fd 19 ff 48 c7 c2 80 6c 94 88 4c 89 fe
RSP: 0018:ffff8880a8847a40 EFLAGS: 00010293
RAX: ffff8880956b4380 RBX: 0000000000000000 RCX: ffffffff82487c31
RDX: 0000000000000000 RSI: ffffffff824887a3 RDI: 0000000000000007
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000007 R11: 0000000000000001 R12: ffff8880b2d92678
R13: ffff8880b2d92680 R14: ffff88808dbeea08 R15: ffff88809505e500
FS: 0000555555c66300(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe8bd7e000 CR3: 00000000b4081000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ntfs_fill_super+0xa16/0x7e10 fs/ntfs/super.c:2871
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:0x7feb7ac1a27a
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:00007ffe8bd7d398 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe8bd7d3f0 RCX: 00007feb7ac1a27a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffe8bd7d3b0
RBP: 00007ffe8bd7d3b0 R08: 00007ffe8bd7d3f0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020000260
R13: 0000000000000003 R14: 0000000000000004 R15: 0000000000000004
Modules linked in:
---[ end trace 38c8edf50dba2b08 ]---
RIP: 0010:__ntfs_malloc fs/ntfs/malloc.h:45 [inline]
RIP: 0010:ntfs_malloc_nofs fs/ntfs/malloc.h:66 [inline]
RIP: 0010:ntfs_read_inode_mount+0x1bc3/0x22b0 fs/ntfs/inode.c:1909
Code: ba 63 01 00 00 00 00 00 80 48 23 15 f7 54 de 08 48 89 ef be 42 00 60 00 e8 7a 87 48 ff 48 89 c5 e9 d9 f4 ff ff e8 cd fd 19 ff <0f> 0b e8 c6 fd 19 ff e8 c1 fd 19 ff 48 c7 c2 80 6c 94 88 4c 89 fe
RSP: 0018:ffff8880a8847a40 EFLAGS: 00010293
RAX: ffff8880956b4380 RBX: 0000000000000000 RCX: ffffffff82487c31
RDX: 0000000000000000 RSI: ffffffff824887a3 RDI: 0000000000000007
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000007 R11: 0000000000000001 R12: ffff8880b2d92678
R13: ffff8880b2d92680 R14: ffff88808dbeea08 R15: ffff88809505e500
FS: 0000555555c66300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056141084c160 CR3: 00000000b4081000 CR4: 00000000003406f0
Reply all
Reply to author
Forward
0 new messages