================================================================== 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_hva+0x4a0/0x4c0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1677 Read of size 8 at addr ffff8880a6efa468 by task syz-executor.4/27968 CPU: 1 PID: 27968 Comm: syz-executor.4 Not tainted 5.6.0-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_hva+0x4a0/0x4c0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1677 kvm_arch_mmu_notifier_invalidate_range+0x21/0x80 arch/x86/kvm/x86.c:8132 kvm_mmu_notifier_invalidate_range_start+0x1a1/0x280 arch/x86/kvm/../../../virt/kvm/kvm_main.c:421 mn_hlist_invalidate_range_start mm/mmu_notifier.c:493 [inline] __mmu_notifier_invalidate_range_start+0x4bc/0x6b0 mm/mmu_notifier.c:525 mmu_notifier_invalidate_range_start+0xda/0x100 include/linux/mmu_notifier.h:446 wp_page_copy+0x4c4/0x16a0 mm/memory.c:2689 do_wp_page+0x598/0x1440 mm/memory.c:2982 handle_pte_fault mm/memory.c:4231 [inline] __handle_mm_fault+0x2381/0x3c90 mm/memory.c:4345 handle_mm_fault+0x1a5/0x660 mm/memory.c:4382 do_user_addr_fault arch/x86/mm/fault.c:1464 [inline] do_page_fault+0x55b/0x13da arch/x86/mm/fault.c:1535 page_fault+0x39/0x40 arch/x86/entry/entry_64.S:1203 RIP: 0010:__put_user_4+0x1c/0x30 arch/x86/lib/putuser.S:70 Code: 1f 00 c3 90 66 2e 0f 1f 84 00 00 00 00 00 65 48 8b 1c 25 00 1f 02 00 48 8b 9b 10 15 00 00 48 83 eb 03 48 39 d9 73 4a 0f 1f 00 <89> 01 31 c0 0f 1f 00 c3 66 90 66 2e 0f 1f 84 00 00 00 00 00 65 48 RSP: 0018:ffffc90016b6fcd0 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00007fffffffeffd RCX: 0000000020002038 RDX: 000000000003245b RSI: ffffffff86183582 RDI: 0000000000000286 RBP: 0000000000040000 R08: 0000000000000001 R09: fffffbfff1512399 R10: ffffffff8a891cc7 R11: fffffbfff1512398 R12: 000000000000007a R13: 0000000020002000 R14: 000000000000010c R15: 000000000000010b __sys_sendmmsg+0x1d3/0x480 net/socket.c:2511 __do_sys_sendmmsg net/socket.c:2535 [inline] __se_sys_sendmmsg net/socket.c:2532 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2532 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45c889 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f00d853ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f00d853b6d4 RCX: 000000000045c889 RDX: 000000000000010c RSI: 0000000020000180 RDI: 0000000000000006 RBP: 000000000076bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000008d5 R14: 00000000004cb7cf R15: 000000000076bf0c Allocated by task 27981: 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 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 27612: 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 skb_free_head+0x8b/0xa0 net/core/skbuff.c:590 skb_release_data+0x42e/0x8b0 net/core/skbuff.c:610 skb_release_all+0x46/0x60 net/core/skbuff.c:664 __kfree_skb net/core/skbuff.c:678 [inline] consume_skb net/core/skbuff.c:837 [inline] consume_skb+0xf3/0x400 net/core/skbuff.c:831 netlink_broadcast_filtered+0x34f/0xd40 net/netlink/af_netlink.c:1513 netlink_broadcast net/netlink/af_netlink.c:1535 [inline] nlmsg_multicast include/net/netlink.h:968 [inline] nlmsg_notify+0x90/0x250 net/netlink/af_netlink.c:2512 rtnl_notify net/core/rtnetlink.c:737 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:3719 [inline] rtmsg_ifinfo_event.part.0+0xb6/0xe0 net/core/rtnetlink.c:3734 rtmsg_ifinfo_event net/core/rtnetlink.c:3742 [inline] rtmsg_ifinfo+0x7f/0xa0 net/core/rtnetlink.c:3740 register_netdevice+0xe64/0x10b0 net/core/dev.c:9435 register_netdev+0x2d/0x50 net/core/dev.c:9514 sit_init_net+0x376/0xa39 net/ipv6/sit.c:1868 ops_init+0xaf/0x420 net/core/net_namespace.c:151 setup_net+0x2de/0x860 net/core/net_namespace.c:341 copy_net_ns+0x293/0x590 net/core/net_namespace.c:482 create_new_namespaces+0x3fb/0xb30 kernel/nsproxy.c:108 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:229 ksys_unshare+0x43d/0x8e0 kernel/fork.c:2960 __do_sys_unshare kernel/fork.c:3028 [inline] __se_sys_unshare kernel/fork.c:3026 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3026 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 ffff8880a6efa000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1128 bytes inside of 2048-byte region [ffff8880a6efa000, ffff8880a6efa800) The buggy address belongs to the page: page:ffffea00029bbe80 refcount:1 mapcount:0 mapping:00000000724678c3 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002311408 ffffea0001279808 ffff8880aa000e00 raw: 0000000000000000 ffff8880a6efa000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a6efa300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a6efa380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a6efa400: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ^ ffff8880a6efa480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a6efa500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================