syzbot


WARNING in kvm_mmu_notifier_invalidate_range_start (2)

Status: fixed on 2023/02/24 13:50
Subsystems: kvm
[Documentation on labels]
Reported-by: syzbot+6bde52d89cfdf9f61425@syzkaller.appspotmail.com
Fix commit: 01e67e04c281 mmmremap.c: avoid pointless invalidate_range_start/end on mremap(old_size=0)
First crash: 763d, last: 746d
Cause bisection: introduced by (bisect log) :
commit ed922739c9199bf515a3e7fec3e319ce1edeef2a
Author: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Date: Mon Dec 6 19:54:28 2021 +0000

  KVM: Use interval tree to do fast hva lookup in memslots

Crash: WARNING in kvm_mmu_notifier_invalidate_range_start (log)
Repro: C syz .config
  
Discussions (11)
Title Replies (including bot) Last reply
[PATCH 4.19 000/338] 4.19.238-rc1 review 357 (358) 2022/12/17 09:01
[PATCH 4.14 000/284] 4.14.276-rc1 review 297 (298) 2022/09/12 10:15
[PATCH 4.9 000/218] 4.9.311-rc1 review 224 (225) 2022/04/19 10:09
[PATCH 5.4 000/475] 5.4.189-rc1 review 485 (486) 2022/04/15 15:35
[PATCH 5.17 000/343] 5.17.3-rc1 review 355 (355) 2022/04/13 20:33
[PATCH 5.16 000/285] 5.16.20-rc1 review 294 (294) 2022/04/13 20:17
[PATCH 5.10 000/171] 5.10.111-rc1 review 175 (175) 2022/04/13 01:43
[PATCH 5.15 000/277] 5.15.34-rc1 review 288 (288) 2022/04/12 17:34
[patch 5/9] mmmremap.c: avoid pointless invalidate_range_start/end on mremap(old_size=0) 1 (1) 2022/04/08 20:09
[PATCH] mm: avoid pointless invalidate_range_start/end on mremap(old_size=0) 1 (1) 2022/03/29 17:31
[syzbot] WARNING in kvm_mmu_notifier_invalidate_range_start (2) 3 (4) 2022/03/28 15:22
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in kvm_mmu_notifier_invalidate_range_start (3) kvm C inconclusive done 44 93d 154d 26/26 fixed on 2024/03/07 14:02
upstream WARNING in kvm_mmu_notifier_invalidate_range_start kvm C done 19 781d 842d 20/26 fixed on 2022/03/08 16:11

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3597 at arch/x86/kvm/../../../virt/kvm/kvm_main.c:529 __kvm_handle_hva_range arch/x86/kvm/../../../virt/kvm/kvm_main.c:529 [inline]
WARNING: CPU: 0 PID: 3597 at arch/x86/kvm/../../../virt/kvm/kvm_main.c:529 kvm_mmu_notifier_invalidate_range_start+0x97a/0xb20 arch/x86/kvm/../../../virt/kvm/kvm_main.c:714
Modules linked in:
CPU: 0 PID: 3597 Comm: syz-executor812 Not tainted 5.17.0-rc8-syzkaller-00003-g56e337f2cf13 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__kvm_handle_hva_range arch/x86/kvm/../../../virt/kvm/kvm_main.c:529 [inline]
RIP: 0010:kvm_mmu_notifier_invalidate_range_start+0x97a/0xb20 arch/x86/kvm/../../../virt/kvm/kvm_main.c:714
Code: 00 48 c7 c2 60 0c a2 89 be b9 01 00 00 48 c7 c7 c0 10 a2 89 c6 05 ed 71 76 0c 01 e8 79 84 ff 07 e9 73 ff ff ff e8 b6 cd 6f 00 <0f> 0b e9 88 fc ff ff e8 aa cd 6f 00 0f 0b e9 58 fc ff ff e8 9e cd
RSP: 0018:ffffc9000282f948 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 000000002000d000 RCX: 0000000000000000
RDX: ffff88807e253a00 RSI: ffffffff8108f27a RDI: 0000000000000003
RBP: ffffc90002b69290 R08: 000000002000d000 R09: ffffc90002b692e3
R10: ffffffff8108eb1c R11: 0000000000000001 R12: ffffc90002b72240
R13: ffffc90002b68000 R14: ffffc9000282fc18 R15: 000000002000d000
FS:  0000555556fa7300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000562046d7f058 CR3: 000000001ed76000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 mn_hlist_invalidate_range_start mm/mmu_notifier.c:493 [inline]
 __mmu_notifier_invalidate_range_start+0x2ff/0x800 mm/mmu_notifier.c:548
 mmu_notifier_invalidate_range_start include/linux/mmu_notifier.h:459 [inline]
 move_page_tables+0x2642/0x2d20 mm/mremap.c:498
 move_vma+0x48c/0xf40 mm/mremap.c:629
 mremap_to mm/mremap.c:862 [inline]
 __do_sys_mremap+0xf01/0x1560 mm/mremap.c:972
 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:0x7f8be8dec089
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:00007ffc5b169b88 EFLAGS: 00000246 ORIG_RAX: 0000000000000019
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f8be8dec089
RDX: 0000000000001000 RSI: fffffffffffffe74 RDI: 000000002000d000
RBP: 00007f8be8db0070 R08: 0000000020007000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 00007f8be8db0100
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/17 11:08 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C ci-upstream-kasan-gce WARNING in kvm_mmu_notifier_invalidate_range_start
2022/03/17 10:48 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C ci-upstream-kasan-gce WARNING in kvm_mmu_notifier_invalidate_range_start
2022/03/17 10:33 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C ci-upstream-kasan-gce-smack-root WARNING in kvm_mmu_notifier_invalidate_range_start
2022/03/17 10:29 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C ci-upstream-kasan-gce WARNING in kvm_mmu_notifier_invalidate_range_start
2022/03/17 10:29 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C ci-upstream-kasan-gce-selinux-root WARNING in kvm_mmu_notifier_invalidate_range_start
2022/04/03 16:09 upstream be2d3ecedd99 79a2a8fc .config console log report info ci-qemu-upstream WARNING in kvm_mmu_notifier_invalidate_range_start
2022/04/03 16:05 upstream be2d3ecedd99 79a2a8fc .config console log report info ci-upstream-kasan-gce WARNING in kvm_mmu_notifier_invalidate_range_start
2022/04/03 15:58 upstream be2d3ecedd99 79a2a8fc .config console log report info ci-upstream-kasan-gce-smack-root WARNING in kvm_mmu_notifier_invalidate_range_start
2022/04/03 15:57 upstream be2d3ecedd99 79a2a8fc .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in kvm_mmu_notifier_invalidate_range_start
2022/03/23 19:45 upstream 6b1f86f8e9c7 5ff41e94 .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in kvm_mmu_notifier_invalidate_range_start
2022/03/17 10:18 upstream 56e337f2cf13 dfa9a8ed .config console log report info ci-upstream-kasan-gce-smack-root WARNING in kvm_mmu_notifier_invalidate_range_start
2022/03/17 10:14 upstream 56e337f2cf13 dfa9a8ed .config console log report info ci-upstream-kasan-gce-selinux-root WARNING in kvm_mmu_notifier_invalidate_range_start
2022/03/17 10:14 upstream 56e337f2cf13 dfa9a8ed .config console log report info ci-upstream-kasan-gce WARNING in kvm_mmu_notifier_invalidate_range_start
2022/04/03 15:59 linux-next e5071887cd22 79a2a8fc .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in kvm_mmu_notifier_invalidate_range_start
* Struck through repros no longer work on HEAD.