syzbot


general protection fault in binder_alloc_new_buf

Status: fixed on 2023/02/24 13:50
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+f7dc54e5be28950ac459@syzkaller.appspotmail.com
Fix commit: 1da52815d5f1 binder: fix alloc->vma_vm_mm null-ptr dereference
First crash: 618d, last: 582d
Cause bisection: failed (error log, bisect log)
  
Duplicate bugs (2)
duplicates (2):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
general protection fault in binder_alloc_new_buf_locked kernel C done 28 601d 601d 0/26 closed as dup on 2022/09/02 15:53
WARNING in handle_bug (3) kernel 1 614d 610d 0/26 closed as dup on 2022/09/02 12:31
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 5.15 000/107] 5.15.66-rc1 review 131 (131) 2022/09/16 16:25
[PATCH 5.19 000/155] 5.19.8-rc1 review 167 (167) 2022/09/08 09:40
[PATCH 0/7] fix null-ptr-deref in binder_alloc and others 26 (26) 2022/09/01 14:18
[syzbot] general protection fault in binder_alloc_new_buf 0 (1) 2022/08/21 06:04
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/08/21 12:30 18m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 8755ae45a9e8 OK log

Sample crash report:
binder: 3610:3610 ioctl c0306201 20001480 returned -14
general protection fault, probably for non-canonical address 0xdffffc0000000025: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000128-0x000000000000012f]
CPU: 0 PID: 3610 Comm: syz-executor496 Not tainted 6.0.0-rc3-syzkaller-00007-gdcf8e5633e2e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
RIP: 0010:__lock_acquire+0xd83/0x56d0 kernel/locking/lockdep.c:4923
Code: 9b 0e 41 bf 01 00 00 00 0f 86 c8 00 00 00 89 05 23 46 9b 0e e9 bd 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 4e 31 00 00 49 81 3e 60 64 51 8f 0f 84 4c f3 ff
RSP: 0018:ffffc9000389f268 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: 1ffff92000713e7c RCX: 0000000000000001
RDX: 0000000000000025 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: fffffbfff1bbd2d2 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88802074bb00 R14: 0000000000000128 R15: 0000000000000001
FS:  0000555557449300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000073e37000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_acquire kernel/locking/lockdep.c:5666 [inline]
 lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631
 down_read+0x98/0x450 kernel/locking/rwsem.c:1499
 mmap_read_lock include/linux/mmap_lock.h:117 [inline]
 binder_alloc_new_buf_locked drivers/android/binder_alloc.c:405 [inline]
 binder_alloc_new_buf+0xa5/0x19e0 drivers/android/binder_alloc.c:593
 binder_transaction+0x242e/0x9a80 drivers/android/binder.c:3187
 binder_thread_write+0x8a9/0x3220 drivers/android/binder.c:3963
 binder_ioctl_write_read drivers/android/binder.c:5024 [inline]
 binder_ioctl+0x3470/0x6d00 drivers/android/binder.c:5311
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
 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+0x63/0xcd
RIP: 0033:0x7fe9bca0b339
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:00007ffecbe01af8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fe9bca0b339
RDX: 0000000020000680 RSI: 00000000c0306201 RDI: 0000000000000004
RBP: 0000000000000000 R08: 00007fe9bca78e40 R09: 00007fe9bca78e40
R10: 00007fe9bca78e40 R11: 0000000000000246 R12: 00007ffecbe01b30
R13: 00007ffecbe01b20 R14: 00007ffecbe01b10 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__lock_acquire+0xd83/0x56d0 kernel/locking/lockdep.c:4923
Code: 9b 0e 41 bf 01 00 00 00 0f 86 c8 00 00 00 89 05 23 46 9b 0e e9 bd 00 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 ea 03 <80> 3c 02 00 0f 85 4e 31 00 00 49 81 3e 60 64 51 8f 0f 84 4c f3 ff
RSP: 0018:ffffc9000389f268 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: 1ffff92000713e7c RCX: 0000000000000001
RDX: 0000000000000025 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: fffffbfff1bbd2d2 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88802074bb00 R14: 0000000000000128 R15: 0000000000000001
FS:  0000555557449300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000073e37000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 2 bytes skipped:
   0:	41 bf 01 00 00 00    	mov    $0x1,%r15d
   6:	0f 86 c8 00 00 00    	jbe    0xd4
   c:	89 05 23 46 9b 0e    	mov    %eax,0xe9b4623(%rip)        # 0xe9b4635
  12:	e9 bd 00 00 00       	jmpq   0xd4
  17:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1e:	fc ff df
  21:	4c 89 f2             	mov    %r14,%rdx
  24:	48 c1 ea 03          	shr    $0x3,%rdx
