syzbot


WARNING in binder_alloc_vma_close

Status: upstream: reported C repro on 2022/06/27 07:20
Reported-by: syzbot+da54fa8d793ca89c741f@syzkaller.appspotmail.com
Fix commit: b0cab80ecd54 android: binder: fix lockdep check on clearing 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: 220d, last: 126d

Cause bisection: introduced by (bisect log) :
commit 472a68df605b149ca58e931b4936e3136f5ecca0
Author: Liam R. Howlett <Liam.Howlett@oracle.com>
Date: Tue Jun 21 01:09:09 2022 +0000

  android: binder: stop saving a pointer to the VMA

Crash: WARNING in binder_alloc_vma_close (log)
Repro: C syz .config
Last patch testing requests:
Created Duration User Patch Repo Result
2022/06/27 10:41 18m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 08897940f458 OK log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3611 at include/linux/mmap_lock.h:161 mmap_assert_write_locked include/linux/mmap_lock.h:161 [inline]
WARNING: CPU: 0 PID: 3611 at include/linux/mmap_lock.h:161 binder_alloc_set_vma drivers/android/binder_alloc.c:323 [inline]
WARNING: CPU: 0 PID: 3611 at include/linux/mmap_lock.h:161 binder_alloc_vma_close+0x123/0x170 drivers/android/binder_alloc.c:970
Modules linked in:
CPU: 0 PID: 3611 Comm: syz-executor763 Not tainted 5.19.0-rc3-next-20220623-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:mmap_assert_write_locked include/linux/mmap_lock.h:161 [inline]
RIP: 0010:binder_alloc_set_vma drivers/android/binder_alloc.c:323 [inline]
RIP: 0010:binder_alloc_vma_close+0x123/0x170 drivers/android/binder_alloc.c:970
Code: 5b fa 48 8d bd 58 01 00 00 31 f6 e8 d7 44 5d 02 31 ff 41 89 c4 89 c6 e8 7b f8 5b fa 45 85 e4 0f 85 5b ff ff ff e8 1d fc 5b fa <0f> 0b e9 4f ff ff ff e8 11 fc 5b fa 48 89 ef e8 99 cd 91 fa 0f 0b
RSP: 0018:ffffc90002dffbe0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff888078e119e0 RCX: 0000000000000000
RDX: ffff8880219d0000 RSI: ffffffff871ec183 RDI: 0000000000000005
RBP: ffff88807744c880 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: dffffc0000000000 R14: ffff88807744c880 R15: 0000000000000000
FS:  0000555556a5c300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6863e39130 CR3: 00000000217f4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 remove_vma+0x81/0x130 mm/mmap.c:187
 remove_mt mm/mmap.c:2232 [inline]
 do_mas_align_munmap+0x9e6/0xef0 mm/mmap.c:2507
 do_mas_munmap+0x202/0x2c0 mm/mmap.c:2562
 __vm_munmap+0x159/0x290 mm/mmap.c:2833
 __do_sys_munmap mm/mmap.c:2858 [inline]
 __se_sys_munmap mm/mmap.c:2855 [inline]
 __x64_sys_munmap+0x55/0x80 mm/mmap.c:2855
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0
RIP: 0033:0x7f6863dc8099
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 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:00007ffdc69a2808 EFLAGS: 00000246 ORIG_RAX: 000000000000000b
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f6863dc8099
RDX: 00007f6863dc8099 RSI: 0000000000004000 RDI: 0000000020ffa000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 00007ffdc69a2850
R13: 00007ffdc69a2840 R14: 00007ffdc69a2830 R15: 0000000000000000
 </TASK>

Crashes (18):
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/23 14:23 linux-next 08897940f458 912f5df7 .config strace log report syz C WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce-smack-root 2022/09/25 04:15 upstream 1a61b828566f 0042f2b4 .config console log report info [disk image] [vmlinux] WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce-root 2022/09/25 01:40 upstream 1a61b828566f 0042f2b4 .config console log report info [disk image] [vmlinux] WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce-selinux-root 2022/09/24 22:05 upstream a63f2e7cb110 0042f2b4 .config console log report info [disk image] [vmlinux] WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce 2022/09/24 22:04 upstream a63f2e7cb110 0042f2b4 .config console log report info [disk image] [vmlinux] WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce-selinux-root 2022/09/22 20:27 upstream dc164f4fb00a 0042f2b4 .config console log report info [disk image] [vmlinux] WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce-root 2022/09/22 20:08 upstream dc164f4fb00a 0042f2b4 .config console log report info [disk image] [vmlinux] WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce 2022/09/22 20:05 upstream dc164f4fb00a 0042f2b4 .config console log report info [disk image] [vmlinux] WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce 2022/08/12 01:19 upstream 7ebfc85e2cd7 787ed7e0 .config console log report info WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce 2022/08/11 23:43 upstream 7ebfc85e2cd7 787ed7e0 .config console log report info WARNING in binder_alloc_vma_close
ci-qemu-upstream-386 2022/09/25 08:11 upstream 1a61b828566f 0042f2b4 .config console log report info WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce-386 2022/09/25 02:33 upstream 1a61b828566f 0042f2b4 .config console log report info [disk image] [vmlinux] WARNING in binder_alloc_vma_close
ci-upstream-kasan-gce-386 2022/09/22 21:57 upstream dc164f4fb00a 0042f2b4 .config console log report info WARNING in binder_alloc_vma_close
ci-qemu-upstream-386 2022/09/22 20:58 upstream dc164f4fb00a 0042f2b4 .config console log report info WARNING in binder_alloc_vma_close
ci-upstream-linux-next-kasan-gce-root 2022/06/23 14:12 linux-next 08897940f458 912f5df7 .config console log report info WARNING in binder_alloc_vma_close
ci-upstream-linux-next-kasan-gce-root 2022/06/23 14:05 linux-next 08897940f458 912f5df7 .config console log report info WARNING in binder_alloc_vma_close
ci-upstream-gce-arm64 2022/09/24 22:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c194837ebb57 0042f2b4 .config console log report info [disk image] [vmlinux] WARNING in binder_alloc_vma_close
ci-upstream-gce-arm64 2022/09/22 20:07 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci aa49f95768a9 0042f2b4 .config console log report info [disk image] [vmlinux] WARNING in binder_alloc_vma_close
* Struck through repros no longer work on HEAD.