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: 1206d, last: 4d09h
Cause bisection: failed (error log, bisect log)
  
Fix 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 (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 549d 1355d 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 1013d 1650d 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 36d 36d 0/29 upstream: reported C repro on 2026/08/14 08:51
android-5-10 general protection fault in __device_attach (2) 2 syz, C error inconclusive 16 9d09h 1354d 0/2 upstream: reported C repro on 2023/01/03 15:59
linux-4.19 general protection fault in __device_attach 2 syz, C error 35 1300d 2108d 0/1 upstream: reported C repro on 2020/12/11 04:31
android-5-10 general protection fault in __device_attach 2 1 1602d 1602d 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 8d21h 1355d 0/2 upstream: reported C repro on 2023/01/03 07:29
android-54 general protection fault in __device_attach 2 8 1793d 2049d 0/2 auto-closed as invalid on 2022/02/18 18:30
Last patch testing requests (4)
Created Duration User Patch Repo Result
2026/07/31 23:30 16m retest repro android14-6.1 error
2026/07/31 23:30 11m retest repro android14-6.1 error
2026/05/16 02:32 17m retest repro android14-6.1 log
2026/05/16 02:32 30m retest repro android14-6.1 log
Fix bisection attempts (11)
Created Duration User Patch Repo Result
2024/10/14 23:59 0m bisect fix android14-6.1 error job log
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:
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:00007fffd64f98a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000200000000000 RCX: 00007f44abe354e9
RDX: 0000000000000001 RSI: 0000200000000300 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000000000000 R09: 00007f44abec0034
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f44abebecd8
R13: 0000000000000002 R14: 0000200000000004 R15: 0000000000000002
 </TASK>
---[ end trace 0000000000000000 ]---
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: 304 Comm: syz-executor687 Tainted: G        W          syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:__device_attach+0xae/0x420 drivers/base/dd.c:1014
Code: 8d 66 68 4c 89 e0 48 c1 e8 03 80 3c 18 00 74 08 4c 89 e7 e8 44 15 d2 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 3a 03 00 00 41 0f b6 1c 24 89 de 83 e6 01
RSP: 0018:ffffc90000ee79e0 EFLAGS: 00010202
RAX: 000000000000001a RBX: dffffc0000000000 RCX: ffffffff85009323
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc90000ee7960
RBP: ffffc90000ee7a90 R08: ffffc90000ee7967 R09: 1ffff920001dcf2c
R10: dffffc0000000000 R11: fffff520001dcf2d R12: 00000000000000d0
R13: 0000000000000000 R14: ffff8881003f40d0 R15: 0000000000000000
FS:  00005555704383c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000000000 CR3: 0000000122535000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 device_attach+0x17/0x20 drivers/base/dd.c:1081
 pci_bus_add_device+0x7a/0x110 drivers/pci/bus.c:345
 pci_bus_add_devices+0x94/0x1c0 drivers/pci/bus.c:368
 pci_rescan_bus+0x2c/0x40 drivers/pci/probe.c:3337
 rescan_store+0xc9/0x150 drivers/pci/pci-sysfs.c:465
 bus_attr_store+0x88/0xb0 drivers/base/bus.c:124
 sysfs_kf_write+0x137/0x150 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x307/0x470 fs/kernfs/file.c:352
 call_write_iter include/linux/fs.h:2282 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x5ef/0xd00 fs/read_write.c:584
 ksys_write+0x14a/0x260 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:646
 x64_sys_call+0x27b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f44abe354e9
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:00007fffd64f98a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000200000000000 RCX: 00007f44abe354e9
RDX: 0000000000000001 RSI: 0000200000000300 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000000000000 R09: 00007f44abec0034
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f44abebecd8
R13: 0000000000000002 R14: 0000200000000004 R15: 0000000000000002
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__device_attach+0xae/0x420 drivers/base/dd.c:1014
Code: 8d 66 68 4c 89 e0 48 c1 e8 03 80 3c 18 00 74 08 4c 89 e7 e8 44 15 d2 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 3a 03 00 00 41 0f b6 1c 24 89 de 83 e6 01
RSP: 0018:ffffc90000ee79e0 EFLAGS: 00010202

RAX: 000000000000001a RBX: dffffc0000000000 RCX: ffffffff85009323
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffc90000ee7960
RBP: ffffc90000ee7a90 R08: ffffc90000ee7967 R09: 1ffff920001dcf2c
R10: dffffc0000000000 R11: fffff520001dcf2d R12: 00000000000000d0
R13: 0000000000000000 R14: ffff8881003f40d0 R15: 0000000000000000
FS:  00005555704383c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000000000 CR3: 0000000122535000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	c0 79 93 eb          	sarb   $0xeb,-0x6d(%rcx)
   4:	d5 48 8d 7c 1d 00    	lea    0x0(%rbp,%rbx,1),%r23
   a:	eb 99                	jmp    0xffffffa5
   c:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  11:	48 89 f8             	mov    %rdi,%rax
  14:	48 89 f7             	mov    %rsi,%rdi
  17:	48 89 d6             	mov    %rdx,%rsi
  1a:	48 89 ca             	mov    %rcx,%rdx
  1d:	4d 89 c2             	mov    %r8,%r10
  20:	4d 89 c8             	mov    %r9,%r8
  23:	4c 8b 4c 24 08       	mov    0x8(%rsp),%r9
  28:	0f 05                	syscall
* 2a:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax <-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	ret
  33:	48 c7 c1 d8 ff ff ff 	mov    $0xffffffffffffffd8,%rcx
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/10 05:04 android14-6.1 6f22c036600e 4e8b1cc6 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in __device_attach
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
2026/09/15 01:14 android14-6.1 f52fadf7c78f 81a27d1a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in __device_attach
2026/09/10 04:21 android14-6.1 6f22c036600e 4e8b1cc6 .config console log report info [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.