* 28:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2c:	0f 85 4e 31 00 00    	jne    0x3180
  32:	49 81 3e 60 64 51 8f 	cmpq   $0xffffffff8f516460,(%r14)
  39:	0f                   	.byte 0xf
  3a:	84 4c f3 ff          	test   %cl,-0x1(%rbx,%rsi,8)

Crashes (315):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/31 16:05 upstream dcf8e5633e2e 51e54e30 .config strace log report syz C ci-upstream-kasan-gce general protection fault in binder_alloc_new_buf
2022/08/20 09:02 linux-next 8755ae45a9e8 26a13b38 .config console log report syz C ci-upstream-linux-next-kasan-gce-root general protection fault in binder_alloc_new_buf
2022/08/17 15:30 linux-next 95d10484d66e 4e72d229 .config strace log report syz C ci-upstream-linux-next-kasan-gce-root general protection fault in binder_alloc_new_buf
2022/09/02 17:51 upstream 42e66b1cc3a0 25194605 .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in binder_alloc_new_buf
2022/09/02 13:30 upstream 42e66b1cc3a0 a805568e .config console log report info ci-upstream-kasan-gce general protection fault in binder_alloc_new_buf
2022/09/02 09:35 upstream 42e66b1cc3a0 a805568e .config console log report info ci-qemu-upstream general protection fault in binder_alloc_new_buf
2022/09/02 05:40 upstream 42e66b1cc3a0 a805568e .config console log report info ci-upstream-kasan-gce general protection fault in binder_alloc_new_buf
2022/09/01 22:07 upstream 2880e1a175b9 86c46e46 .config console log report info ci-upstream-kasan-gce-root general protection fault in binder_alloc_new_buf
2022/09/02 18:53 upstream 42e66b1cc3a0 25194605 .config console log report info ci-qemu-upstream-386 general protection fault in binder_alloc_new_buf
2022/09/02 00:25 upstream 2880e1a175b9 86c46e46 .config console log report info ci-upstream-kasan-gce-386 general protection fault in binder_alloc_new_buf
2022/08/17 05:53 linux-next 95d10484d66e 4e72d229 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in binder_alloc_new_buf
2022/09/21 08:48 linux-next e47eb90a0a9a c4b8ccfd .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/20 20:20 linux-next e47eb90a0a9a c4b8ccfd .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/20 07:20 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/20 00:31 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/18 15:05 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/18 09:38 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/17 21:40 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/17 17:18 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/17 14:47 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/17 14:05 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/17 10:16 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/17 07:50 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/17 04:08 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/17 02:38 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/16 21:48 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/16 20:10 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/15 15:02 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/15 03:55 linux-next e47eb90a0a9a b884348d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/15 01:49 linux-next e47eb90a0a9a b884348d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/14 22:49 linux-next e47eb90a0a9a b884348d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/14 04:15 linux-next e47eb90a0a9a b884348d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/13 03:20 linux-next e47eb90a0a9a f371ed7e .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/13 02:04 linux-next e47eb90a0a9a f371ed7e .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/12 17:27 linux-next e47eb90a0a9a f371ed7e .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/12 14:58 linux-next e47eb90a0a9a 356d8217 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/12 10:13 linux-next e47eb90a0a9a 356d8217 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/12 06:23 linux-next e47eb90a0a9a 356d8217 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/11 13:39 linux-next e47eb90a0a9a 356d8217 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/11 04:40 linux-next e47eb90a0a9a 356d8217 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/11 01:58 linux-next e47eb90a0a9a 356d8217 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/10 08:09 linux-next e47eb90a0a9a 356d8217 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/09 22:42 linux-next e47eb90a0a9a 356d8217 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/09 09:46 linux-next e47eb90a0a9a f3027468 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/09 02:28 linux-next e47eb90a0a9a f3027468 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/08 08:07 linux-next e47eb90a0a9a 435aeef7 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/08 00:42 linux-next e47eb90a0a9a 435aeef7 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/07 19:59 linux-next e47eb90a0a9a c5b7bc57 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/07 16:42 linux-next e47eb90a0a9a c5b7bc57 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/07 04:38 linux-next e47eb90a0a9a 5fc30c37 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/07 02:23 linux-next e47eb90a0a9a 5fc30c37 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/06 13:41 linux-next e47eb90a0a9a 65aea2b9 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/06 08:18 linux-next e47eb90a0a9a 9dcd38fc .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/06 06:57 linux-next e47eb90a0a9a 9dcd38fc .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/05 22:30 linux-next e47eb90a0a9a 9dcd38fc .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/05 11:31 linux-next e47eb90a0a9a 922294ab .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
2022/09/04 23:16 linux-next e47eb90a0a9a 28811d0a .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: null-ptr-deref Write in binder_alloc_new_buf
* Struck through repros no longer work on HEAD.