Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in virtio_transport_stream_has_data
kmalloc include/linux/slab.h:581 [inline]
kzalloc include/linux/slab.h:714 [inline]
virtio_transport_do_socket_init+0x27/0xe0 net/vmw_vsock/virtio_transport_common.c:593
vsock_assign_transport+0x200/0x320 net/vmw_vsock/af_vsock.c:502
vsock_connect+0x128/0x5e0 net/vmw_vsock/af_vsock.c:1345
__sys_connect_file+0x92/0xa0 net/socket.c:1900
io_connect+0x8a/0x370 fs/io_uring.c:5679
io_issue_sqe+0x119d/0x3210 fs/io_uring.c:7171
__io_queue_sqe fs/io_uring.c:7499 [inline]
io_queue_sqe fs/io_uring.c:7541 [inline]
io_submit_sqe fs/io_uring.c:7746 [inline]
io_submit_sqes+0x553/0x3020 fs/io_uring.c:7852
__do_sys_io_uring_enter+0x6dd/0x10e0 fs/io_uring.c:10797
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
general protection fault, probably for non-canonical address 0xfd887c08fd8b4219: 0000 [#1] PREEMPT SMP
CPU: 0 PID: 4176 Comm: syz-executor.2 Not tainted 5.18.0-rc3-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__pv_queued_spin_lock_slowpath+0x1ad/0x2d0 kernel/locking/qspinlock.c:471
Code: eb 96 83 e0 03 c1 ea 12 41 be 01 00 00 00 4c 8d 6b 14 48 c1 e0 05 4c 8d a0 00 c7 02 00 8d 42 ff 48 98 4c 03 24 c5 a0 58 7c 85 <49> 89 1c 24 b8 00 80 00 00 eb 15 84 c0 75 0a 41 0f b6 54 24 14 84
RSP: 0018:ffffc90003bbbb70 EFLAGS: 00010282
RAX: 0000000000003ffe RBX: ffff88813bc2c700 RCX: 0000000000000001
RDX: 0000000000003fff RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff88811825920c R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff842cd014 R11: 0000000000000000 R12: fd887c08fd8b4219
R13: ffff88813bc2c714 R14: 0000000000000001 R15: 0000000000040000
FS: 00007f638a3de700(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f638a3bd718 CR3: 000000011877e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline]
queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
do_raw_spin_lock include/linux/spinlock.h:185 [inline]
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:127 [inline]
_raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178
spin_lock_bh include/linux/spinlock.h:354 [inline]
virtio_transport_stream_has_data+0x1f/0x40 net/vmw_vsock/virtio_transport_common.c:542
virtio_transport_notify_poll_in+0x17/0x40 net/vmw_vsock/virtio_transport_common.c:637
vsock_poll+0x24a/0x4f0 net/vmw_vsock/af_vsock.c:1069
sock_poll+0x7b/0x1d0 net/socket.c:1306
vfs_poll include/linux/poll.h:88 [inline]
__io_arm_poll_handler+0xb3/0x350 fs/io_uring.c:6106
io_arm_poll_handler+0x203/0x4f0 fs/io_uring.c:6200
io_queue_sqe_arm_apoll+0x31/0x120 fs/io_uring.c:7474
__io_queue_sqe fs/io_uring.c:7514 [inline]
io_queue_sqe fs/io_uring.c:7541 [inline]
io_submit_sqe fs/io_uring.c:7746 [inline]
io_submit_sqes+0x2f3a/0x3020 fs/io_uring.c:7852
__do_sys_io_uring_enter+0x6dd/0x10e0 fs/io_uring.c:10797
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f6389289049
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f638a3de168 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa
RAX: ffffffffffffffda RBX: 00007f638939bf60 RCX: 00007f6389289049
RDX: 0000000000000000 RSI: 00000000000067b5 RDI: 0000000000000003
RBP: 00007f63892e308d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd20eb8b9f R14: 00007f638a3de300 R15: 0000000000022000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__pv_queued_spin_lock_slowpath+0x1ad/0x2d0 kernel/locking/qspinlock.c:471
Code: eb 96 83 e0 03 c1 ea 12 41 be 01 00 00 00 4c 8d 6b 14 48 c1 e0 05 4c 8d a0 00 c7 02 00 8d 42 ff 48 98 4c 03 24 c5 a0 58 7c 85 <49> 89 1c 24 b8 00 80 00 00 eb 15 84 c0 75 0a 41 0f b6 54 24 14 84
RSP: 0018:ffffc90003bbbb70 EFLAGS: 00010282
RAX: 0000000000003ffe RBX: ffff88813bc2c700 RCX: 0000000000000001
RDX: 0000000000003fff RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff88811825920c R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff842cd014 R11: 0000000000000000 R12: fd887c08fd8b4219
R13: ffff88813bc2c714 R14: 0000000000000001 R15: 0000000000040000
FS: 00007f638a3de700(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f638a3bd718 CR3: 000000011877e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: eb 96 jmp 0xffffff98
2: 83 e0 03 and $0x3,%eax
5: c1 ea 12 shr $0x12,%edx
8: 41 be 01 00 00 00 mov $0x1,%r14d
e: 4c 8d 6b 14 lea 0x14(%rbx),%r13
12: 48 c1 e0 05 shl $0x5,%rax
16: 4c 8d a0 00 c7 02 00 lea 0x2c700(%rax),%r12
1d: 8d 42 ff lea -0x1(%rdx),%eax
20: 48 98 cltq
22: 4c 03 24 c5 a0 58 7c add -0x7a83a760(,%rax,8),%r12
29: 85
* 2a: 49 89 1c 24 mov %rbx,(%r12) <-- trapping instruction
2e: b8 00 80 00 00 mov $0x8000,%eax
33: eb 15 jmp 0x4a
35: 84 c0 test %al,%al
37: 75 0a jne 0x43
39: 41 0f b6 54 24 14 movzbl 0x14(%r12),%edx
3f: 84 .byte 0x84
Tested on:
commit: b2d229d4 Linux 5.18-rc3
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=13439c44f00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=e6156282f3a672da
patch:
https://syzkaller.appspot.com/x/patch.diff?x=11bc3394f00000