================================================================== BUG: KASAN: slab-out-of-bounds in search_memslots include/linux/kvm_host.h:1051 [inline] BUG: KASAN: slab-out-of-bounds in __gfn_to_memslot include/linux/kvm_host.h:1063 [inline] BUG: KASAN: slab-out-of-bounds in gfn_to_memslot arch/x86/kvm/../../../virt/kvm/kvm_main.c:1597 [inline] BUG: KASAN: slab-out-of-bounds in gfn_to_pfn+0x4a6/0x4c0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1977 Read of size 8 at addr ffff88808c5ab468 by task syz-executor.1/1563 CPU: 1 PID: 1563 Comm: syz-executor.1 Not tainted 5.7.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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x315 mm/kasan/report.c:382 __kasan_report.cold+0x35/0x4d mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 search_memslots include/linux/kvm_host.h:1051 [inline] __gfn_to_memslot include/linux/kvm_host.h:1063 [inline] gfn_to_memslot arch/x86/kvm/../../../virt/kvm/kvm_main.c:1597 [inline] gfn_to_pfn+0x4a6/0x4c0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1977 reexecute_instruction arch/x86/kvm/x86.c:6532 [inline] reexecute_instruction+0x1fa/0x430 arch/x86/kvm/x86.c:6497 x86_emulate_instruction+0x880/0x1c50 arch/x86/kvm/x86.c:6806 kvm_mmu_page_fault+0x308/0x15d0 arch/x86/kvm/mmu/mmu.c:5495 vmx_handle_exit+0x2b8/0x1700 arch/x86/kvm/vmx/vmx.c:5980 vcpu_enter_guest+0xfea/0x59d0 arch/x86/kvm/x86.c:8481 vcpu_run arch/x86/kvm/x86.c:8544 [inline] kvm_arch_vcpu_ioctl_run+0x3fb/0x16e0 arch/x86/kvm/x86.c:8766 kvm_vcpu_ioctl+0x493/0xe60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3138 kvm_vcpu_compat_ioctl+0x1ab/0x350 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3334 __do_compat_sys_ioctl fs/ioctl.c:857 [inline] __se_compat_sys_ioctl fs/ioctl.c:808 [inline] __ia32_compat_sys_ioctl+0x23d/0x2b0 fs/ioctl.c:808 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x270/0xe90 arch/x86/entry/common.c:396 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Allocated by task 1552: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468 kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x61/0xf0 mm/util.c:574 kvmalloc include/linux/mm.h:757 [inline] kvzalloc include/linux/mm.h:765 [inline] kvm_dup_memslots arch/x86/kvm/../../../virt/kvm/kvm_main.c:1101 [inline] kvm_set_memslot+0x115/0x1530 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1118 __kvm_set_memory_region+0xcf7/0x1320 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1300 kvm_set_memory_region+0x29/0x50 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1321 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1333 [inline] kvm_vm_ioctl+0x678/0x23e0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3604 kvm_vm_compat_ioctl+0x125/0x240 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3798 __do_compat_sys_ioctl fs/ioctl.c:857 [inline] __se_compat_sys_ioctl fs/ioctl.c:808 [inline] __ia32_compat_sys_ioctl+0x23d/0x2b0 fs/ioctl.c:808 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x270/0xe90 arch/x86/entry/common.c:396 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 850: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 sk_prot_free net/core/sock.c:1641 [inline] __sk_destruct+0x5ad/0x7c0 net/core/sock.c:1725 sk_destruct+0xc6/0x100 net/core/sock.c:1740 __sk_free+0xef/0x3d0 net/core/sock.c:1751 sk_free+0x78/0xa0 net/core/sock.c:1762 deferred_put_nlk_sk+0x151/0x2e0 net/netlink/af_netlink.c:729 rcu_do_batch kernel/rcu/tree.c:2206 [inline] rcu_core+0x59f/0x1370 kernel/rcu/tree.c:2433 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 The buggy address belongs to the object at ffff88808c5ab000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1128 bytes inside of 2048-byte region [ffff88808c5ab000, ffff88808c5ab800) The buggy address belongs to the page: page:ffffea0002316ac0 refcount:1 mapcount:0 mapping:000000006dee3fdd index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002794148 ffffea000267f0c8 ffff8880aa000e00 raw: 0000000000000000 ffff88808c5ab000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808c5ab300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808c5ab380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808c5ab400: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ^ ffff88808c5ab480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808c5ab500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================