general protection fault in kernfs_name_hash

10 views
Skip to first unread message

syzbot

unread,
Jul 9, 2022, 10:13:28 PM7/9/22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 569d38047a0f UPSTREAM: usb: common: add function to get in..
git tree: android12-5.4
console output: https://syzkaller.appspot.com/x/log.txt?x=144c822c080000
kernel config: https://syzkaller.appspot.com/x/.config?x=94979c591be989b1
dashboard link: https://syzkaller.appspot.com/bug?extid=95f079df0dbb98d86bd3
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2

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

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

RBP: 00007f66b97f805d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffeeb12adf R14: 00007f66b8914300 R15: 0000000000022000
---[ end trace 0360cad81487266f ]---
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: 515 Comm: syz-executor.0 Tainted: G W 5.4.190-syzkaller-00003-g569d38047a0f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
RIP: 0010:strlen+0x2a/0x60 lib/string.c:551
Code: 41 57 41 56 41 54 53 49 89 fe 48 c7 c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 66 90 49 89 c4 48 89 d8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 12 48 ff c3 49 8d 44 24 01 43 80 7c 26 01
RSP: 0018:ffff8881e36ffc70 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8881f5dc1f80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81b05b29 R09: ffffed103c6dff9b
R10: ffffed103c6dff9b R11: 1ffff1103c6dff9a R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 00007f66b8914700(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000000000c CR3: 00000001edd1a000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kernfs_name_hash+0x1e/0x220 fs/kernfs/dir.c:302
kernfs_find_ns+0x6b/0x260 fs/kernfs/dir.c:847
kernfs_remove_by_name_ns+0x32/0x90 fs/kernfs/dir.c:1510
del_gendisk+0x92d/0xb60 block/genhd.c:833
loop_remove+0x42/0xa0 drivers/block/loop.c:2189
loop_control_ioctl+0x547/0x600 drivers/block/loop.c:2288
do_vfs_ioctl+0x6d1/0x15b0 fs/ioctl.c:47
ksys_ioctl fs/ioctl.c:742 [inline]
__do_sys_ioctl fs/ioctl.c:749 [inline]
__se_sys_ioctl fs/ioctl.c:747 [inline]
__x64_sys_ioctl+0xd4/0x110 fs/ioctl.c:747
do_syscall_64+0xcb/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f66b979e109
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f66b8914168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f66b98b0f60 RCX: 00007f66b979e109
RDX: 000000000000000c RSI: 0000000000004c81 RDI: 0000000000000003
RBP: 00007f66b97f805d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffeeb12adf R14: 00007f66b8914300 R15: 0000000000022000
Modules linked in:
---[ end trace 0360cad814872670 ]---
RIP: 0010:strlen+0x2a/0x60 lib/string.c:551
Code: 41 57 41 56 41 54 53 49 89 fe 48 c7 c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 66 90 49 89 c4 48 89 d8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 12 48 ff c3 49 8d 44 24 01 43 80 7c 26 01
RSP: 0018:ffff8881e36ffc70 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8881f5dc1f80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81b05b29 R09: ffffed103c6dff9b
R10: ffffed103c6dff9b R11: 1ffff1103c6dff9a R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 00007f66b8914700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffff991e020 CR3: 00000001edd1a000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 41 57 push %r15
2: 41 56 push %r14
4: 41 54 push %r12
6: 53 push %rbx
7: 49 89 fe mov %rdi,%r14
a: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax
11: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15
18: fc ff df
1b: 48 89 fb mov %rdi,%rbx
1e: 66 90 xchg %ax,%ax
20: 49 89 c4 mov %rax,%r12
23: 48 89 d8 mov %rbx,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 0f b6 04 38 movzbl (%rax,%r15,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 75 12 jne 0x45
33: 48 ff c3 inc %rbx
36: 49 8d 44 24 01 lea 0x1(%r12),%rax
3b: 43 rex.XB
3c: 80 .byte 0x80
3d: 7c 26 jl 0x65
3f: 01 .byte 0x1


---
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,
Jul 9, 2022, 10:43:29 PM7/9/22
to syzkaller-a...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 569d38047a0f UPSTREAM: usb: common: add function to get in..
git tree: android12-5.4
console+strace: https://syzkaller.appspot.com/x/log.txt?x=141fdd14080000
kernel config: https://syzkaller.appspot.com/x/.config?x=94979c591be989b1
dashboard link: https://syzkaller.appspot.com/bug?extid=95f079df0dbb98d86bd3
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16f6850c080000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1002a4b2080000

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

RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f5a9ffd70c9
RDX: 000000000000000c RSI: 0000000000004c81 RDI: 0000000000000005
RBP: 00007ffcb8aeb9a0 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000004
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
---[ end trace 4dd36d4c050ce025 ]---
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: 345 Comm: syz-executor217 Tainted: G W 5.4.190-syzkaller-00003-g569d38047a0f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
RIP: 0010:strlen+0x2a/0x60 lib/string.c:551
Code: 41 57 41 56 41 54 53 49 89 fe 48 c7 c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 66 90 49 89 c4 48 89 d8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 12 48 ff c3 49 8d 44 24 01 43 80 7c 26 01
RSP: 0018:ffff8881f55efc70 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8881dc6e2f40
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81b05b29 R09: ffffed103eabdf9b
R10: ffffed103eabdf9b R11: 1ffff1103eabdf9a R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 0000555555c67300(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcb8aeb968 CR3: 00000001f1edf000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kernfs_name_hash+0x1e/0x220 fs/kernfs/dir.c:302
kernfs_find_ns+0x6b/0x260 fs/kernfs/dir.c:847
kernfs_remove_by_name_ns+0x32/0x90 fs/kernfs/dir.c:1510
del_gendisk+0x92d/0xb60 block/genhd.c:833
loop_remove+0x42/0xa0 drivers/block/loop.c:2189
loop_control_ioctl+0x547/0x600 drivers/block/loop.c:2288
do_vfs_ioctl+0x6d1/0x15b0 fs/ioctl.c:47
ksys_ioctl fs/ioctl.c:742 [inline]
__do_sys_ioctl fs/ioctl.c:749 [inline]
__se_sys_ioctl fs/ioctl.c:747 [inline]
__x64_sys_ioctl+0xd4/0x110 fs/ioctl.c:747
do_syscall_64+0xcb/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f5a9ffd70c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007ffcb8aeb988 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f5a9ffd70c9
RDX: 000000000000000c RSI: 0000000000004c81 RDI: 0000000000000005
RBP: 00007ffcb8aeb9a0 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000004
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 4dd36d4c050ce026 ]---
RIP: 0010:strlen+0x2a/0x60 lib/string.c:551
Code: 41 57 41 56 41 54 53 49 89 fe 48 c7 c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 66 90 49 89 c4 48 89 d8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 12 48 ff c3 49 8d 44 24 01 43 80 7c 26 01
RSP: 0018:ffff8881f55efc70 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8881dc6e2f40
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81b05b29 R09: ffffed103eabdf9b
R10: ffffed103eabdf9b R11: 1ffff1103eabdf9a R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 0000555555c67300(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcb8aeb968 CR3: 00000001f1edf000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Reply all
Reply to author
Forward
0 new messages