[v5.15] BUG: unable to handle kernel NULL pointer dereference in indx_find

2 views
Skip to first unread message

syzbot

unread,
Mar 15, 2023, 2:28:47 AM3/15/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 2ddbd0f967b3 Linux 5.15.102
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17738aecc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=d6af46e4bd7d6a2f
dashboard link: https://syzkaller.appspot.com/bug?extid=27cafb45e85fbef7c95a
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/d46a989959b6/disk-2ddbd0f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4d06a9b2ddaf/vmlinux-2ddbd0f9.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0921009430c0/Image-2ddbd0f9.gz.xz

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

loop5: detected capacity change from 0 to 4096
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Mem abort info:
ESR = 0x0000000086000006
EC = 0x21: IABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x06: level 2 translation fault
user pgtable: 4k pages, 48-bit VAs, pgdp=00000001112aa000
[0000000000000000] pgd=0800000107df8003, p4d=0800000107df8003, pud=08000001150a9003, pmd=0000000000000000
Internal error: Oops: 86000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 10429 Comm: syz-executor.5 Not tainted 5.15.102-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 : 0x0
lr : hdr_find_e+0x298/0x4e8 fs/ntfs3/index.c:708
sp : ffff80001e9b72e0
x29: ffff80001e9b74c0 x28: 0000000000000000 x27: ffff000123590000
x26: 0000000000000000 x25: 0000000000000148 x24: 0000000000000000
x23: dfff800000000000 x22: 0000000000000002 x21: 0000000000000138
x20: ffff0000d7b49268 x19: 0000000000000003 x18: 0000000000000000
x17: ff808000095ecfa8 x16: ffff8000082ed0d4 x15: ffff8000095ecfa8
x14: 00000000ffff8000 x13: ffffffffffffffff x12: 0000000000040000
x11: 000000000003ffff x10: ffff80002153b000 x9 : 0000000000000003
x8 : 0000000000000000 x7 : 0000000000000000 x6 : 000000000000003f
x5 : 0000000000000040 x4 : ffff000123590000 x3 : 0000000000000000
x2 : ffff0000d7b49278 x1 : 0000000000000000 x0 : ffff800011e41000
Call trace:
0x0
indx_find+0x2b4/0x9d4 fs/ntfs3/index.c:1077
dir_search_u+0x180/0x324 fs/ntfs3/dir.c:254
ntfs_extend_init+0x174/0x45c fs/ntfs3/fsntfs.c:214
ntfs_fill_super+0x30dc/0x33ec fs/ntfs3/super.c:1238
get_tree_bdev+0x360/0x54c fs/super.c:1294
ntfs_fs_get_tree+0x28/0x38 fs/ntfs3/super.c:1354
vfs_get_tree+0x90/0x274 fs/super.c:1499
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 <unknown>:584
Code: bad PC value
---[ end trace 6843923a8e0740df ]---


---
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,
Mar 15, 2023, 2:46:42 AM3/15/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 2ddbd0f967b3 Linux 5.15.102
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1437dfb6c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=d6af46e4bd7d6a2f
dashboard link: https://syzkaller.appspot.com/bug?extid=27cafb45e85fbef7c95a
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=1626fb0cc80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1695bc52c80000
mounted in repro: https://storage.googleapis.com/syzbot-assets/3563db52bfec/mount_0.gz

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

loop0: detected capacity change from 0 to 4096
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Mem abort info:
ESR = 0x0000000086000006
EC = 0x21: IABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x06: level 2 translation fault
user pgtable: 4k pages, 48-bit VAs, pgdp=000000010d482000
[0000000000000000] pgd=080000010c185003, p4d=080000010c185003, pud=080000011871e003, pmd=0000000000000000
Internal error: Oops: 86000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 4163 Comm: syz-executor132 Not tainted 5.15.102-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 : 0x0
lr : hdr_find_e+0x298/0x4e8 fs/ntfs3/index.c:708
sp : ffff80001cca72e0
x29: ffff80001cca74c0 x28: 0000000000000000 x27: ffff0000c94f0000
x26: 0000000000000000 x25: 0000000000000148 x24: 0000000000000000
x23: dfff800000000000 x22: 0000000000000002 x21: 0000000000000138
x20: ffff0000d2d34268 x19: 0000000000000003 x18: 0000000000000000
x17: ff808000095ecfa8 x16: ffff80000824ff34 x15: ffff800008a0ca84
x14: ffff800008a093a8 x13: ffffffffffffffff x12: 0000000000000000
x11: ff808000095dc284 x10: 0000000000000000 x9 : 0000000000000003
x8 : 0000000000000000 x7 : 0000000000000000 x6 : 000000000000003f
x5 : 0000000000000040 x4 : ffff0000c94f0000 x3 : 0000000000000000
x2 : ffff0000d2d34278 x1 : 0000000000000000 x0 : ffff800011e41000
Call trace:
0x0
indx_find+0x2b4/0x9d4 fs/ntfs3/index.c:1077
dir_search_u+0x180/0x324 fs/ntfs3/dir.c:254
ntfs_extend_init+0x174/0x45c fs/ntfs3/fsntfs.c:214
ntfs_fill_super+0x30dc/0x33ec fs/ntfs3/super.c:1238
get_tree_bdev+0x360/0x54c fs/super.c:1294
ntfs_fs_get_tree+0x28/0x38 fs/ntfs3/super.c:1354
vfs_get_tree+0x90/0x274 fs/super.c:1499
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 <unknown>:584
Code: bad PC value
---[ end trace da0136dc87597ff3 ]---

