[syzbot] [kernel?] kernel BUG in binder_inc_ref_for_node

syzbot
2024-07-13T10:25:21Z

Hello,

syzbot found the following issue on:

HEAD commit: 82d01fe6ee52 Add linux-next specific files for 20240709
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=106472a5980000
kernel config: https://syzkaller.appspot.com/x/.config?x=95a20e7acf357998
dashboard link: https://syzkaller.appspot.com/bug?extid=3dae065ca76952a67257
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15f2e87e980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16a4869e980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/12dcacb06142/disk-82d01fe6.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6ef954821378/vmlinux-82d01fe6.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9ebf01d42887/bzImage-82d01fe6.xz

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

------------[ cut here ]------------
kernel BUG at drivers/android/binder.c:1175!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 UID: 0 PID: 5100 Comm: syz-executor841 Not tainted 6.10.0-rc7-next-20240709-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:binder_get_ref_for_node_olocked drivers/android/binder.c:1175 [inline]
RIP: 0010:binder_inc_ref_for_node+0xdf7/0xe00 drivers/android/binder.c:1478
Code: e8 f8 e9 4e fd ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 59 fd ff ff 48 89 df e8 24 e9 e8 f8 e9 4c fd ff ff e8 0a 15 82 f8 90 <0f> 0b 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc900038f75e8 EFLAGS: 00010293
RAX: ffffffff891176d6 RBX: 0000000000000000 RCX: ffff888077030000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff888021c2e820 R08: ffffffff8911720b R09: 0000000000000000
R10: ffff88802f1b0330 R11: ffffed1005e36068 R12: 0000000000000000
R13: dffffc0000000000 R14: ffff88802f1b0428 R15: ffff88802f1b0410
FS: 000055557b30a380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa59eb210e0 CR3: 000000001fee6000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
binder_thread_write drivers/android/binder.c:3946 [inline]
binder_ioctl_write_read+0xc7b/0x8d60 drivers/android/binder.c:5163
binder_ioctl+0x43d/0x1c70 drivers/android/binder.c:5449
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa59eaaa1e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffea9c908d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fa59eaaa1e9
RDX: 00000000200003c0 RSI: 00000000c0306201 RDI: 0000000000000003
RBP: 00000000000f4240 R08: 000055557b30b610 R09: 000055557b30b610
R10: 000055557b30b610 R11: 0000000000000246 R12: 00007fa59eaf80dc
R13: 00007fa59eaf30a3 R14: 00007ffea9c90900 R15: 00007ffea9c908f0
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:binder_get_ref_for_node_olocked drivers/android/binder.c:1175 [inline]
RIP: 0010:binder_inc_ref_for_node+0xdf7/0xe00 drivers/android/binder.c:1478
Code: e8 f8 e9 4e fd ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 59 fd ff ff 48 89 df e8 24 e9 e8 f8 e9 4c fd ff ff e8 0a 15 82 f8 90 <0f> 0b 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc900038f75e8 EFLAGS: 00010293
RAX: ffffffff891176d6 RBX: 0000000000000000 RCX: ffff888077030000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff888021c2e820 R08: ffffffff8911720b R09: 0000000000000000
R10: ffff88802f1b0330 R11: ffffed1005e36068 R12: 0000000000000000
R13: dffffc0000000000 R14: ffff88802f1b0428 R15: ffff88802f1b0410
FS: 000055557b30a380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa59eb210e0 CR3: 000000001fee6000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

---
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 syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

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.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup