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: 1345d, last: 13d
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 (8)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 general protection fault in __device_attach (2) 2 syz, C 5 538d 1345d 0/2 upstream: reported C repro on 2023/01/03 03:10
upstream general protection fault in __device_attach kernel 2 syz, C done done 2 1003d 1639d 0/29 auto-obsoleted due to no activity on 2024/03/19 23:28
upstream general protection fault in __device_attach (2) prio:high kernel 2 C 4 25d 25d 0/29 upstream: reported C repro on 2026/08/14 08:51
android-6-1 general protection fault in __device_attach origin:upstream 2 syz, C error error 3 196d 1196d 0/2 upstream: reported C repro on 2023/06/01 06:12
linux-4.19 general protection fault in __device_attach 2 syz, C error 35 1290d 2098d 0/1 upstream: reported C repro on 2020/12/11 04:31
android-5-10 general protection fault in __device_attach 2 1 1592d 1592d 0/2 auto-closed as invalid on 2022/07/29 21:17
android-5-15 general protection fault in __device_attach origin:upstream 2 syz, C error error 7 14d 1344d 0/2 upstream: reported C repro on 2023/01/03 07:29
android-54 general protection fault in __device_attach 2 8 1783d 2039d 0/2 auto-closed as invalid on 2022/02/18 18:30
Last patch testing requests (10)
Created Duration User Patch Repo Result
2026/07/24 23:27 12m retest repro android13-5.10-lts log
2026/06/06 08:29 12m retest repro android13-5.10-lts log
2026/05/11 04:12 17m retest repro android13-5.10-lts report log
2026/03/12 13:47 9m retest repro android13-5.10-lts report log
2026/02/26 11:54 1h41m retest repro android13-5.10-lts report log
2026/01/01 11:16 11m retest repro android13-5.10-lts report log
2025/12/17 21:37 5m retest repro android13-5.10-lts report log
2025/10/23 10:53 5m retest repro android13-5.10-lts report log
2025/10/08 04:51 6m retest repro android13-5.10-lts report log
2025/08/14 03:20 5m retest repro android13-5.10-lts report log

Sample crash report:
RBP: 0000000000000001 R08: 0000000000000000 R09: 00007ffcfda60034
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbe732c6cd8
R13: 0000000000000002 R14: 00007fbe732c6c40 R15: 0000000000000002
---[ end trace 8370363dff08602d ]---
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: 297 Comm: syz-executor244 Tainted: G        W         syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:__device_attach+0xae/0x410 drivers/base/dd.c:908
Code: 8d 66 68 4c 89 e0 48 c1 e8 03 80 3c 18 00 74 08 4c 89 e7 e8 74 29 ef fe 4d 8b 2c 24 4d 8d a5 d0 00 00 00 4c 89 e0 48 c1 e8 03 <0f> b6 04 18 84 c0 0f 85 32 03 00 00 41 0f b6 1c 24 89 de 83 e6 01
RSP: 0018:ffffc90000af79e0 EFLAGS: 00010202
RAX: 000000000000001a RBX: dffffc0000000000 RCX: ffffffff8480ec62
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc90000af7960
RBP: ffffc90000af7a90 R08: ffffc90000af7967 R09: 1ffff9200015ef2c
R10: dffffc0000000000 R11: fffff5200015ef2d R12: 00000000000000d0
R13: 0000000000000000 R14: ffff88810b0000b8 R15: 0000000000000000
FS:  0000555578a973c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa61326b7b0 CR3: 000000011d254000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 device_attach+0x17/0x20 drivers/base/dd.c:975
 pci_bus_add_device+0x7a/0x110 drivers/pci/bus.c:324
 pci_bus_add_devices+0x94/0x1c0 drivers/pci/bus.c:347
 pci_rescan_bus+0x2c/0x40 drivers/pci/probe.c:3268
 rescan_store+0xc9/0x150 drivers/pci/pci-sysfs.c:439
 bus_attr_store+0x79/0xa0 drivers/base/bus.c:124
 sysfs_kf_write+0x129/0x150 fs/sysfs/file.c:139
 kernfs_fop_write_iter+0x2bd/0x400 fs/kernfs/file.c:296
 call_write_iter include/linux/fs.h:2066 [inline]
 new_sync_write fs/read_write.c:518 [inline]
 vfs_write+0x770/0xd70 fs/read_write.c:605
 ksys_write+0x14a/0x260 fs/read_write.c:658
 __do_sys_write fs/read_write.c:670 [inline]
 __se_sys_write fs/read_write.c:667 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:667
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fbe7323d4e9
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 00 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcfda63898 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 7379735f796d2f2e RCX: 00007fbe7323d4e9
RDX: 0000000000000001 RSI: 0000200000000a00 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000000000000 R09: 00007ffcfda60034
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbe732c6cd8
R13: 0000000000000002 R14: 00007fbe732c6c40 R15: 0000000000000002
Modules linked in:
---[ end trace 8370363dff08602e ]---
RIP: 0010:__device_attach+0xae/0x410 drivers/base/dd.c:908
Code: 8d 66 68 4c 89 e0 48 c1 e8 03 80 3c 18 00 74 08 4c 89 e7 e8 74 29 ef fe 4d 8b 2c 24 4d 8d a5 d0 00 00 00 4c 89 e0 48 c1 e8 03 <0f> b6 04 18 84 c0 0f 85 32 03 00 00 41 0f b6 1c 24 89 de 83 e6 01
RSP: 0018:ffffc90000af79e0 EFLAGS: 00010202
RAX: 000000000000001a RBX: dffffc0000000000 RCX: ffffffff8480ec62
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc90000af7960
RBP: ffffc90000af7a90 R08: ffffc90000af7967 R09: 1ffff9200015ef2c
R10: dffffc0000000000 R11: fffff5200015ef2d R12: 00000000000000d0
R13: 0000000000000000 R14: ffff88810b0000b8 R15: 0000000000000000
FS:  0000555578a973c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa61326b7b0 CR3: 000000011d254000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	8d 66 68             	lea    0x68(%rsi),%esp
   3:	4c 89 e0             	mov    %r12,%rax
   6:	48 c1 e8 03          	shr    $0x3,%rax
   a:	80 3c 18 00          	cmpb   $0x0,(%rax,%rbx,1)
   e:	74 08                	je     0x18
  10:	4c 89 e7             	mov    %r12,%rdi
  13:	e8 74 29 ef fe       	call   0xfeef298c
  18:	4d 8b 2c 24          	mov    (%r12),%r13
  1c:	4d 8d a5 d0 00 00 00 	lea    0xd0(%r13),%r12
  23:	4c 89 e0             	mov    %r12,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	0f b6 04 18          	movzbl (%rax,%rbx,1),%eax <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	0f 85 32 03 00 00    	jne    0x368
  36:	41 0f b6 1c 24       	movzbl (%r12),%ebx
  3b:	89 de                	mov    %ebx,%esi
  3d:	83 e6 01             	and    $0x1,%esi

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/30 17:10 android13-5.10-lts 50b3a256e550 2377cd3d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
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
2026/08/26 19:08 android13-5.10-lts 174d3ccb72b8 a2b77b9e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2026/08/25 13:11 android13-5.10-lts f01343e230a3 a9a1fc32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2026/08/18 01:48 android13-5.10-lts e334a66065d3 1e72964b .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2026/08/08 02:06 android13-5.10-lts 447db0046f21 e4ef95d6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in __device_attach
2026/07/30 16:44 android13-5.10-lts 50b3a256e550 2377cd3d .config console log report info [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.