syzbot


kernel BUG in binder_alloc_deferred_release

Status: upstream: reported C repro on 2022/06/20 01:47
Reported-by: syzbot+58b51ac2b04e388ab7b0@syzkaller.appspotmail.com
Fix commit: a43cfc87caaf android: binder: stop saving a pointer to the VMA
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 227d, last: 221d

Cause bisection: introduced by (bisect log) :
commit 42086abba43463fbf495cb80173600284b4c4e8c
Author: Liam R. Howlett <Liam.Howlett@Oracle.com>
Date: Tue Jun 14 19:00:27 2022 +0000

  mm: start tracking VMAs with maple tree

Crash: kernel BUG in binder_alloc_deferred_release (log)
Repro: C syz .config
similar bugs (7):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG at drivers/android/binder_alloc.c:LINE! C 856 1880d 1885d 4/24 fixed on 2018/02/01 10:32
android-414 kernel BUG at drivers/android/binder_alloc.c:LINE! (2) C 3 1321d 1321d 0/1 public: reported C repro on 2019/06/17 23:05
upstream kernel BUG at drivers/android/binder_alloc.c:LINE! (3) C done 24 1334d 1403d 13/24 fixed on 2019/06/14 18:22
upstream kernel BUG at drivers/android/binder_alloc.c:LINE! (2) C 1257 1403d 1445d 12/24 fixed on 2019/03/28 12:00
upstream kernel BUG at drivers/android/binder_alloc.c:LINE! (4) C done 26 1313d 1321d 13/24 fixed on 2019/08/05 13:45
android-414 kernel BUG at drivers/android/binder_alloc.c:LINE! C 30 1404d 1405d 1/1 fixed on 2019/03/28 03:28
android-49 kernel BUG at drivers/android/binder_alloc.c:LINE! C 44 1157d 1405d 1/3 internal: reported C repro on 2019/03/26 19:34
Last patch testing requests:
Created Duration User Patch Repo Result
2022/06/20 10:40 18m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 6012273897fe OK log

Sample crash report:
------------[ cut here ]------------
kernel BUG at drivers/android/binder_alloc.c:820!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 2934 Comm: kworker/0:3 Not tainted 5.19.0-rc2-next-20220615-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events binder_deferred_func
RIP: 0010:binder_alloc_deferred_release+0x602/0x780 drivers/android/binder_alloc.c:820
Code: c6 80 16 c7 8a 48 c7 c7 80 b6 48 8d e8 57 86 05 fd 31 ff 89 c5 89 c6 e8 fc ba 5b fa 85 ed 74 c6 e9 78 57 55 02 e8 9e be 5b fa <0f> 0b c7 44 24 20 00 00 00 00 e9 27 ff ff ff e8 8a be 5b fa 48 89
RSP: 0018:ffffc9000de07bc8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff8880519971e0 RCX: 0000000000000000
RDX: ffff888026b0d7c0 RSI: ffffffff871f04b2 RDI: ffff888051997270
RBP: ffff888051997000 R08: 0000000000000000 R09: ffffffff8dbcac17
R10: fffffbfff1b79582 R11: 0000000000000000 R12: ffff888147653c60
R13: ffff8880519972d8 R14: ffff888147653d10 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f99ddec19c1 CR3: 0000000077a01000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 binder_free_proc drivers/android/binder.c:4766 [inline]
 binder_proc_dec_tmpref drivers/android/binder.c:1433 [inline]
 binder_proc_dec_tmpref+0x2aa/0x530 drivers/android/binder.c:1426
 binder_deferred_release drivers/android/binder.c:5761 [inline]
 binder_deferred_func+0xe2a/0x1150 drivers/android/binder.c:5788
 process_one_work+0x996/0x1610 kernel/workqueue.c:2289
 worker_thread+0x665/0x1080 kernel/workqueue.c:2436
 kthread+0x2e9/0x3a0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:binder_alloc_deferred_release+0x602/0x780 drivers/android/binder_alloc.c:820
Code: c6 80 16 c7 8a 48 c7 c7 80 b6 48 8d e8 57 86 05 fd 31 ff 89 c5 89 c6 e8 fc ba 5b fa 85 ed 74 c6 e9 78 57 55 02 e8 9e be 5b fa <0f> 0b c7 44 24 20 00 00 00 00 e9 27 ff ff ff e8 8a be 5b fa 48 89
RSP: 0018:ffffc9000de07bc8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff8880519971e0 RCX: 0000000000000000
RDX: ffff888026b0d7c0 RSI: ffffffff871f04b2 RDI: ffff888051997270
RBP: ffff888051997000 R08: 0000000000000000 R09: ffffffff8dbcac17
R10: fffffbfff1b79582 R11: 0000000000000000 R12: ffff888147653c60
R13: ffff8880519972d8 R14: ffff888147653d10 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f99ddec19c1 CR3: 000000001bb00000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-linux-next-kasan-gce-root 2022/06/16 01:55 linux-next 6012273897fe 1719ee24 .config strace log report syz C kernel BUG in binder_alloc_deferred_release
ci-upstream-linux-next-kasan-gce-root 2022/06/21 23:19 linux-next 34d1d36073ea 0fc5c330 .config console log report info kernel BUG in binder_alloc_deferred_release
ci-upstream-linux-next-kasan-gce-root 2022/06/16 02:09 linux-next 6012273897fe 1719ee24 .config console log report info kernel BUG in binder_alloc_deferred_release
ci-upstream-linux-next-kasan-gce-root 2022/06/16 01:37 linux-next 6012273897fe 1719ee24 .config console log report info kernel BUG in binder_alloc_deferred_release
* Struck through repros no longer work on HEAD.