[v6.1] kernel BUG in ntfs_read_folio

2 views
Skip to first unread message

syzbot

unread,
Mar 10, 2023, 4:54:42 AM3/10/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 8a923980a190 Linux 6.1.16
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10acef04c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=fc32d7322291d081
dashboard link: https://syzkaller.appspot.com/bug?extid=21a0e44e538079fa4e88
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bf09a4a426d0/disk-8a923980.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/99e88c1c3e26/vmlinux-8a923980.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d13a720e0836/Image-8a923980.gz.xz

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

loop4: detected capacity change from 0 to 4096
------------[ cut here ]------------
kernel BUG at fs/ntfs/aops.c:186!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 20647 Comm: syz-executor.4 Not tainted 6.1.16-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : ntfs_read_block fs/ntfs/aops.c:186 [inline]
pc : ntfs_read_folio+0x1d6c/0x1d70 fs/ntfs/aops.c:436
lr : ntfs_read_block fs/ntfs/aops.c:186 [inline]
lr : ntfs_read_folio+0x1d6c/0x1d70 fs/ntfs/aops.c:436
sp : ffff80001e4d7300
x29: ffff80001e4d7480 x28: 1fffe00021b5100e x27: 1fffff800081b624
x26: fffffc00040db120 x25: fffffc00040db100 x24: dfff800000000000
x23: 1fffff800081b624 x22: 0000000000000080 x21: ffff00010da88088
x20: 0000000000000230 x19: ffff00010da88320 x18: 0000000000000150
x17: ffff80019ef20000 x16: ffff80001219e640 x15: 0000000000000000
x14: 0000000000000002 x13: ffff700003c9ae7c x12: 0000000000040000
x11: 000000000000a27e x10: ffff80002319f000 x9 : ffff800009629e40
x8 : 000000000000a27f x7 : 0000000000000000 x6 : ffff800008786160
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000096288ec
x2 : ffffffffffffffc0 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
ntfs_read_block fs/ntfs/aops.c:186 [inline]
ntfs_read_folio+0x1d6c/0x1d70 fs/ntfs/aops.c:436
filemap_read_folio+0x14c/0x39c mm/filemap.c:2407
do_read_cache_folio+0x24c/0x544 mm/filemap.c:3535
do_read_cache_page mm/filemap.c:3577 [inline]
read_cache_page+0x6c/0x180 mm/filemap.c:3586
read_mapping_page include/linux/pagemap.h:756 [inline]
ntfs_map_page fs/ntfs/aops.h:75 [inline]
map_mft_record_page fs/ntfs/mft.c:73 [inline]
map_mft_record+0x198/0x7b4 fs/ntfs/mft.c:156
ntfs_read_locked_inode+0x160/0x38e0 fs/ntfs/inode.c:550
ntfs_read_inode_mount+0xbb0/0x2044 fs/ntfs/inode.c:2098
ntfs_fill_super+0x13b4/0x2314 fs/ntfs/super.c:2855
mount_bdev+0x26c/0x368 fs/super.c:1414
ntfs_mount+0x44/0x58 fs/ntfs/super.c:3049
legacy_get_tree+0xd4/0x16c fs/fs_context.c:610
vfs_get_tree+0x90/0x274 fs/super.c:1544
do_new_mount+0x25c/0x8c8 fs/namespace.c:3040
path_mount+0x590/0xe58 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]
__arm64_sys_mount+0x45c/0x594 fs/namespace.c:3568
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
Code: f9406fe0 97c84fe3 d4210000 97bb6365 (d4210000)
---[ end trace 0000000000000000 ]---


---
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,
May 7, 2023, 2:22:54 AM5/7/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: ca48fc16c493 Linux 6.1.27
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16965c32280000
kernel config: https://syzkaller.appspot.com/x/.config?x=aea4bb7802570997
dashboard link: https://syzkaller.appspot.com/bug?extid=21a0e44e538079fa4e88
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1307cbf4280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11e09232280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ec11c1903c52/disk-ca48fc16.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8ce41c1ad391/vmlinux-ca48fc16.xz
kernel image: https://storage.googleapis.com/syzbot-assets/affba5631cad/Image-ca48fc16.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/3d119a1d401d/mount_0.gz

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

