[v5.15] WARNING: suspicious RCU usage in kvm_vcpu_memslots

1 view
Skip to first unread message

syzbot

unread,
Mar 10, 2023, 6:13:43 AM3/10/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: abddfcf701a5 Linux 5.15.99
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1584b984c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=e8038112e99511e7
dashboard link: https://syzkaller.appspot.com/bug?extid=a703fc5de924fa2e1ae8
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/5d41fec63ff8/disk-abddfcf7.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/69db433dc01f/vmlinux-abddfcf7.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a00e1270bd95/bzImage-abddfcf7.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a703fc...@syzkaller.appspotmail.com

=============================
WARNING: suspicious RCU usage
5.15.99-syzkaller #0 Not tainted
-----------------------------
include/linux/kvm_host.h:880 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
1 lock held by syz-executor.1/7226:
#0: ffff888078dd00c8 (&vcpu->mutex){+.+.}-{3:3}, at: kvm_vcpu_ioctl+0x1d4/0xcf0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3820

stack backtrace:
CPU: 0 PID: 7226 Comm: syz-executor.1 Not tainted 5.15.99-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
__kvm_memslots include/linux/kvm_host.h:878 [inline]
kvm_vcpu_memslots+0x1b7/0x200 include/linux/kvm_host.h:892
kvm_vcpu_gfn_to_memslot+0x2b/0x390 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2120
kvm_vcpu_unmap+0x5d/0x80 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2735
nested_vmx_vmexit+0x1451/0x2c30 arch/x86/kvm/vmx/nested.c:4656
vmx_leave_nested+0x7d/0xb0 arch/x86/kvm/vmx/nested.c:6316
kvm_leave_nested arch/x86/kvm/x86.c:618 [inline]
kvm_vcpu_ioctl_x86_set_vcpu_events+0x8d8/0x10e0 arch/x86/kvm/x86.c:4793
kvm_arch_vcpu_ioctl+0x120e/0x1d40 arch/x86/kvm/x86.c:5278
kvm_vcpu_ioctl+0x6db/0xcf0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3999
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fea50a490f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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:00007fea4efbb168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fea50b68f80 RCX: 00007fea50a490f9
RDX: 0000000020000080 RSI: 000000004040aea0 RDI: 0000000000000005
RBP: 00007fea50aa4ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff768102cf R14: 00007fea4efbb300 R15: 0000000000022000
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Mar 26, 2023, 12:44:36 AM3/26/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 115472395b0a Linux 5.15.104
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1390b34dc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=f5592cc4916e1c2f
dashboard link: https://syzkaller.appspot.com/bug?extid=a703fc5de924fa2e1ae8
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1291be05c80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=136404b6c80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6c2c0744c7e0/disk-11547239.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7ea4c5ecca4f/vmlinux-11547239.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9a231dbcf423/bzImage-11547239.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a703fc...@syzkaller.appspotmail.com

L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details.
=============================
WARNING: suspicious RCU usage
5.15.104-syzkaller #0 Not tainted
-----------------------------
include/linux/kvm_host.h:880 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
1 lock held by syz-executor272/3583:
#0: ffff888023cf40c8 (&vcpu->mutex){+.+.}-{3:3}, at: kvm_vcpu_ioctl+0x1d4/0xcf0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3840

stack backtrace:
CPU: 1 PID: 3583 Comm: syz-executor272 Not tainted 5.15.104-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
__kvm_memslots include/linux/kvm_host.h:878 [inline]
kvm_vcpu_memslots+0x1b7/0x200 include/linux/kvm_host.h:892
kvm_vcpu_gfn_to_memslot+0x2b/0x390 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2140
kvm_vcpu_unmap+0x5d/0x80 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2755
nested_vmx_vmexit+0x1451/0x2b50 arch/x86/kvm/vmx/nested.c:4662
vmx_leave_nested+0x7d/0xb0 arch/x86/kvm/vmx/nested.c:6322
kvm_leave_nested arch/x86/kvm/x86.c:618 [inline]
kvm_vcpu_ioctl_x86_set_vcpu_events+0x8d8/0x10e0 arch/x86/kvm/x86.c:4793
kvm_arch_vcpu_ioctl+0x120e/0x1d40 arch/x86/kvm/x86.c:5278
kvm_vcpu_ioctl+0x6db/0xcf0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4019
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7feb3d7f9ed9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff7fd5cd28 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007feb3d7f9ed9
RDX: 00000000200000c0 RSI: 000000004040aea0 RDI: 0000000000000005
RBP: 00007feb3d7bd9d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007feb3d7bda60
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>

Reply all
Reply to author
Forward
0 new messages