==================================================================
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 kvm_vcpu_gfn_to_memslot+0x50e/0x540 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1603
Read of size 8 at addr ffff888053b61468 by task syz-executor.2/20909

CPU: 0 PID: 20909 Comm: syz-executor.2 Not tainted 5.7.0-rc1-next-20200415-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]
 kvm_vcpu_gfn_to_memslot+0x50e/0x540 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1603
 try_async_pf+0x12b/0xac0 arch/x86/kvm/mmu/mmu.c:4097
 direct_page_fault+0x27d/0x1d70 arch/x86/kvm/mmu/mmu.c:4146
 kvm_mmu_do_page_fault arch/x86/kvm/mmu.h:115 [inline]
 kvm_mmu_page_fault+0x187/0x15d0 arch/x86/kvm/mmu/mmu.c:5446
 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
 vfs_ioctl fs/ioctl.c:47 [inline]
 ksys_ioctl+0x11a/0x180 fs/ioctl.c:763
 __do_sys_ioctl fs/ioctl.c:772 [inline]
 __se_sys_ioctl fs/ioctl.c:770 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:770
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x45ca29
Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f4a7d8f0c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004e7fc0 RCX: 000000000045ca29
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000007
RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000003c6 R14: 00000000004c6703 R15: 00007f4a7d8f16d4

Allocated by task 20909:
 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
 __x86_set_memory_region+0x2a3/0x5a0 arch/x86/kvm/x86.c:9856
 alloc_apic_access_page arch/x86/kvm/vmx/vmx.c:3540 [inline]
 vmx_create_vcpu+0x2107/0x2b40 arch/x86/kvm/vmx/vmx.c:6799
 kvm_arch_vcpu_create+0x6ef/0xb80 arch/x86/kvm/x86.c:9376
 kvm_vm_ioctl_create_vcpu arch/x86/kvm/../../../virt/kvm/kvm_main.c:3030 [inline]
 kvm_vm_ioctl+0x1614/0x2400 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3585
 vfs_ioctl fs/ioctl.c:47 [inline]
 ksys_ioctl+0x11a/0x180 fs/ioctl.c:763
 __do_sys_ioctl fs/ioctl.c:772 [inline]
 __se_sys_ioctl fs/ioctl.c:770 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:770
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3

Freed by task 7505:
 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
 kvfree+0x42/0x50 mm/util.c:603
 __do_replace+0x6a3/0x8c0 net/ipv6/netfilter/ip6_tables.c:1104
 do_replace net/ipv6/netfilter/ip6_tables.c:1157 [inline]
 do_ip6t_set_ctl+0x2e8/0x457 net/ipv6/netfilter/ip6_tables.c:1681
 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline]
 nf_setsockopt+0x6f/0xc0 net/netfilter/nf_sockopt.c:115
 ipv6_setsockopt net/ipv6/ipv6_sockglue.c:955 [inline]
 ipv6_setsockopt+0x145/0x180 net/ipv6/ipv6_sockglue.c:939
 tcp_setsockopt net/ipv4/tcp.c:3223 [inline]
 tcp_setsockopt+0x86/0xd0 net/ipv4/tcp.c:3217
 __sys_setsockopt+0x248/0x480 net/socket.c:2132
 __do_sys_setsockopt net/socket.c:2148 [inline]
 __se_sys_setsockopt net/socket.c:2145 [inline]
 __x64_sys_setsockopt+0xba/0x150 net/socket.c:2145
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3

The buggy address belongs to the object at ffff888053b61000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1128 bytes inside of
 2048-byte region [ffff888053b61000, ffff888053b61800)
The buggy address belongs to the page:
page:ffffea00014ed840 refcount:1 mapcount:0 mapping:0000000075333f2c index:0x0
flags: 0xfffe0000000200(slab)
raw: 00fffe0000000200 ffffea00015aa1c8 ffffea00029d6e48 ffff8880aa000e00
raw: 0000000000000000 ffff888053b61000 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888053b61300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888053b61380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888053b61400: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc
                                                          ^
 ffff888053b61480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888053b61500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================