syzbot


general protection fault in __device_attach (2)

Status: upstream: reported C repro on 2023/01/03 15:59
Reported-by: syzbot+476ae637e1924eafc649@syzkaller.appspotmail.com
First crash: 421d, last: 36d
Cause bisection: failed (error log, bisect log)
  
Fix bisection the fix commit could be any of (bisect log):
  003c389455eb Merge 5.10.160 into android12-5.10-lts
  1cd4863ea874 ANDROID: struct io_uring ABI preservation hack for 5.10.162 changes
  
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 general protection fault in __device_attach (2) C 5 48d 421d 0/2 upstream: reported C repro on 2023/01/03 03:10
upstream general protection fault in __device_attach kernel C done done 2 79d 716d 0/26 upstream: reported C repro on 2022/03/14 08:46
android-6-1 general protection fault in __device_attach origin:upstream C error 3 17d 272d 0/2 upstream: reported C repro on 2023/06/01 06:12
linux-4.19 general protection fault in __device_attach C error 35 366d 1174d 0/1 upstream: reported C repro on 2020/12/11 04:31
android-5-10 general protection fault in __device_attach 1 668d 668d 0/2 auto-closed as invalid on 2022/07/29 21:17
android-5-15 general protection fault in __device_attach origin:upstream C error 7 30d 421d 0/2 upstream: reported C repro on 2023/01/03 07:29
android-54 general protection fault in __device_attach 8 860d 1116d 0/2 auto-closed as invalid on 2022/02/18 18:30
Last patch testing requests (7)
Created Duration User Patch Repo Result
2024/01/23 19:19 7m retest repro android13-5.10-lts report log
2024/01/09 18:36 4m retest repro android13-5.10-lts report log
2024/01/09 18:15 20m retest repro android13-5.10-lts report log
2023/11/14 18:15 10m retest repro android13-5.10-lts report log
2023/10/31 18:03 5m retest repro android13-5.10-lts report log
2023/08/22 17:41 19m retest repro android13-5.10-lts report log
2023/08/22 17:41 11m retest repro android13-5.10-lts report log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000001a: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000000d0-0x00000000000000d7]
CPU: 0 PID: 305 Comm: syz-executor729 Not tainted 5.10.178-syzkaller-00127-g43c801dc3325 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:__device_attach+0xb4/0x500 drivers/base/dd.c:903
Code: 5c 24 68 48 89 d8 48 c1 e8 03 42 80 3c 30 00 74 08 48 89 df e8 ad 17 dd fe 4c 8b 2b 49 8d 9d d0 00 00 00 48 89 d8 48 c1 e8 03 <42> 0f b6 04 30 84 c0 0f 85 c0 03 00 00 0f b6 1b 89 de 83 e6 01 45
RSP: 0018:ffffc90000c47580 EFLAGS: 00010202
RAX: 000000000000001a RBX: 00000000000000d0 RCX: ffffffff84ae3b55
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc90000c47500
RBP: ffffc90000c47650 R08: dffffc0000000000 R09: fffff52000188ea1
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888118495030
R13: 0000000000000000 R14: dffffc0000000000 R15: ffff888118495030
FS:  0000555555610300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6ac54101f0 CR3: 000000011e4f0000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 device_attach+0x17/0x20 drivers/base/dd.c:970
 proc_ioctl+0x428/0x600 drivers/usb/core/devio.c:2262
 usbdev_ioctl+0x306b/0x5e10 drivers/usb/core/devio.c:2713
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0x114/0x190 fs/ioctl.c:739
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7f6ac53e0859
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 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:00007ffd9656b1c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f6ac5424184 RCX: 00007f6ac53e0859
RDX: 0000000020000080 RSI: 00000000c0105512 RDI: 0000000000000007
RBP: 00007ffd9656b1e0 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000ffff R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffd9656b1dc R14: 00007ffd9656b200 R15: 00007ffd9656b1f0
Modules linked in:
---[ end trace 51c448cbf36954a8 ]---
RIP: 0010:__device_attach+0xb4/0x500 drivers/base/dd.c:903
Code: 5c 24 68 48 89 d8 48 c1 e8 03 42 80 3c 30 00 74 08 48 89 df e8 ad 17 dd fe 4c 8b 2b 49 8d 9d d0 00 00 00 48 89 d8 48 c1 e8 03 <42> 0f b6 04 30 84 c0 0f 85 c0 03 00 00 0f b6 1b 89 de 83 e6 01 45
RSP: 0018:ffffc90000c47580 EFLAGS: 00010202
RAX: 000000000000001a RBX: 00000000000000d0 RCX: ffffffff84ae3b55
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc90000c47500
RBP: ffffc90000c47650 R08: dffffc0000000000 R09: fffff52000188ea1
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888118495030
R13: 0000000000000000 R14: dffffc0000000000 R15: ffff888118495030
FS:  0000555555610300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6ac54101f0 CR3: 000000011e4f0000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	5c                   	pop    %rsp
   1:	24 68                	and    $0x68,%al
   3:	48 89 d8             	mov    %rbx,%rax
   6:	48 c1 e8 03          	shr    $0x3,%rax
   a:	42 80 3c 30 00       	cmpb   $0x0,(%rax,%r14,1)
   f:	74 08                	je     0x19
  11:	48 89 df             	mov    %rbx,%rdi
  14:	e8 ad 17 dd fe       	callq  0xfedd17c6
  19:	4c 8b 2b             	mov    (%rbx),%r13
  1c:	49 8d 9d d0 00 00 00 	lea    0xd0(%r13),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 0f b6 04 30       	movzbl (%rax,%r14,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	0f 85 c0 03 00 00    	jne    0x3f7
  37:	0f b6 1b             	movzbl (%rbx),%ebx
  3a:	89 de                	mov    %ebx,%esi
  3c:	83 e6 01             	and    $0x1,%esi
  3f:	45                   	rex.RB

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/01 05:44 android13-5.10-lts 43c801dc3325 babc4389 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2023/01/03 06:19 android12-5.10-lts 003c389455eb ab32d508 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2023/01/03 15:56 android12-5.10-lts 003c389455eb f0036e18 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2023/10/07 08:56 android13-5.10-lts a27512601c2d 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2023/06/17 20:41 android13-5.10-lts 8a30c9beebe8 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2023/06/01 04:37 android13-5.10-lts 43c801dc3325 babc4389 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2023/05/18 04:15 android13-5.10-lts 43c801dc3325 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2023/03/29 20:09 android12-5.10-lts 416c4356f372 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2023/03/26 03:03 android12-5.10-lts 416c4356f372 fbf0499a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2023/01/03 15:22 android12-5.10-lts 003c389455eb f0036e18 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
* Struck through repros no longer work on HEAD.