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: 1345d, last: 13d
▶
▼
Last patch testing requests (10)
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
* Struck through repros no longer work on HEAD.