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: 1206d, last: 4d22h
▶
▼
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
|
▶
▼
Last patch testing requests (4)
▶
▼
Fix bisection attempts (11)
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
* Struck through repros no longer work on HEAD.