[v6.1] kernel BUG in ntfs_iget

0 views
Skip to first unread message

syzbot

unread,
May 13, 2023, 8:47:55 PM5/13/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: bf4ad6fa4e53 Linux 6.1.28
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12c4226e280000
kernel config: https://syzkaller.appspot.com/x/.config?x=ee1a89a0c6a2db67
dashboard link: https://syzkaller.appspot.com/bug?extid=1ff3652b68ef82812137
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=109dae3a280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1520926e280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/a7b85a636ba8/disk-bf4ad6fa.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a626aeb9d231/vmlinux-bf4ad6fa.xz
kernel image: https://storage.googleapis.com/syzbot-assets/78fbbffb9ee8/Image-bf4ad6fa.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/b126a89bef41/mount_0.gz

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

ntfs: (device loop0): ntfs_read_locked_inode(): Failed with error code -5. Marking corrupt inode 0x1 as bad. Run chkdsk.
ntfs: (device loop0): load_system_files(): Failed to load $MFTMirr. Mounting read-only. Run ntfsfix and/or chkdsk.
------------[ cut here ]------------
kernel BUG at fs/ntfs/malloc.h:31!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 4216 Comm: syz-executor222 Not tainted 6.1.28-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_malloc fs/ntfs/malloc.h:31 [inline]
pc : ntfs_malloc_nofs+0x10c/0x110 fs/ntfs/malloc.h:52
lr : __ntfs_malloc fs/ntfs/malloc.h:31 [inline]
lr : ntfs_malloc_nofs+0x10c/0x110 fs/ntfs/malloc.h:52
sp : ffff80001d987560
x29: ffff80001d987560 x28: ffff0000e24098c0 x27: ffff0000e2409a84
x26: 0000000000000000 x25: dfff800000000000 x24: ffff0001886d3118
x23: ffff0001886d3000 x22: ffff0000e2409c20 x21: 1fffe000310da623
x20: ffff0000de144000 x19: 0000000000000000 x18: 1fffe000368b6776
x17: ffff80001558d000 x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000000 x13: 00000000fffffffe x12: 0000000000000001
x11: ff80800009610f90 x10: 0000000000000000 x9 : ffff800009610f90
x8 : ffff0000d5763780 x7 : ffff0000d2beb180 x6 : ffff0000d2beb180
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff800009610fbc
x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
__ntfs_malloc fs/ntfs/malloc.h:31 [inline]
ntfs_malloc_nofs+0x10c/0x110 fs/ntfs/malloc.h:52
ntfs_read_locked_inode+0x1834/0x38e0 fs/ntfs/inode.c:703
ntfs_iget+0x110/0x19c fs/ntfs/inode.c:177
load_and_init_upcase fs/ntfs/super.c:1655 [inline]
load_system_files+0x1728/0x4734 fs/ntfs/super.c:1810
ntfs_fill_super+0x14e0/0x2314 fs/ntfs/super.c:2892
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: 97bba6d0 aa1f03e0 17ffffdf 97bba6cd (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.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

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.

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
May 15, 2023, 3:12:53 AM5/15/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b0ece631f84a Linux 5.15.111
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=160d834e280000
kernel config: https://syzkaller.appspot.com/x/.config?x=db3750b003ff805e
dashboard link: https://syzkaller.appspot.com/bug?extid=2a0cbbd463aec4712bb9
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=1040e2b2280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1402f4ba280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eded75b6c3f9/disk-b0ece631.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/20e5ae802010/vmlinux-b0ece631.xz
kernel image: https://storage.googleapis.com/syzbot-assets/05d665c869f3/Image-b0ece631.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/bdedb37c867e/mount_0.gz

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

ntfs: (device loop0): ntfs_read_locked_inode(): Failed with error code -5. Marking corrupt inode 0x1 as bad. Run chkdsk.
ntfs: (device loop0): load_system_files(): Failed to load $MFTMirr. Mounting read-only. Run ntfsfix and/or chkdsk.
------------[ cut here ]------------
kernel BUG at fs/ntfs/malloc.h:31!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 3962 Comm: syz-executor373 Not tainted 5.15.111-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_malloc fs/ntfs/malloc.h:31 [inline]
pc : ntfs_malloc_nofs+0x10c/0x110 fs/ntfs/malloc.h:52
lr : __ntfs_malloc fs/ntfs/malloc.h:31 [inline]
lr : ntfs_malloc_nofs+0x10c/0x110 fs/ntfs/malloc.h:52
sp : ffff80001c947500
x29: ffff80001c947500 x28: ffff0000dd0198c0 x27: ffff0000dd019a84
x26: 0000000000000000 x25: dfff800000000000 x24: ffff0000d9c90118
x23: ffff0000d9c90000 x22: ffff0000dd019c20 x21: 1fffe0001b392023
x20: ffff0000da169800 x19: 0000000000000000 x18: 0000000000000000
x17: ff80800009527850 x16: 0000000000000000 x15: ffff800009527850
x14: 00000000fffffffe x13: ffffffffffffffff x12: 0000000000000000
x11: ff80800009530704 x10: 0000000000000000 x9 : ffff800009530704
x8 : ffff0000dcfb51c0 x7 : ffff0000d64c8180 x6 : ffff0000d64c8180
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff800009530730
x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
__ntfs_malloc fs/ntfs/malloc.h:31 [inline]
ntfs_malloc_nofs+0x10c/0x110 fs/ntfs/malloc.h:52
ntfs_read_locked_inode+0x1838/0x38f0 fs/ntfs/inode.c:703
ntfs_iget+0x110/0x19c fs/ntfs/inode.c:177
load_and_init_upcase fs/ntfs/super.c:1655 [inline]
load_system_files+0x14cc/0x4228 fs/ntfs/super.c:1810
ntfs_fill_super+0x1670/0x24e8 fs/ntfs/super.c:2894
mount_bdev+0x26c/0x368 fs/super.c:1378
ntfs_mount+0x44/0x58 fs/ntfs/super.c:3051
legacy_get_tree+0xd4/0x16c fs/fs_context.c:610
vfs_get_tree+0x90/0x274 fs/super.c:1508
do_new_mount+0x25c/0x8c8 fs/namespace.c:2994
path_mount+0x590/0x104c fs/namespace.c:3324
do_mount fs/namespace.c:3337 [inline]
__do_sys_mount fs/namespace.c:3545 [inline]
__se_sys_mount fs/namespace.c:3522 [inline]
__arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3522
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Code: 97be48a8 aa1f03e0 17ffffdf 97be48a5 (d4210000)
---[ end trace 0831807d8e2207ac ]---
Reply all
Reply to author
Forward
0 new messages