[v6.1] BUG: unable to handle kernel paging request in hfs_find_init

0 views
Skip to first unread message

syzbot

unread,
Mar 13, 2023, 6:13:53 AM3/13/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 1cc3fcf63192 Linux 6.1.18
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=140bdb42c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=157296d36f92ea19
dashboard link: https://syzkaller.appspot.com/bug?extid=7c669e7491fdbacd64b2
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/0e4c0d43698b/disk-1cc3fcf6.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a4de39d735de/vmlinux-1cc3fcf6.xz
kernel image: https://storage.googleapis.com/syzbot-assets/82bab928f6e3/Image-1cc3fcf6.gz.xz

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

loop1: detected capacity change from 0 to 23
hfs: unable to locate alternate MDB
hfs: continuing without an alternate MDB
Unable to handle kernel paging request at virtual address dfff800000000008
KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047]
Mem abort info:
ESR = 0x0000000096000006
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x06: level 2 translation fault
Data abort info:
ISV = 0, ISS = 0x00000006
CM = 0, WnR = 0
[dfff800000000008] address between user and kernel address ranges
Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 18393 Comm: syz-executor.1 Not tainted 6.1.18-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 : hfs_find_init+0x6c/0x1c8 fs/hfs/bfind.c:21
lr : hfs_find_init+0x30/0x1c8 fs/hfs/bfind.c:16
sp : ffff800021d37010
x29: ffff800021d37010 x28: ffff7000043a6e18 x27: 0000000000000000
x26: ffff0000c9754900 x25: 0000000000000008 x24: dfff800000000000
x23: ffff0000c97548cc x22: ffff800021d370f8 x21: 0000000000000040
x20: ffff800021d370e0 x19: 0000000000000000 x18: ffff800021d36b80
x17: ffff80001572d000 x16: ffff8000121a26c0 x15: 0000000000000000
x14: 00000000f43d3392 x13: dfff800000000000 x12: 0000000000040000
x11: 000000000001290e x10: ffff8000227c9000 x9 : ffff8000090ad410
x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
x5 : ffff800018a41a40 x4 : 0000000000000000 x3 : 0000000000000030
x2 : 0000000000000008 x1 : ffff800021d370e0 x0 : ffff800021d370f0
Call trace:
hfs_find_init+0x6c/0x1c8 fs/hfs/bfind.c:21
hfs_ext_read_extent fs/hfs/extent.c:200 [inline]
hfs_get_block+0x29c/0x9e0 fs/hfs/extent.c:366
block_read_full_folio+0x2f4/0x98c fs/buffer.c:2271
hfs_read_folio+0x28/0x38 fs/hfs/inode.c:39
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]
hfs_btree_open+0x440/0x1010 fs/hfs/btree.c:78
hfs_mdb_get+0x10cc/0x1c2c fs/hfs/mdb.c:199
hfs_fill_super+0xd64/0x13b4 fs/hfs/super.c:406
mount_bdev+0x26c/0x368 fs/super.c:1414
hfs_mount+0x44/0x58 fs/hfs/super.c:456
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: 97e33c04 91010275 f90002df d343feb9 (38f86b28)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: 97e33c04 bl 0xffffffffff8cf010
4: 91010275 add x21, x19, #0x40
8: f90002df str xzr, [x22]
c: d343feb9 lsr x25, x21, #3
* 10: 38f86b28 ldrsb w8, [x25, x24] <-- trapping instruction


---
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,
Jun 17, 2023, 4:40:04 PM6/17/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: ca87e77a2ef8 Linux 6.1.34
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16e2a497280000
kernel config: https://syzkaller.appspot.com/x/.config?x=143044f84cdceac2
dashboard link: https://syzkaller.appspot.com/bug?extid=7c669e7491fdbacd64b2
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=14f005bb280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14e278ff280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1141c37ce351/disk-ca87e77a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/de1fca0d0bb4/vmlinux-ca87e77a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c3417b70e0bf/Image-ca87e77a.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/db4bf03d27f3/mount_0.gz

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

loop0: detected capacity change from 0 to 64
Unable to handle kernel paging request at virtual address dfff800000000008
KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047]
Mem abort info:
ESR = 0x0000000096000006
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x06: level 2 translation fault
Data abort info:
ISV = 0, ISS = 0x00000006
CM = 0, WnR = 0
[dfff800000000008] address between user and kernel address ranges
Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4222 Comm: syz-executor842 Not tainted 6.1.34-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : hfs_find_init+0x6c/0x1c8 fs/hfs/bfind.c:21
lr : hfs_find_init+0x30/0x1c8 fs/hfs/bfind.c:16
sp : ffff80001d9b6ff0
x29: ffff80001d9b6ff0 x28: ffff700003b36e14 x27: 0000000000000000
x26: ffff0000d8810180 x25: 0000000000000008 x24: dfff800000000000
x23: ffff0000d881014c x22: ffff80001d9b70d8 x21: 0000000000000040
x20: ffff80001d9b70c0 x19: 0000000000000000 x18: ffff80001d9b6b60
x17: ffff8000155bd000 x16: ffff800012054680 x15: 000000000000ad9a
x14: 00000000b4ed0b6f x13: dfff800000000000 x12: 0000000000000007
x11: ff8080000908f2e8 x10: 0000000000000000 x9 : ffff80000908f2e8
x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
x5 : ffff8000187669c8 x4 : 0000000000000000 x3 : 0000000000000030
x2 : 0000000000000008 x1 : ffff80001d9b70c0 x0 : ffff80001d9b70d0
Call trace:
hfs_find_init+0x6c/0x1c8 fs/hfs/bfind.c:21
hfs_ext_read_extent fs/hfs/extent.c:200 [inline]
hfs_get_block+0x29c/0x9e0 fs/hfs/extent.c:366
block_read_full_folio+0x2f4/0x98c fs/buffer.c:2271
hfs_read_folio+0x28/0x38 fs/hfs/inode.c:39
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]
hfs_btree_open+0x440/0x1010 fs/hfs/btree.c:78
hfs_mdb_get+0x10cc/0x1c2c fs/hfs/mdb.c:199
hfs_fill_super+0xd64/0x13b4 fs/hfs/super.c:406
mount_bdev+0x274/0x370 fs/super.c:1423
hfs_mount+0x44/0x58 fs/hfs/super.c:456
legacy_get_tree+0xd4/0x16c fs/fs_context.c:610
vfs_get_tree+0x90/0x274 fs/super.c:1553
do_new_mount+0x25c/0x8c4 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: 97e3779f 91010275 f90002df d343feb9 (38f86b28)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: 97e3779f bl 0xffffffffff8dde7c
4: 91010275 add x21, x19, #0x40
8: f90002df str xzr, [x22]
c: d343feb9 lsr x25, x21, #3
* 10: 38f86b28 ldrsb w8, [x25, x24] <-- trapping instruction


---
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.
Reply all
Reply to author
Forward
0 new messages