general protection fault in kernfs_find_ns (2)

10 views
Skip to first unread message

syzbot

unread,
Oct 24, 2021, 4:02:25 PM10/24/21
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: eb4a5a5dbd5b ANDROID: ion heap: init ion heaps in subsys_i..
git tree: android12-5.4
console output: https://syzkaller.appspot.com/x/log.txt?x=1245bf1cb00000
kernel config: https://syzkaller.appspot.com/x/.config?x=170af3624e04993e
dashboard link: https://syzkaller.appspot.com/bug?extid=d1074aaa6bf5e1eb925c
compiler: Debian clang version 11.0.1-2, 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+d1074a...@syzkaller.appspotmail.com

R13: 00007fff36c8ea3f R14: 00007f14562d4300 R15: 0000000000022000
---[ end trace 7aed1b66616f08d6 ]---
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: 0 PID: 1505 Comm: syz-executor.1 Tainted: G W 5.4.147-syzkaller-00036-geb4a5a5dbd5b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:strlen+0x27/0x60 lib/string.c:551
Code: 0f 1f 00 41 57 41 56 53 49 89 fe 49 bf 00 00 00 00 00 fc ff df 48 89 f8 66 66 2e 0f 1f 84 00 00 00 00 00 48 89 c3 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 0b 48 8d 43 01 80 3b 00 75 e7 eb 13 89 d9
RSP: 0018:ffff8881e5ccfcd0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000200001
RDX: 0000000000200000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81b1affb R09: 000000000000ffff
R10: ffffc9000bba1000 R11: 0000000000000000 R12: ffff8881f18e33e8
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 00007f14562d4700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2db34000 CR3: 00000001e5d95000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kernfs_name_hash fs/kernfs/dir.c:302 [inline]
kernfs_find_ns+0x83/0x430 fs/kernfs/dir.c:847
kernfs_remove_by_name_ns+0x32/0x90 fs/kernfs/dir.c:1510
del_gendisk+0x93d/0xb70 block/genhd.c:833
loop_remove drivers/block/loop.c:2189 [inline]
loop_control_ioctl+0x563/0x680 drivers/block/loop.c:2288
do_vfs_ioctl+0x6fb/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/0x1e0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f145855da39
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f14562d4188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f1458660f60 RCX: 00007f145855da39
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003
RBP: 00007f14585b7e8f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff36c8ea3f R14: 00007f14562d4300 R15: 0000000000022000
Modules linked in:
---[ end trace 7aed1b66616f08d7 ]---
RIP: 0010:strlen+0x27/0x60 lib/string.c:551
Code: 0f 1f 00 41 57 41 56 53 49 89 fe 49 bf 00 00 00 00 00 fc ff df 48 89 f8 66 66 2e 0f 1f 84 00 00 00 00 00 48 89 c3 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 0b 48 8d 43 01 80 3b 00 75 e7 eb 13 89 d9
RSP: 0018:ffff8881e5ccfcd0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000200001
RDX: 0000000000200000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81b1affb R09: 000000000000ffff
R10: ffffc9000bba1000 R11: 0000000000000000 R12: ffff8881f18e33e8
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 00007f14562d4700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2db34000 CR3: 00000001e5d95000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 0f 1f 00 nopl (%rax)
3: 41 57 push %r15
5: 41 56 push %r14
7: 53 push %rbx
8: 49 89 fe mov %rdi,%r14
b: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15
12: fc ff df
15: 48 89 f8 mov %rdi,%rax
18: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1)
1f: 00 00 00 00
23: 48 89 c3 mov %rax,%rbx
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 0b jne 0x3e
33: 48 8d 43 01 lea 0x1(%rbx),%rax
37: 80 3b 00 cmpb $0x0,(%rbx)
3a: 75 e7 jne 0x23
3c: eb 13 jmp 0x51
3e: 89 d9 mov %ebx,%ecx


