[ntfs?] kernel BUG in ntfs_perform_write

6 views
Skip to first unread message

syzbot

unread,
Dec 30, 2022, 5:57:45 AM12/30/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=16d1e4e0480000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=4c179f12dd0619a92356
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/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz

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

ntfs: volume version 3.1.
------------[ cut here ]------------
kernel BUG at fs/ntfs/file.c:514!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 2988 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__ntfs_grab_cache_pages fs/ntfs/file.c:514 [inline]
RIP: 0010:ntfs_perform_write.isra.0+0x194a/0x8570 fs/ntfs/file.c:1857
Code: 13 00 00 01 bf 00 10 00 00 44 89 fe e8 af 92 1b ff 41 81 ff 00 10 00 00 0f 86 a7 fe ff ff e8 2d 91 1b ff 0f 0b e8 26 91 1b ff <0f> 0b e8 1f 91 1b ff 48 8b 54 24 08 48 b8 00 00 00 00 00 fc ff df
RSP: 0018:ffff88803c4776a0 EFLAGS: 00010293
RAX: ffff8880ab276380 RBX: 0000000000000000 RCX: ffffffff8246de6a
RDX: 0000000000000000 RSI: ffffffff8246f44a RDI: 0000000000000005
RBP: ffff88803c4779a0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffea000041f540 R15: 0000000000000003
FS: 00007f926b72f700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020005001 CR3: 00000000afe6e000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ntfs_file_write_iter+0x5d9/0x23b0 fs/ntfs/file.c:1951
call_write_iter include/linux/fs.h:1821 [inline]
do_iter_readv_writev+0x668/0x790 fs/read_write.c:681
do_iter_write+0x182/0x5d0 fs/read_write.c:960
vfs_writev+0x153/0x2e0 fs/read_write.c:1005
do_pwritev fs/read_write.c:1094 [inline]
__do_sys_pwritev fs/read_write.c:1141 [inline]
__se_sys_pwritev fs/read_write.c:1136 [inline]
__x64_sys_pwritev+0x22b/0x310 fs/read_write.c:1136
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f926d1bd0a9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f926b72f168 EFLAGS: 00000246 ORIG_RAX: 0000000000000128
RAX: ffffffffffffffda RBX: 00007f926d2dcf80 RCX: 00007f926d1bd0a9
RDX: 0000000000000001 RSI: 00000000200002c0 RDI: 0000000000000004
RBP: 00007f926d218ae9 R08: 0000000000001d00 R09: 0000000000000000
R10: 000000000000ffff R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffde14dd17f R14: 00007f926b72f300 R15: 0000000000022000
Modules linked in:
---[ end trace 0cb24cbfdf68ce06 ]---
RIP: 0010:__ntfs_grab_cache_pages fs/ntfs/file.c:514 [inline]
RIP: 0010:ntfs_perform_write.isra.0+0x194a/0x8570 fs/ntfs/file.c:1857
Code: 13 00 00 01 bf 00 10 00 00 44 89 fe e8 af 92 1b ff 41 81 ff 00 10 00 00 0f 86 a7 fe ff ff e8 2d 91 1b ff 0f 0b e8 26 91 1b ff <0f> 0b e8 1f 91 1b ff 48 8b 54 24 08 48 b8 00 00 00 00 00 fc ff df
RSP: 0018:ffff88803c4776a0 EFLAGS: 00010293
RAX: ffff8880ab276380 RBX: 0000000000000000 RCX: ffffffff8246de6a
RDX: 0000000000000000 RSI: ffffffff8246f44a RDI: 0000000000000005
RBP: ffff88803c4779a0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffea000041f540 R15: 0000000000000003
FS: 00007f926b72f700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000558ad4d68160 CR3: 00000000afe6e000 CR4: 00000000003406e0
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,
Dec 30, 2022, 6:55:41 AM12/30/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=122be548480000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=4c179f12dd0619a92356
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=170cf848480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=112f126c480000
mounted in repro: https://storage.googleapis.com/syzbot-assets/3bead70819b0/mount_0.gz

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

