syzbot


WARNING: kmalloc bug in kvm_page_track_create_memslot

Status: closed as dup on 2021/10/18 08:10
Subsystems: kvm
[Documentation on labels]
Reported-by: syzbot+d9c9b7cff3d4ec7a589e@syzkaller.appspotmail.com
First crash: 1169d, last: 1149d
Cause bisection: introduced by (bisect log) [no-op commit]:
commit 8fbb8c334ff13a6afd88c73e85684bc7b82bd775
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Mon Jun 7 17:39:02 2021 +0000

  arm64: dts: renesas: salvator-x(s): Factor out HDMI1 parts

Crash: BUG: spinlock bad magic in synchronize_srcu (log)
Repro: C syz .config
  
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
WARNING: kmalloc bug in memslot_rmap_alloc kvm C unreliable 3 1178d 1207d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] WARNING: kmalloc bug in kvm_page_track_create_memslot 1 (2) 2021/10/18 08:10

Sample crash report:
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.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 6540 at mm/util.c:597 kvmalloc_node+0x111/0x120 mm/util.c:597
Modules linked in:
CPU: 0 PID: 6540 Comm: syz-executor791 Not tainted 5.15.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:kvmalloc_node+0x111/0x120 mm/util.c:597
Code: 01 00 00 00 4c 89 e7 e8 6d 18 0d 00 49 89 c5 e9 69 ff ff ff e8 60 91 d0 ff 41 89 ed 41 81 cd 00 20 01 00 eb 95 e8 4f 91 d0 ff <0f> 0b e9 4c ff ff ff 0f 1f 84 00 00 00 00 00 55 48 89 fd 53 e8 36
RSP: 0018:ffffc90002fbf848 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88801d1a5580 RSI: ffffffff81a65bd1 RDI: 0000000000000003
RBP: 0000000000400dc0 R08: 000000007fffffff R09: ffff8880b9c32a0b
R10: ffffffff81a65b8e R11: 000000000000003f R12: 00000000e0000000
R13: 0000000000000000 R14: 00000000ffffffff R15: ffffc90002fbfab0
FS:  0000555556a1f300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007feae003d018 CR3: 0000000070e1c000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kvmalloc include/linux/mm.h:805 [inline]
 kvmalloc_array include/linux/mm.h:823 [inline]
 kvcalloc include/linux/mm.h:828 [inline]
 kvm_page_track_create_memslot+0x50/0x110 arch/x86/kvm/mmu/page_track.c:39
 kvm_alloc_memslot_metadata arch/x86/kvm/x86.c:11519 [inline]
 kvm_arch_prepare_memory_region+0x350/0x610 arch/x86/kvm/x86.c:11556
 kvm_set_memslot+0x172/0x1a40 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1592
 __kvm_set_memory_region+0xc1c/0x13d0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1755
 kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1776 [inline]
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1788 [inline]
 kvm_vm_ioctl+0x520/0x23d0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4363
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f9be7a62029
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:00007ffebfd31ef8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9be7a62029
RDX: 00000000200001c0 RSI: 000000004020ae46 RDI: 0000000000000004
RBP: 00007f9be7a26010 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9be7a260a0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/24 03:35 upstream 9c0c4d24ac00 282f03fb .config console log report syz C ci-upstream-kasan-gce WARNING: kmalloc bug in kvm_page_track_create_memslot
2021/10/24 00:59 upstream 9c0c4d24ac00 282f03fb .config console log report syz C ci-upstream-kasan-gce WARNING: kmalloc bug in kvm_page_track_create_memslot
2021/10/17 16:40 upstream d999ade1cc86 0c5d9412 .config console log report syz C ci-upstream-kasan-gce-386 WARNING: kmalloc bug in kvm_page_track_create_memslot
2021/11/03 07:46 upstream bfc484fe6abb 17f3edd2 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in kvm_page_track_create_memslot
2021/11/02 01:31 upstream e66435936756 098b5d53 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in kvm_page_track_create_memslot
2021/10/21 03:11 upstream 8e37395c3a5d f111d03b .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in kvm_page_track_create_memslot
2021/10/17 17:09 upstream d999ade1cc86 0c5d9412 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING: kmalloc bug in kvm_page_track_create_memslot
2021/10/17 17:01 upstream d999ade1cc86 0c5d9412 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in kvm_page_track_create_memslot
2021/10/14 06:38 upstream 348949d9a444 5462d470 .config console log report info ci-upstream-kasan-gce-smack-root WARNING: kmalloc bug in kvm_page_track_create_memslot
2021/10/14 06:36 upstream 348949d9a444 5462d470 .config console log report info ci-upstream-kasan-gce WARNING: kmalloc bug in kvm_page_track_create_memslot
2021/10/17 16:21 upstream d999ade1cc86 0c5d9412 .config console log report info ci-upstream-kasan-gce-386 WARNING: kmalloc bug in kvm_page_track_create_memslot
* Struck through repros no longer work on HEAD.