syzbot

unread,
Mar 15, 2023, 3:08:59 AM3/15/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 6449a0ba6843 Linux 6.1.19
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1637dfb6c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=75eadb21ef1208e4
dashboard link: https://syzkaller.appspot.com/bug?extid=fb47583aa23a75ceb904
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=1307acdcc80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1326d472c80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/dc227ecd3e21/disk-6449a0ba.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1d08e21b50c2/vmlinux-6449a0ba.xz
kernel image: https://storage.googleapis.com/syzbot-assets/71a43f2c4d2c/Image-6449a0ba.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/b00b92d5bcdd/mount_0.gz

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

loop0: detected capacity change from 0 to 4096
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Mem abort info:
ESR = 0x0000000086000006
EC = 0x21: IABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x06: level 2 translation fault
user pgtable: 4k pages, 48-bit VAs, pgdp=000000010d655000
[0000000000000000] pgd=080000010ae6d003, p4d=080000010ae6d003, pud=0800000109d5a003, pmd=0000000000000000
Internal error: Oops: 0000000086000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 4380 Comm: syz-executor357 Not tainted 6.1.19-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 : 0x0
lr : hdr_find_e+0x298/0x4e8 fs/ntfs3/index.c:708
sp : ffff80001db27320
x29: ffff80001db27500 x28: 0000000000000000 x27: ffff0000d012e000
x26: 0000000000000000 x25: 0000000000000148 x24: 0000000000000000
x23: dfff800000000000 x22: 0000000000000002 x21: 0000000000000138
x20: ffff0000d81fa268 x19: 0000000000000003 x18: 1fffe000368b0376
x17: ffff80001572d000 x16: ffff8000121a2680 x15: ffff800008ad6924
x14: ffff800008ad36c8 x13: 0000000000000000 x12: 0000000000000004
x11: ff808000096f6f70 x10: 0000000000000000 x9 : 0000000000000003
x8 : 0000000000000000 x7 : 0000000000000000 x6 : 000000000000003f
x5 : 0000000000000040 x4 : ffff0000d012e000 x3 : 0000000000000000
x2 : ffff0000d81fa278 x1 : 0000000000000000 x0 : ffff8000126b3260
Call trace:
0x0
indx_find+0x2b0/0x9b8 fs/ntfs3/index.c:1074
dir_search_u+0x180/0x324 fs/ntfs3/dir.c:254
ntfs_extend_init+0x174/0x45c fs/ntfs3/fsntfs.c:214
ntfs_fill_super+0x36e8/0x3a04 fs/ntfs3/super.c:1243
get_tree_bdev+0x360/0x54c fs/super.c:1337
ntfs_fs_get_tree+0x28/0x38 fs/ntfs3/super.c:1359
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: bad PC value
---[ 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 can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Sep 23, 2023, 9:22:16 AM9/23/23
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 000a9a72efa4a9df289bab9c9e8ba1639c72e0d6
Author: Konstantin Komarov <almaz.ale...@paragon-software.com>
Date: Mon Oct 10 10:15:33 2022 +0000

fs/ntfs3: Check fields while reading

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=142182ec680000
start commit: 7eaef76fbc46 Linux 6.1.20
git tree: linux-6.1.y
kernel config: https://syzkaller.appspot.com/x/.config?x=29ad3fe3c7b61175
dashboard link: https://syzkaller.appspot.com/bug?extid=fb47583aa23a75ceb904
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10f29aeec80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1241fc36c80000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: fs/ntfs3: Check fields while reading

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