syzbot


general protection fault in binder_alloc_new_buf_locked

Status: closed as dup on 2022/09/02 15:53
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+ff47834028a51cf6f857@syzkaller.appspotmail.com
First crash: 690d, last: 686d
Cause bisection: introduced by (bisect log) :
commit 44e602b4e52f70f04620bbbf4fe46ecb40170bde
Author: Liam Howlett <liam.howlett@oracle.com>
Date: Wed Aug 10 16:02:25 2022 +0000

  binder_alloc: add missing mmap_lock calls when using the VMA

Crash: general protection fault in binder_alloc_new_buf (log)
Repro: C syz .config
  
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
general protection fault in binder_alloc_new_buf kernel C error 315 667d 698d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] general protection fault in binder_alloc_new_buf_locked 1 (2) 2022/09/02 15:53

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-executor216 Not tainted 6.0.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
RIP: 0010:__lock_acquire+0x6b/0x1f60 kernel/locking/lockdep.c:4923
Code: ff df 8a 04 10 84 c0 0f 85 62 16 00 00 83 3d bf 50 bc 0c 00 0f 84 13 15 00 00 83 3d 7e 93 55 0b 00 74 2c 4c 89 e8 48 c1 e8 03 <80> 3c 10 00 74 12 4c 89 ef e8 b7 f3 73 00 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc90003a2efa8 EFLAGS: 00010002
RAX: 0000000000000025 RBX: 0000000000000000 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: 0000000000000128
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: fffffbfff1c4ae0e R11: 1ffffffff1c4ae0d R12: 0000000000000001
R13: 0000000000000128 R14: 0000000000000000 R15: 0000000000000001
FS:  000055555635f300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000001db40000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5666
 down_read+0x39/0x50 kernel/locking/rwsem.c:1499
 mmap_read_lock include/linux/mmap_lock.h:117 [inline]
 binder_alloc_new_buf_locked+0x9d/0x15f0 drivers/android/binder_alloc.c:405
 binder_alloc_new_buf+0x42/0x60 drivers/android/binder_alloc.c:593
 binder_transaction+0x284b/0x72e0 drivers/android/binder.c:3187
 binder_ioctl_write_read+0xd9a/0x8e50 drivers/android/binder.c:5024
 binder_ioctl+0x385/0x18c0 drivers/android/binder.c:5311
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f292e46f339
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:00007ffda7bf8418 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f292e46f339
RDX: 0000000020000040 RSI: 00000000c0306201 RDI: 0000000000000004
RBP: 0000000000000000 R08: 00007f292e4dce40 R09: 00007f292e4dce40
R10: 00007f292e4dce40 R11: 0000000000000246 R12: 00007ffda7bf8450
R13: 00007ffda7bf8440 R14: 00007ffda7bf8430 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__lock_acquire+0x6b/0x1f60 kernel/locking/lockdep.c:4923
Code: ff df 8a 04 10 84 c0 0f 85 62 16 00 00 83 3d bf 50 bc 0c 00 0f 84 13 15 00 00 83 3d 7e 93 55 0b 00 74 2c 4c 89 e8 48 c1 e8 03 <80> 3c 10 00 74 12 4c 89 ef e8 b7 f3 73 00 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc90003a2efa8 EFLAGS: 00010002
RAX: 0000000000000025 RBX: 0000000000000000 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: 0000000000000128
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: fffffbfff1c4ae0e R11: 1ffffffff1c4ae0d R12: 0000000000000001
R13: 0000000000000128 R14: 0000000000000000 R15: 0000000000000001
FS:  000055555635f300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000001db40000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	df 8a 04 10 84 c0    	fisttps -0x3f7beffc(%rdx)
   6:	0f 85 62 16 00 00    	jne    0x166e
   c:	83 3d bf 50 bc 0c 00 	cmpl   $0x0,0xcbc50bf(%rip)        # 0xcbc50d2
  13:	0f 84 13 15 00 00    	je     0x152c
  19:	83 3d 7e 93 55 0b 00 	cmpl   $0x0,0xb55937e(%rip)        # 0xb55939e
  20:	74 2c                	je     0x4e
  22:	4c 89 e8             	mov    %r13,%rax
  25:	48 c1 e8 03          	shr    $0x3,%rax
* 29:	80 3c 10 00          	cmpb   $0x0,(%rax,%rdx,1) <-- trapping instruction
  2d:	74 12                	je     0x41
  2f:	4c 89 ef             	mov    %r13,%rdi
  32:	e8 b7 f3 73 00       	callq  0x73f3ee
  37:	48                   	rex.W
  38:	ba 00 00 00 00       	mov    $0x0,%edx
  3d:	00 fc                	add    %bh,%ah

Crashes (28):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/29 20:01 upstream b90cb1053190 5b44472d .config strace log report syz C ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/02 15:33 upstream 42e66b1cc3a0 25194605 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/02 09:34 upstream 42e66b1cc3a0 a805568e .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/02 00:21 upstream 2880e1a175b9 86c46e46 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/01 23:22 upstream 2880e1a175b9 86c46e46 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/01 20:12 upstream 2880e1a175b9 86c46e46 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/01 19:48 upstream 2880e1a175b9 86c46e46 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/01 15:55 upstream c5e4d5e99162 86c46e46 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/01 06:55 upstream c5e4d5e99162 b01ec571 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/01 06:23 upstream c5e4d5e99162 b01ec571 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/01 06:13 upstream c5e4d5e99162 b01ec571 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/01 05:42 upstream c5e4d5e99162 b01ec571 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/01 05:17 upstream c5e4d5e99162 b01ec571 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/09/01 00:30 upstream c5e4d5e99162 51e54e30 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/31 13:26 upstream dcf8e5633e2e 51e54e30 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/31 10:04 upstream dcf8e5633e2e 51e54e30 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/30 22:15 upstream dcf8e5633e2e 4a380809 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/30 19:06 upstream dcf8e5633e2e 4a380809 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/30 13:34 upstream dcf8e5633e2e 5b44472d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/30 13:34 upstream dcf8e5633e2e 5b44472d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/30 13:34 upstream dcf8e5633e2e 5b44472d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/30 13:25 upstream dcf8e5633e2e 5b44472d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/29 18:35 upstream b90cb1053190 5b44472d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/29 18:35 upstream b90cb1053190 5b44472d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/29 18:33 upstream b90cb1053190 5b44472d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/29 17:41 upstream b90cb1053190 5b44472d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/29 17:08 upstream b90cb1053190 5b44472d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
2022/08/29 14:34 upstream b90cb1053190 5b44472d .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in binder_alloc_new_buf_locked
* Struck through repros no longer work on HEAD.