invalid opcode in binder_alloc_do_buffer_copy

6 views
Skip to first unread message

syzbot

unread,
Mar 7, 2019, 10:52:06 AM3/7/19
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: f90d64483ebd Merge tag 'usb-5.1-rc1' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12fc3e33200000
kernel config: https://syzkaller.appspot.com/x/.config?x=83f72881c3c30b7c
dashboard link: https://syzkaller.appspot.com/bug?extid=f16bdc2ff181f48a0113
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [ar...@android.com chri...@brauner.io
de...@driverdev.osuosl.org gre...@linuxfoundation.org
jo...@joelfernandes.org linux-...@vger.kernel.org ma...@android.com
tk...@android.com]

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

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

invalid opcode: 0000 [#1] PREEMPT SMP KASAN
kobject: 'gre0' (000000008bd9329b): kobject_add_internal: parent: 'net',
set: 'devices'
CPU: 1 PID: 3553 Comm: syz-executor.4 Not tainted 5.0.0+ #10
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:binder_alloc_do_buffer_copy+0xd6/0x510
drivers/android/binder_alloc.c:1141
Code: 02 00 0f 85 20 04 00 00 4d 8b 64 24 58 49 29 dc e8 5f 5a 2a fc 4c 89
e6 4c 89 ef e8 74 5b 2a fc 4d 39 e5 76 07 e8 4a 5a 2a fc <0f> 0b e8 43 5a
2a fc 4c 8b 75 d0 4d 29 ec 4c 89 e6 4c 89 f7 e8 51
kobject: 'gre0' (000000008bd9329b): kobject_uevent_env
RSP: 0018:ffff88809621f550 EFLAGS: 00010212
RAX: 0000000000040000 RBX: 0000000020001000 RCX: ffffc90010c7e000
RDX: 00000000000003af RSI: ffffffff8545d136 RDI: 0000000000000006
RBP: ffff88809621f5d0 R08: ffff888083aa4480 R09: 0000000000000028
R10: ffffed1012c43f01 R11: ffff88809621f80f R12: 0000000000000020
R13: 0000000000000028 R14: ffff888099e82b50 R15: 0000000000000000
kobject: 'gre0' (000000008bd9329b): fill_kobj_path: path
= '/devices/virtual/net/gre0'
FS: 00007fe37409b700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kobject: 'queues' (00000000e0eebc58): kobject_add_internal: parent: 'gre0',
set: '<NULL>'
CR2: 000000000073c000 CR3: 00000000675bd000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
binder_alloc_copy_from_buffer+0x37/0x42 drivers/android/binder_alloc.c:1187
kobject: 'queues' (00000000e0eebc58): kobject_uevent_env
binder_get_object+0xc3/0x200 drivers/android/binder.c:2062
binder_transaction+0x2b4a/0x6690 drivers/android/binder.c:3231
kobject: 'queues' (00000000e0eebc58): kobject_uevent_env: filter function
caused the event to drop!
kobject: 'rx-0' (0000000081ac9d6d): kobject_add_internal: parent: 'queues',
set: 'queues'
binder_thread_write+0x64a/0x2820 drivers/android/binder.c:3792
kobject: 'rx-0' (0000000081ac9d6d): kobject_uevent_env
kobject: 'rx-0' (0000000081ac9d6d): fill_kobj_path: path
= '/devices/virtual/net/gre0/queues/rx-0'
binder_ioctl_write_read drivers/android/binder.c:4825 [inline]
binder_ioctl+0x1033/0x183b drivers/android/binder.c:5002
kobject: 'tx-0' (000000004987dec5): kobject_add_internal: parent: 'queues',
set: 'queues'
kobject: 'tx-0' (000000004987dec5): kobject_uevent_env
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:509 [inline]
do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:696
kobject: 'tx-0' (000000004987dec5): fill_kobj_path: path
= '/devices/virtual/net/gre0/queues/tx-0'
kobject: 'gretap0' (00000000228e5781): kobject_add_internal: parent: 'net',
set: 'devices'
kobject: 'gretap0' (00000000228e5781): kobject_uevent_env
ksys_ioctl+0xab/0xd0 fs/ioctl.c:713
kobject: 'gretap0' (00000000228e5781): fill_kobj_path: path
= '/devices/virtual/net/gretap0'
__do_sys_ioctl fs/ioctl.c:720 [inline]
__se_sys_ioctl fs/ioctl.c:718 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
kobject: 'queues' (000000008786f750): kobject_add_internal:
parent: 'gretap0', set: '<NULL>'
RIP: 0033:0x457f29
kobject: 'queues' (000000008786f750): kobject_uevent_env
Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fe37409ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
kobject: 'queues' (000000008786f750): kobject_uevent_env: filter function
caused the event to drop!
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457f29
RDX: 0000000020000400 RSI: 00000000c0306201 RDI: 0000000000000004
RBP: 000000000073bfa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe37409b6d4
R13: 00000000004bf25a R14: 00000000004d0c00 R15: 00000000ffffffff
kobject: 'rx-0' (00000000847f788e): kobject_add_internal: parent: 'queues',
set: 'queues'
Modules linked in:
kobject: 'rx-0' (00000000847f788e): kobject_uevent_env
---[ end trace 675383d23fb3244d ]---
kobject: 'kvm' (000000009e6ffd25): kobject_uevent_env
RIP: 0010:binder_alloc_do_buffer_copy+0xd6/0x510
drivers/android/binder_alloc.c:1141
kobject: 'kvm' (000000009e6ffd25): fill_kobj_path: path
= '/devices/virtual/misc/kvm'
Code: 02 00 0f 85 20 04 00 00 4d 8b 64 24 58 49 29 dc e8 5f 5a 2a fc 4c 89
e6 4c 89 ef e8 74 5b 2a fc 4d 39 e5 76 07 e8 4a 5a 2a fc <0f> 0b e8 43 5a
2a fc 4c 8b 75 d0 4d 29 ec 4c 89 e6 4c 89 f7 e8 51
RSP: 0018:ffff88809621f550 EFLAGS: 00010212
RAX: 0000000000040000 RBX: 0000000020001000 RCX: ffffc90010c7e000
RDX: 00000000000003af RSI: ffffffff8545d136 RDI: 0000000000000006
kobject: 'loop0' (00000000b4a899e5): kobject_uevent_env
RBP: ffff88809621f5d0 R08: ffff888083aa4480 R09: 0000000000000028
kobject: 'rx-0' (00000000847f788e): fill_kobj_path: path
= '/devices/virtual/net/gretap0/queues/rx-0'
R10: ffffed1012c43f01 R11: ffff88809621f80f R12: 0000000000000020
kobject: 'loop0' (00000000b4a899e5): fill_kobj_path: path
= '/devices/virtual/block/loop0'
R13: 0000000000000028 R14: ffff888099e82b50 R15: 0000000000000000
kobject: 'tx-0' (0000000070a2eeb0): kobject_add_internal: parent: 'queues',
set: 'queues'
binder: BINDER_SET_CONTEXT_MGR already set
kobject: 'tx-0' (0000000070a2eeb0): kobject_uevent_env
FS: 00007fe37409b700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
kobject: 'tx-0' (0000000070a2eeb0): fill_kobj_path: path
= '/devices/virtual/net/gretap0/queues/tx-0'
kobject: 'batman_adv' (00000000052041e9): kobject_add_internal:
parent: 'gretap0', set: '<NULL>'
binder: 3547:3554 ioctl 40046207 0 returned -16
kobject: 'erspan0' (000000003726248d): kobject_add_internal: parent: 'net',
set: 'devices'
binder_alloc: 3547: binder_alloc_buf, no vma
binder: 3547:3558 transaction failed 29189/-3, size 0-32 line 3147
kobject: 'erspan0' (000000003726248d): kobject_uevent_env
kobject: 'erspan0' (000000003726248d): fill_kobj_path: path
= '/devices/virtual/net/erspan0'
kobject: 'queues' (00000000ae623cea): kobject_add_internal:
parent: 'erspan0', set: '<NULL>'
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kobject: 'queues' (00000000ae623cea): kobject_uevent_env
CR2: 00007fe374037db8 CR3: 00000000675bd000 CR4: 00000000001406e0
kobject: 'queues' (00000000ae623cea): kobject_uevent_env: filter function
caused the event to drop!
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
kobject: 'rx-0' (000000002ed91755): kobject_add_internal: parent: 'queues',
set: 'queues'
kobject: 'rx-0' (000000002ed91755): kobject_uevent_env
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
kobject: 'rx-0' (000000002ed91755): fill_kobj_path: path
= '/devices/virtual/net/erspan0/queues/rx-0'


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
syzbot.

Dmitry Vyukov

unread,
May 17, 2019, 5:50:00 AM5/17/19
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation
On Thu, Mar 7, 2019 at 4:52 PM syzbot
<syzbot+f16bdc...@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following crash on:
>
> HEAD commit: f90d64483ebd Merge tag 'usb-5.1-rc1' of git://git.kernel.o..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=12fc3e33200000
> kernel config: https://syzkaller.appspot.com/x/.config?x=83f72881c3c30b7c
> dashboard link: https://syzkaller.appspot.com/bug?extid=f16bdc2ff181f48a0113
> compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> CC: [ar...@android.com chri...@brauner.io
> de...@driverdev.osuosl.org gre...@linuxfoundation.org
> jo...@joelfernandes.org linux-...@vger.kernel.org ma...@android.com
> tk...@android.com]
>
> Unfortunately, I don't have any reproducer for this crash yet.
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+f16bdc...@syzkaller.appspotmail.com

This looks like

#syz dup: kernel BUG at drivers/android/binder_alloc.c:LINE! (3)

Kernel just somehow did not print a proper BUG message, but produces
invalid opcode instead.
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-upstream-moderation/00000000000084cec00583831672%40google.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages