syzbot


general protection fault in __device_attach

Status: upstream: reported C repro on 2023/06/01 06:12
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+0c679ec3d59566f18c1d@syzkaller.appspotmail.com
First crash: 496d, last: 31d
Cause bisection: failed (error log, bisect log)
  
Bug presence (2)
Date Name Commit Repro Result
2023/06/01 lts (merge base) b1644a0031cf C [report] general protection fault in __device_attach
2023/06/01 upstream (ToT) 929ed21dfdb6 C [report] general protection fault in __device_attach
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 61d 645d 0/2 upstream: reported C repro on 2023/01/03 03:10
upstream general protection fault in __device_attach kernel C done done 2 303d 940d 0/28 auto-obsoleted due to no activity on 2024/03/19 23:28
android-5-10 general protection fault in __device_attach (2) C error inconclusive 10 49d 645d 0/2 upstream: reported C repro on 2023/01/03 15:59
linux-4.19 general protection fault in __device_attach C error 35 590d 1398d 0/1 upstream: reported C repro on 2020/12/11 04:31
android-5-10 general protection fault in __device_attach 1 892d 892d 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 36d 645d 0/2 upstream: reported C repro on 2023/01/03 07:29
android-54 general protection fault in __device_attach 8 1083d 1340d 0/2 auto-closed as invalid on 2022/02/18 18:30
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/08/03 04:03 52m retest repro android14-6.1 report log
2024/05/25 00:02 18m retest repro android14-6.1 report log
Fix bisection attempts (10)
Created Duration User Patch Repo Result
2024/09/07 21:02 47m bisect fix android14-6.1 OK (0) job log log
2024/07/01 05:11 1h22m bisect fix android14-6.1 OK (0) job log log
2024/05/10 23:20 39m bisect fix android14-6.1 OK (0) job log log
2024/04/09 01:46 3h30m bisect fix android14-6.1 OK (0) job log log
2023/12/29 17:24 42m bisect fix android14-6.1 OK (0) job log log
2023/11/29 12:00 1h24m bisect fix android14-6.1 OK (0) job log log
2023/10/29 06:38 40m bisect fix android14-6.1 OK (0) job log log
2023/09/26 04:06 51m bisect fix android14-6.1 OK (0) job log log
2023/08/16 01:54 2h03m bisect fix android14-6.1 OK (0) job log log
2023/07/01 13:15 27m bisect fix android14-6.1 OK (0) job log log

Sample crash report:
usb usb5: device_add((null)) --> -22
general protection fault, probably for non-canonical address 0xdffffc000000001a: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000000d0-0x00000000000000d7]
CPU: 1 PID: 696 Comm: syz-executor200 Not tainted 6.1.68-syzkaller-00146-g2730733d54b6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:__device_attach+0xb4/0x510 drivers/base/dd.c:1014
Code: 5c 24 68 48 89 d8 48 c1 e8 03 42 80 3c 30 00 74 08 48 89 df e8 6d a0 c6 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 c8 03 00 00 0f b6 1b 89 de 83 e6 01 45
RSP: 0018:ffffc900018b7580 EFLAGS: 00010202
RAX: 000000000000001a RBX: 00000000000000d0 RCX: ffff88810f211440
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc900018b7500
RBP: ffffc900018b7650 R08: dffffc0000000000 R09: fffff52000316ea1
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88810f44f830
R13: 0000000000000000 R14: dffffc0000000000 R15: ffff88810f44f830
FS:  00007fdeda3116c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdeda2f0d58 CR3: 0000000122c4c000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 device_attach+0x17/0x20 drivers/base/dd.c:1081
 proc_ioctl+0x428/0x600 drivers/usb/core/devio.c:2365
 proc_ioctl_default drivers/usb/core/devio.c:2400 [inline]
 usbdev_do_ioctl drivers/usb/core/devio.c:2756 [inline]
 usbdev_ioctl+0x310c/0x5f90 drivers/usb/core/devio.c:2816
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0x114/0x190 fs/ioctl.c:856
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fdeda353559
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdeda311208 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fdeda3da3e8 RCX: 00007fdeda353559
RDX: 0000000020000040 RSI: 00000000c0105512 RDI: 0000000000000005
RBP: 00007fdeda3da3e0 R08: 0000000000000033 R09: 0000000000000033
R10: 0000000000000033 R11: 0000000000000246 R12: 00007fdeda3a717c
R13: 00007fdeda311210 R14: 0000000000000001 R15: 002330302f233030
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__device_attach+0xb4/0x510 drivers/base/dd.c:1014
Code: 5c 24 68 48 89 d8 48 c1 e8 03 42 80 3c 30 00 74 08 48 89 df e8 6d a0 c6 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 c8 03 00 00 0f b6 1b 89 de 83 e6 01 45
RSP: 0018:ffffc900018b7580 EFLAGS: 00010202
RAX: 000000000000001a RBX: 00000000000000d0 RCX: ffff88810f211440
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc900018b7500
RBP: ffffc900018b7650 R08: dffffc0000000000 R09: fffff52000316ea1
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88810f44f830
R13: 0000000000000000 R14: dffffc0000000000 R15: ffff88810f44f830
FS:  00007fdeda3116c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe4f1e8000 CR3: 0000000122c4c000 CR4: 00000000003506a0
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 6d a0 c6 fe       	call   0xfec6a086
  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 c8 03 00 00    	jne    0x3ff
  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 (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/27 21:03 android14-6.1 2730733d54b6 cc4a4020 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in __device_attach
2023/06/01 06:10 android14-6.1 78fe8913d1b2 babc4389 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in __device_attach
2024/01/27 15:39 android14-6.1 2730733d54b6 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in __device_attach
* Struck through repros no longer work on HEAD.