kernel BUG at fs/ntfs/aops.c:LINE!

23 views
Skip to first unread message

syzbot

unread,
Sep 20, 2020, 5:54:15 PM9/20/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: cbfa1702 Linux 4.14.198
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=153a0e9b900000
kernel config: https://syzkaller.appspot.com/x/.config?x=3990958d85b55e59
dashboard link: https://syzkaller.appspot.com/bug?extid=490284963e3545c8e1cb
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10dcec09900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16965707900000

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

audit: type=1400 audit(1600638715.720:8): avc: denied { execmem } for pid=6363 comm="syz-executor949" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
ntfs: (device loop0): is_boot_sector_ntfs(): Invalid end of sector marker.
------------[ cut here ]------------
kernel BUG at fs/ntfs/aops.c:207!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 6363 Comm: syz-executor949 Not tainted 4.14.198-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff888097608340 task.stack: ffff888098040000
RIP: 0010:ntfs_read_block fs/ntfs/aops.c:207 [inline]
RIP: 0010:ntfs_readpage+0x14c7/0x1a70 fs/ntfs/aops.c:456
RSP: 0018:ffff888098047780 EFLAGS: 00010297
RAX: ffff888097608340 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffea0002047b40 RDI: ffff88808160a790
RBP: ffff88808160a788 R08: 0000000000000000 R09: ffff88808160ac18
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
R13: ffff88808160a740 R14: ffff88808160aa08 R15: ffffea0002047b40
FS: 0000000002302880(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056523356dda8 CR3: 00000000a8379000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
do_read_cache_page+0x38e/0xbb0 mm/filemap.c:2713
read_mapping_page include/linux/pagemap.h:398 [inline]
ntfs_map_page fs/ntfs/aops.h:89 [inline]
map_mft_record_page fs/ntfs/mft.c:85 [inline]
map_mft_record+0x1ca/0xbe0 fs/ntfs/mft.c:168
ntfs_read_locked_inode+0x1bf/0x5000 fs/ntfs/inode.c:582
ntfs_read_inode_mount+0xa89/0x1fb0 fs/ntfs/inode.c:2109
ntfs_fill_super+0x9a6/0x7170 fs/ntfs/super.c:2871
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:2549 [inline]
do_mount+0xe53/0x2a00 fs/namespace.c:2879
SYSC_mount fs/namespace.c:3095 [inline]
SyS_mount+0xa8/0x120 fs/namespace.c:3072
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x446e9a
RSP: 002b:00007ffe68ccaa18 EFLAGS: 00000287 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe68ccaa70 RCX: 0000000000446e9a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffe68ccaa30
RBP: 00007ffe68ccaa30 R08: 00007ffe68ccaa70 R09: 00007ffe00000015
R10: 0000000000000000 R11: 0000000000000287 R12: 0000000000000008
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
Code: 89 04 00 00 49 83 be 88 fd ff ff 00 0f 85 3e f5 ff ff e8 5d 59 4c ff 49 8b 86 80 fd ff ff a8 08 0f 85 2a f5 ff ff e8 49 59 4c ff <0f> 0b e8 42 59 4c ff 48 8b 84 24 88 00 00 00 48 8d b8 c0 fd ff
RIP: ntfs_read_block fs/ntfs/aops.c:207 [inline] RSP: ffff888098047780
RIP: ntfs_readpage+0x14c7/0x1a70 fs/ntfs/aops.c:456 RSP: ffff888098047780
---[ end trace 0c9d4d83f11e2c2d ]---


---
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

syzbot

unread,
Sep 21, 2020, 3:37:15 PM9/21/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 015e94d0 Linux 4.19.146
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12f154e3900000
kernel config: https://syzkaller.appspot.com/x/.config?x=243dd74ad58a8a57
dashboard link: https://syzkaller.appspot.com/bug?extid=47cbfebdba9d70c27250
compiler: gcc (GCC) 10.1.0-syz 20200507

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+47cbfe...@syzkaller.appspotmail.com

loop1: rw=0, want=563, limit=249
loop2: rw=0, want=2046, limit=71
attempt to access beyond end of device
attempt to access beyond end of device
------------[ cut here ]------------
kernel BUG at fs/ntfs/aops.c:203!
loop1: rw=0, want=564, limit=249
loop2: rw=0, want=2047, limit=71
attempt to access beyond end of device
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 20852 Comm: syz-executor.3 Not tainted 4.19.146-syzkaller #0
attempt to access beyond end of device
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ntfs_read_block fs/ntfs/aops.c:203 [inline]
RIP: 0010:ntfs_readpage+0x1c0b/0x24d0 fs/ntfs/aops.c:452
Code: ff e8 a9 93 16 ff 48 8b 9d 80 fd ff ff 31 ff 48 c1 eb 03 83 e3 01 89 de e8 c2 94 16 ff 84 db 0f 85 0b f0 ff ff e8 85 93 16 ff <0f> 0b 48 c7 c7 80 e3 bf 89 e8 87 bb 5a 01 e8 72 93 16 ff 0f 0b 48
loop2: rw=0, want=2048, limit=71
RSP: 0018:ffff888051c9f758 EFLAGS: 00010216
RAX: 0000000000040000 RBX: 0000000000000000 RCX: ffffc9000c263000
RDX: 0000000000004e78 RSI: ffffffff825b2f5b RDI: 0000000000000001
RBP: ffff88808067eac8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
R13: ffff88808067e848 R14: 0000000000000001 R15: ffffea0000febd00
FS: 00007f18e7e6b700(0000) GS:ffff8880ae200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000334fad8 CR3: 000000009e45e000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
do_read_cache_page+0x533/0x1080 mm/filemap.c:2828
read_mapping_page include/linux/pagemap.h:402 [inline]
ntfs_map_page fs/ntfs/aops.h:89 [inline]
map_mft_record_page fs/ntfs/mft.c:87 [inline]
map_mft_record+0x228/0xd00 fs/ntfs/mft.c:170
ntfs_read_locked_inode+0x19c/0x5490 fs/ntfs/inode.c:575
ntfs_read_inode_mount+0xcba/0x23b0 fs/ntfs/inode.c:2100
ntfs_fill_super+0x1761/0x89d2 fs/ntfs/super.c:2871
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x318 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:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x46004a
Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 fd 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 da 89 fb ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 002b:00007f18e7e6aa88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f18e7e6ab20 RCX: 000000000046004a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f18e7e6aae0
RBP: 00007f18e7e6aae0 R08: 00007f18e7e6ab20 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000
R13: 0000000020000100 R14: 0000000020000200 R15: 000000002007dc00
Modules linked in:
---[ end trace d8d8bed3273d29cc ]---
RIP: 0010:ntfs_read_block fs/ntfs/aops.c:203 [inline]
RIP: 0010:ntfs_readpage+0x1c0b/0x24d0 fs/ntfs/aops.c:452
loop1: rw=0, want=565, limit=249
Code: ff e8 a9 93 16 ff 48 8b 9d 80 fd ff ff 31 ff 48 c1 eb 03 83 e3 01 89 de e8 c2 94 16 ff 84 db 0f 85 0b f0 ff ff e8 85 93 16 ff <0f> 0b 48 c7 c7 80 e3 bf 89 e8 87 bb 5a 01 e8 72 93 16 ff 0f 0b 48
RSP: 0018:ffff888051c9f758 EFLAGS: 00010216
RAX: 0000000000040000 RBX: 0000000000000000 RCX: ffffc9000c263000
RDX: 0000000000004e78 RSI: ffffffff825b2f5b RDI: 0000000000000001
RBP: ffff88808067eac8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
R13: ffff88808067e848 R14: 0000000000000001 R15: ffffea0000febd00
FS: 00007f18e7e6b700(0000) GS:ffff8880ae200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000035ddad8 CR3: 000000009e45e000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


syzbot

unread,
Sep 21, 2020, 3:54:17 PM9/21/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 015e94d0 Linux 4.19.146
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10e546c5900000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=166e6f8b900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14ac25d9900000

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

audit: type=1400 audit(1600717882.033:8): avc: denied { execmem } for pid=6481 comm="syz-executor865" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
ntfs: (device loop0): is_boot_sector_ntfs(): Invalid end of sector marker.
------------[ cut here ]------------
kernel BUG at fs/ntfs/aops.c:203!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 6481 Comm: syz-executor865 Not tainted 4.19.146-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ntfs_read_block fs/ntfs/aops.c:203 [inline]
RIP: 0010:ntfs_readpage+0x1c0b/0x24d0 fs/ntfs/aops.c:452
Code: ff e8 a9 93 16 ff 48 8b 9d 80 fd ff ff 31 ff 48 c1 eb 03 83 e3 01 89 de e8 c2 94 16 ff 84 db 0f 85 0b f0 ff ff e8 85 93 16 ff <0f> 0b 48 c7 c7 80 e3 bf 89 e8 87 bb 5a 01 e8 72 93 16 ff 0f 0b 48
RSP: 0018:ffff8880a4b17758 EFLAGS: 00010293
RAX: ffff8880a3f9a200 RBX: 0000000000000000 RCX: ffffffff825b2f4e
RDX: 0000000000000000 RSI: ffffffff825b2f5b RDI: 0000000000000001
RBP: ffff88809255ea08 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
R13: ffff88809255e788 R14: 0000000000000001 R15: ffffea00020f8bc0
FS: 0000000000e57880(0000) GS:ffff8880ae200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000043ecb0 CR3: 00000000a3f53000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
do_read_cache_page+0x533/0x1080 mm/filemap.c:2828
read_mapping_page include/linux/pagemap.h:402 [inline]
ntfs_map_page fs/ntfs/aops.h:89 [inline]
map_mft_record_page fs/ntfs/mft.c:87 [inline]
map_mft_record+0x228/0xd00 fs/ntfs/mft.c:170
ntfs_read_locked_inode+0x19c/0x5490 fs/ntfs/inode.c:575
ntfs_read_inode_mount+0xcba/0x23b0 fs/ntfs/inode.c:2100
ntfs_fill_super+0x1761/0x89d2 fs/ntfs/super.c:2871
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x318 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:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x446e9a
Code: b8 08 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 fd ad fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 da ad fb ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 002b:00007ffe2fc38088 EFLAGS: 00000287 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe2fc380e0 RCX: 0000000000446e9a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffe2fc380a0
RBP: 00007ffe2fc380a0 R08: 00007ffe2fc380e0 R09: 00007ffe00000015
R10: 0000000000000000 R11: 0000000000000287 R12: 0000000000000008
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
Modules linked in:
---[ end trace aab58a4638781a36 ]---
RIP: 0010:ntfs_read_block fs/ntfs/aops.c:203 [inline]
RIP: 0010:ntfs_readpage+0x1c0b/0x24d0 fs/ntfs/aops.c:452
Code: ff e8 a9 93 16 ff 48 8b 9d 80 fd ff ff 31 ff 48 c1 eb 03 83 e3 01 89 de e8 c2 94 16 ff 84 db 0f 85 0b f0 ff ff e8 85 93 16 ff <0f> 0b 48 c7 c7 80 e3 bf 89 e8 87 bb 5a 01 e8 72 93 16 ff 0f 0b 48
RSP: 0018:ffff8880a4b17758 EFLAGS: 00010293
RAX: ffff8880a3f9a200 RBX: 0000000000000000 RCX: ffffffff825b2f4e
RDX: 0000000000000000 RSI: ffffffff825b2f5b RDI: 0000000000000001
RBP: ffff88809255ea08 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
R13: ffff88809255e788 R14: 0000000000000001 R15: ffffea00020f8bc0
FS: 0000000000e57880(0000) GS:ffff8880ae200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000043ecb0 CR3: 00000000a3f53000 CR4: 00000000001406f0
Reply all
Reply to author
Forward
0 new messages