ntfs: volume version 3.1.
ntfs: volume version 3.1.
ntfs: volume version 3.1.
ntfs: volume version 3.1.
------------[ cut here ]------------
kernel BUG at fs/ntfs/file.c:514!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8250 Comm: syz-executor245 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__ntfs_grab_cache_pages fs/ntfs/file.c:514 [inline]
RIP: 0010:ntfs_perform_write.isra.0+0x194a/0x8570 fs/ntfs/file.c:1857
Code: 13 00 00 01 bf 00 10 00 00 44 89 fe e8 af 92 1b ff 41 81 ff 00 10 00 00 0f 86 a7 fe ff ff e8 2d 91 1b ff 0f 0b e8 26 91 1b ff <0f> 0b e8 1f 91 1b ff 48 8b 54 24 08 48 b8 00 00 00 00 00 fc ff df
RSP: 0018:ffff88808f8a76a0 EFLAGS: 00010293
RAX: ffff8880b16161c0 RBX: 0000000000000000 RCX: ffffffff8246de6a
RDX: 0000000000000000 RSI: ffffffff8246f44a RDI: 0000000000000005
RBP: ffff88808f8a79a0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffea0002380f40 R15: 0000000000000004
FS: 00007f1b6d698700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020005001 CR3: 00000000a84b7000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ntfs_file_write_iter+0x5d9/0x23b0 fs/ntfs/file.c:1951
call_write_iter include/linux/fs.h:1821 [inline]
do_iter_readv_writev+0x668/0x790 fs/read_write.c:681
do_iter_write+0x182/0x5d0 fs/read_write.c:960
vfs_writev+0x153/0x2e0 fs/read_write.c:1005
do_pwritev fs/read_write.c:1094 [inline]
__do_sys_pwritev fs/read_write.c:1141 [inline]
__se_sys_pwritev fs/read_write.c:1136 [inline]
__x64_sys_pwritev+0x22b/0x310 fs/read_write.c:1136
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f1b6d6ec599
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f1b6d6982f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000128
RAX: ffffffffffffffda RBX: 00007f1b6d7907a0 RCX: 00007f1b6d6ec599
RDX: 0000000000000001 RSI: 00000000200002c0 RDI: 0000000000000004
RBP: 00007f1b6d75cf30 R08: 0000000000001d00 R09: 0000000000000000
R10: 000000000000ffff R11: 0000000000000246 R12: 0030656c69662f2e
R13: 0031656c69662f2e R14: 65732f636f72702f R15: 00007f1b6d7907a8
Modules linked in:
---[ end trace c221cd56e609198f ]---
RIP: 0010:__ntfs_grab_cache_pages fs/ntfs/file.c:514 [inline]
RIP: 0010:ntfs_perform_write.isra.0+0x194a/0x8570 fs/ntfs/file.c:1857
Code: 13 00 00 01 bf 00 10 00 00 44 89 fe e8 af 92 1b ff 41 81 ff 00 10 00 00 0f 86 a7 fe ff ff e8 2d 91 1b ff 0f 0b e8 26 91 1b ff <0f> 0b e8 1f 91 1b ff 48 8b 54 24 08 48 b8 00 00 00 00 00 fc ff df
RSP: 0018:ffff88808f8a76a0 EFLAGS: 00010293
RAX: ffff8880b16161c0 RBX: 0000000000000000 RCX: ffffffff8246de6a
RDX: 0000000000000000 RSI: ffffffff8246f44a RDI: 0000000000000005
RBP: ffff88808f8a79a0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffea0002380f40 R15: 0000000000000004
FS: 00007f1b6d698700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1b6d73d748 CR3: 00000000a84b7000 CR4: 00000000003406e0
Reply all
Reply to author
Forward
0 new messages