================================================================== BUG: KASAN: slab-out-of-bounds in search_memslots include/linux/kvm_host.h:1029 [inline] BUG: KASAN: slab-out-of-bounds in __gfn_to_memslot include/linux/kvm_host.h:1054 [inline] BUG: KASAN: slab-out-of-bounds in gfn_to_memslot arch/x86/kvm/../../../virt/kvm/kvm_main.c:1604 [inline] BUG: KASAN: slab-out-of-bounds in gfn_to_hva+0x3f7/0x430 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1684 Read of size 8 at addr ffff888090d23410 by task syz-executor.3/8585 CPU: 0 PID: 8585 Comm: syz-executor.3 Not tainted 5.6.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x128/0x182 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x317 mm/kasan/report.c:374 __kasan_report.cold.11+0x1c/0x34 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:641 search_memslots include/linux/kvm_host.h:1029 [inline] __gfn_to_memslot include/linux/kvm_host.h:1054 [inline] gfn_to_memslot arch/x86/kvm/../../../virt/kvm/kvm_main.c:1604 [inline] gfn_to_hva+0x3f7/0x430 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1684 kvm_arch_mmu_notifier_invalidate_range+0x17/0x40 arch/x86/kvm/x86.c:8065 kvm_mmu_notifier_invalidate_range_start+0x180/0x240 arch/x86/kvm/../../../virt/kvm/kvm_main.c:423 mn_hlist_invalidate_range_start mm/mmu_notifier.c:487 [inline] __mmu_notifier_invalidate_range_start+0x394/0x5b0 mm/mmu_notifier.c:519 mmu_notifier_invalidate_range_start include/linux/mmu_notifier.h:446 [inline] change_pmd_range mm/mprotect.c:190 [inline] change_pud_range mm/mprotect.c:240 [inline] change_p4d_range mm/mprotect.c:260 [inline] change_protection_range mm/mprotect.c:285 [inline] change_protection+0x804/0x1e00 mm/mprotect.c:306 mprotect_fixup+0x3b9/0x790 mm/mprotect.c:427 do_mprotect_pkey+0x3c2/0x700 mm/mprotect.c:553 __do_sys_mprotect mm/mprotect.c:578 [inline] __se_sys_mprotect mm/mprotect.c:575 [inline] __x64_sys_mprotect+0x6f/0xb0 mm/mprotect.c:575 do_syscall_64+0xc6/0x5e0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c987 Code: 00 00 00 b8 0b 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 9d b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 0a 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 7d b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffeaba210c8 EFLAGS: 00000246 ORIG_RAX: 000000000000000a RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 000000000045c987 RDX: 0000000000000000 RSI: 0000000000001000 RDI: 00007fc763c1e000 RBP: 00007ffeaba211b0 R08: 00000000007217e0 R09: 00000000007217e0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffeaba212a0 R13: 00007fc763c3e700 R14: 00007fc763c3e9c0 R15: 000000000076c04c Allocated by task 8586: save_stack+0x19/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.17+0xc1/0xd0 mm/kasan/common.c:515 kvmalloc include/linux/mm.h:645 [inline] kvzalloc include/linux/mm.h:653 [inline] kvm_alloc_memslots arch/x86/kvm/../../../virt/kvm/kvm_main.c:564 [inline] kvm_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:699 [inline] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:3823 [inline] kvm_dev_ioctl+0x778/0x1120 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3875 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl+0xb8/0x110 fs/ioctl.c:763 __do_sys_ioctl fs/ioctl.c:772 [inline] __se_sys_ioctl fs/ioctl.c:770 [inline] __x64_sys_ioctl+0x6a/0xb0 fs/ioctl.c:770 do_syscall_64+0xc6/0x5e0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888090d23000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1040 bytes inside of 2048-byte region [ffff888090d23000, ffff888090d23800) The buggy address belongs to the page: page:ffffea00024348c0 refcount:1 mapcount:0 mapping:ffff8880aa400e00 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000277d988 ffffea0002391c08 ffff8880aa400e00 raw: 0000000000000000 ffff888090d23000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888090d23300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888090d23380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888090d23400: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888090d23480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888090d23500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================