---
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,
Dec 20, 2021, 12:50:25 PM12/20/21
to syzkaller-a...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 5b673be0c6b0 FROMGIT: USB: gadget: bRequestType is a bitfi..
git tree: android12-5.4
console output: https://syzkaller.appspot.com/x/log.txt?x=165dab43b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=8844969a6709ae53
dashboard link: https://syzkaller.appspot.com/bug?extid=d1074aaa6bf5e1eb925c
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1145f035b00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14f46ea5b00000

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

RAX: ffffffffffffffda RBX: 0000000000006836 RCX: 00007f80bedeb079
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 00007ffc7f375ed0 R11: 0000000000000246 R12: 00007ffc7f37646c
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
---[ end trace bc09616a01caeb4a ]---
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: 304 Comm: syz-executor625 Tainted: G W 5.4.147-syzkaller-00015-g5b673be0c6b0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:strlen+0x27/0x60 lib/string.c:551 lib/string.c:551
Code: 0f 1f 00 41 57 41 56 53 49 89 fe 49 bf 00 00 00 00 00 fc ff df 48 89 f8 66 66 2e 0f 1f 84 00 00 00 00 00 48 89 c3 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 0b 48 8d 43 01 80 3b 00 75 e7 eb 13 89 d9
RSP: 0018:ffff8881de577cd0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81b1b57b R09: ffffed103bcaefa0
R10: ffffed103bcaefa0 R11: 0000000000000000 R12: ffff8881f18e4640
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 0000555555d28300(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f80bee5c130 CR3: 00000001de43a000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
kernfs_name_hash fs/kernfs/dir.c:302 [inline]
kernfs_name_hash fs/kernfs/dir.c:302 [inline] fs/kernfs/dir.c:847
kernfs_find_ns+0x83/0x430 fs/kernfs/dir.c:847 fs/kernfs/dir.c:847
kernfs_remove_by_name_ns+0x32/0x90 fs/kernfs/dir.c:1510 fs/kernfs/dir.c:1510
del_gendisk+0x93d/0xb70 block/genhd.c:833 block/genhd.c:833
loop_remove drivers/block/loop.c:2189 [inline]
loop_remove drivers/block/loop.c:2189 [inline] drivers/block/loop.c:2288
loop_control_ioctl+0x563/0x680 drivers/block/loop.c:2288 drivers/block/loop.c:2288
do_vfs_ioctl+0x6fb/0x15b0 fs/ioctl.c:47 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]
ksys_ioctl fs/ioctl.c:742 [inline] fs/ioctl.c:747
__do_sys_ioctl fs/ioctl.c:749 [inline] fs/ioctl.c:747
__se_sys_ioctl fs/ioctl.c:747 [inline] fs/ioctl.c:747
__x64_sys_ioctl+0xd4/0x110 fs/ioctl.c:747 fs/ioctl.c:747
do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f80bedeb079
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:00007ffc7f376458 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000006836 RCX: 00007f80bedeb079
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 00007ffc7f375ed0 R11: 0000000000000246 R12: 00007ffc7f37646c
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace bc09616a01caeb4b ]---
RIP: 0010:strlen+0x27/0x60 lib/string.c:551 lib/string.c:551
Code: 0f 1f 00 41 57 41 56 53 49 89 fe 49 bf 00 00 00 00 00 fc ff df 48 89 f8 66 66 2e 0f 1f 84 00 00 00 00 00 48 89 c3 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 0b 48 8d 43 01 80 3b 00 75 e7 eb 13 89 d9
RSP: 0018:ffff8881de577cd0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81b1b57b R09: ffffed103bcaefa0
R10: ffffed103bcaefa0 R11: 0000000000000000 R12: ffff8881f18e4640
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS: 0000555555d28300(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f80bee5c130 CR3: 00000001de43a000 CR4: 00000000003406e0
Reply all
Reply to author
Forward
0 new messages