general protection fault in hfs_find_init

10 views
Skip to first unread message

syzbot

unread,
Nov 26, 2022, 4:41:37 PM11/26/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=162b8bc5880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=28ba727393808920094c
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1327f0ad880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11ad363d880000

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
mounted in repro: https://storage.googleapis.com/syzbot-assets/25bc0c0d2de1/mount_0.gz

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

WARNING: the mand mount option is being deprecated and
will be removed in v5.15!
======================================================
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8078 Comm: syz-executor184 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:hfs_find_init+0x70/0x230 fs/hfs/bfind.c:21
Code: c1 ea 03 80 3c 02 00 0f 85 bc 01 00 00 4c 8d 6b 40 48 c7 45 18 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 6b 01 00 00 8b 43 40 be c0 00
RSP: 0018:ffff8880aee0f530 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff81fe0980
RDX: 0000000000000008 RSI: ffffffff81fd1c41 RDI: ffff8880aee0f5b0
RBP: ffff8880aee0f598 R08: 0000000000000000 R09: 0000000000000004
R10: 0000000000000004 R11: 0000000000074071 R12: ffff8880b1642a40
R13: 0000000000000040 R14: ffff8880b2f3d772 R15: ffff8880aee0f598
FS: 0000555556a0b300(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcf9a4d000 CR3: 00000000af4bb000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
hfs_ext_read_extent+0x191/0xa20 fs/hfs/extent.c:200
hfs_get_block+0x53d/0x7e0 fs/hfs/extent.c:366
block_read_full_page+0x288/0xd10 fs/buffer.c:2259
do_read_cache_page+0x533/0x1170 mm/filemap.c:2828
read_mapping_page include/linux/pagemap.h:402 [inline]
hfs_btree_open+0x6ae/0x1430 fs/hfs/btree.c:78
hfs_mdb_get+0x1402/0x1cf0 fs/hfs/mdb.c:193
hfs_fill_super+0xd6a/0x1310 fs/hfs/super.c:413
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f57a8e30b1a
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcf9a4c4a8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f57a8e30b1a
RDX: 0000000020000080 RSI: 0000000020000280 RDI: 00007ffcf9a4c4b0
RBP: 00007ffcf9a4c4b0 R08: 00007ffcf9a4c4f0 R09: 0000000000000255
R10: 00000000010184c9 R11: 0000000000000286 R12: 0000000000000004
R13: 0000555556a0b2c0 R14: 00007ffcf9a4c4f0 R15: 0000000000000000
Modules linked in:
---[ end trace ad09a926451e2b94 ]---
RIP: 0010:hfs_find_init+0x70/0x230 fs/hfs/bfind.c:21
Code: c1 ea 03 80 3c 02 00 0f 85 bc 01 00 00 4c 8d 6b 40 48 c7 45 18 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 6b 01 00 00 8b 43 40 be c0 00
RSP: 0018:ffff8880aee0f530 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff81fe0980
RDX: 0000000000000008 RSI: ffffffff81fd1c41 RDI: ffff8880aee0f5b0
RBP: ffff8880aee0f598 R08: 0000000000000000 R09: 0000000000000004
R10: 0000000000000004 R11: 0000000000074071 R12: ffff8880b1642a40
R13: 0000000000000040 R14: ffff8880b2f3d772 R15: ffff8880aee0f598
FS: 0000555556a0b300(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcf9a4d000 CR3: 00000000af4bb000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: c1 ea 03 shr $0x3,%edx
3: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
7: 0f 85 bc 01 00 00 jne 0x1c9
d: 4c 8d 6b 40 lea 0x40(%rbx),%r13
11: 48 c7 45 18 00 00 00 movq $0x0,0x18(%rbp)
18: 00
19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
20: fc ff df
23: 4c 89 ea mov %r13,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax <-- trapping instruction
2e: 84 c0 test %al,%al
30: 74 08 je 0x3a
32: 3c 03 cmp $0x3,%al
34: 0f 8e 6b 01 00 00 jle 0x1a5
3a: 8b 43 40 mov 0x40(%rbx),%eax
3d: be .byte 0xbe
3e: c0 .byte 0xc0


---
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,
Dec 3, 2022, 6:10:43 AM12/3/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 179ef7fe8677 Linux 4.14.300
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17acd229880000
kernel config: https://syzkaller.appspot.com/x/.config?x=aa85f51ec321d5a9
dashboard link: https://syzkaller.appspot.com/bug?extid=68cdae5d607588257e70
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14f123ad880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1798f153880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d311ef57b59a/disk-179ef7fe.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/25bf5d729f69/vmlinux-179ef7fe.xz
kernel image: https://storage.googleapis.com/syzbot-assets/db9b96571e69/bzImage-179ef7fe.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/a17bf2bcebf9/mount_0.gz

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

kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 8015 Comm: syz-executor481 Not tainted 4.14.300-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
task: ffff8880961de000 task.stack: ffff888095b30000
RIP: 0010:hfs_find_init+0x70/0x220 fs/hfs/bfind.c:21
RSP: 0018:ffff888095b37600 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000008 RSI: ffff888095b37668 RDI: ffff888095b37680
RBP: ffff888095b37668 R08: 0000000000000000 R09: ffffffff8ae15f04
R10: 00000000001466e9 R11: ffff8880961de000 R12: 0000000000000004
R13: 0000000000000040 R14: ffff8880b2eff772 R15: ffff888095b37668
FS: 0000555556af2300(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055e3c75d0ea0 CR3: 00000000ac2f3000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
hfs_ext_read_extent+0x15e/0x930 fs/hfs/extent.c:200
hfs_get_block+0x453/0x6d0 fs/hfs/extent.c:366
block_read_full_page+0x25e/0x8d0 fs/buffer.c:2316
do_read_cache_page+0x38e/0xc10 mm/filemap.c:2713
read_mapping_page include/linux/pagemap.h:398 [inline]
hfs_btree_open+0x667/0x1300 fs/hfs/btree.c:78
hfs_mdb_get+0x129c/0x1b40 fs/hfs/mdb.c:193
hfs_fill_super+0xcdb/0x1250 fs/hfs/super.c:413
mount_bdev+0x2b3/0x360 fs/super.c:1134
mount_fs+0x92/0x2a0 fs/super.c:1237
vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2572 [inline]
do_mount+0xe65/0x2a30 fs/namespace.c:2905
SYSC_mount fs/namespace.c:3121 [inline]
SyS_mount+0xa8/0x120 fs/namespace.c:3098
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x5e/0xd3
Code: 48 c1 ea 03 80 3c 02 00 0f 85 ad 01 00 00 4c 8d 6b 40 48 c7 45 18 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 5c 01 00 00 8b 43 40 be c0
RIP: hfs_find_init+0x70/0x220 fs/hfs/bfind.c:21 RSP: ffff888095b37600
---[ end trace db275c7a785fcc4e ]---
----------------
Code disassembly (best guess):
0: 48 c1 ea 03 shr $0x3,%rdx
4: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
8: 0f 85 ad 01 00 00 jne 0x1bb
e: 4c 8d 6b 40 lea 0x40(%rbx),%r13
12: 48 c7 45 18 00 00 00 movq $0x0,0x18(%rbp)
19: 00
1a: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
21: fc ff df
24: 4c 89 ea mov %r13,%rdx
27: 48 c1 ea 03 shr $0x3,%rdx
* 2b: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 74 08 je 0x3b
33: 3c 03 cmp $0x3,%al
35: 0f 8e 5c 01 00 00 jle 0x197
3b: 8b 43 40 mov 0x40(%rbx),%eax
3e: be .byte 0xbe
3f: c0 .byte 0xc0
Reply all
Reply to author
Forward
0 new messages