loop0: detected capacity change from 0 to 4096
------------[ cut here ]------------
kernel BUG at fs/ntfs/aops.c:186!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4222 Comm: syz-executor507 Not tainted 6.1.27-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : ntfs_read_block fs/ntfs/aops.c:186 [inline]
pc : ntfs_read_folio+0x1d6c/0x1d70 fs/ntfs/aops.c:436
lr : ntfs_read_block fs/ntfs/aops.c:186 [inline]
lr : ntfs_read_folio+0x1d6c/0x1d70 fs/ntfs/aops.c:436
sp : ffff80001d997300
x29: ffff80001d997480 x28: 1fffe0001c48c00e x27: 1fffff80007043fc
x26: fffffc0003821fe0 x25: fffffc0003821fc0 x24: dfff800000000000
x23: 1fffff80007043fc x22: 0000000000000080 x21: ffff0000e2460088
x20: 0000000000000230 x19: ffff0000e2460320 x18: 0000000000000150
x17: ffff80001558d000 x16: ffff800012034640 x15: 0000000000000000
x14: 0000000000000000 x13: ffff700003b32e7c x12: 0000000000000008
x11: ff808000095de4f0 x10: 0000000000000000 x9 : ffff8000095de4f0
x8 : ffff0000de480000 x7 : 0000000000000000 x6 : ffff800008779b60
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000095dcf9c
x2 : ffffffffffffffc0 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
ntfs_read_block fs/ntfs/aops.c:186 [inline]
ntfs_read_folio+0x1d6c/0x1d70 fs/ntfs/aops.c:436
filemap_read_folio+0x14c/0x39c mm/filemap.c:2407
do_read_cache_folio+0x24c/0x544 mm/filemap.c:3535
do_read_cache_page mm/filemap.c:3577 [inline]
read_cache_page+0x6c/0x180 mm/filemap.c:3586
read_mapping_page include/linux/pagemap.h:756 [inline]
ntfs_map_page fs/ntfs/aops.h:75 [inline]
map_mft_record_page fs/ntfs/mft.c:73 [inline]
map_mft_record+0x198/0x7b4 fs/ntfs/mft.c:156
ntfs_read_locked_inode+0x160/0x38e0 fs/ntfs/inode.c:550
ntfs_read_inode_mount+0xbb0/0x2044 fs/ntfs/inode.c:2098
ntfs_fill_super+0x13b4/0x2314 fs/ntfs/super.c:2855
mount_bdev+0x26c/0x368 fs/super.c:1423
ntfs_mount+0x44/0x58 fs/ntfs/super.c:3049
legacy_get_tree+0xd4/0x16c fs/fs_context.c:610
vfs_get_tree+0x90/0x274 fs/super.c:1553
do_new_mount+0x25c/0x8c8 fs/namespace.c:3040
path_mount+0x590/0xe58 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]
__arm64_sys_mount+0x45c/0x594 fs/namespace.c:3568
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
Code: f9406fe0 97c93dec d4210000 97bc699e (d4210000)
---[ end trace 0000000000000000 ]---


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
May 28, 2024, 11:28:04 PMMay 28
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit 7ffa8f3d30236e0ab897c30bdb01224ff1fe1c89
git tree: upstream
Author: Matthew Wilcox (Oracle) <wi...@infradead.org>
Date: Mon Jan 15 07:20:25 2024 +0000

fs: Remove NTFS classic

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=102be2fc980000
kernel config: https://syzkaller.appspot.com/x/.config?x=3be6d6f79b879a67
dashboard link: https://syzkaller.appspot.com/bug?extid=21a0e44e538079fa4e88
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=171b19b8980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1578a124980000


Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages