Node 1 Normal free:4039336kB min:53876kB low:67344kB high:80812kB active_anon:0kB inactive_anon:0kB active_file:124kB inactive_file:0kB unevictable:0kB writepending:4kB present:4194304kB managed:4128248kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 0 Node 0 DMA: 1*4kB (U) 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15908kB kvm: failed to shrink bus, removing it completely ================================================================== BUG: KASAN: use-after-free in kvm_vm_ioctl_unregister_coalesced_mmio+0x25a/0x2c0 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:178 Read of size 8 at addr ffff88809a14a000 by task syz-executor.5/24857 CPU: 1 PID: 24857 Comm: syz-executor.5 Not tainted 4.19.191-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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 kvm_vm_ioctl_unregister_coalesced_mmio+0x25a/0x2c0 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:178 kvm_vm_ioctl+0x532/0x16e0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3251 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f773d1bf188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 Node 0 DMA32: 2538*4kB (UME) 2107*8kB (UME) 1228*16kB (UME) 720*32kB (UME) 191*64kB (UME) 39*128kB (UM) 21*256kB (UME) 18*512kB (UM) 14*1024kB (UE) 13*2048kB (UME) 319*4096kB (UM) = 1449088kB RDX: 00000000200000c0 RSI: 000000004010ae68 RDI: 0000000000000004 RBP: 00007f773d1bf1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffd5eaf494f R14: 00007f773d1bf300 R15: 0000000000022000 Node 0 Normal: 0*4kB 1*8kB (U) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 8kB Allocated by task 24857: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] kvm_vm_ioctl_register_coalesced_mmio+0x51/0x350 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:146 Node 1 Normal: 100*4kB (UME) 379*8kB (UME) 296*16kB (UM) 74*32kB (UME) 18*64kB (UME) 18*128kB (UME) 12*256kB (UE) 6*512kB (UM) 3*1024kB (UM) 1*2048kB (U) 980*4096kB (M) = 4039336kB kvm_vm_ioctl+0xc63/0x16e0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3242 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 24857: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB kvm_iodevice_destructor include/kvm/iodev.h:73 [inline] kvm_io_bus_unregister_dev.cold+0xf0/0x110 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3874 kvm_vm_ioctl_unregister_coalesced_mmio+0x1be/0x2c0 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:180 Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB kvm_vm_ioctl+0x532/0x16e0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3251 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809a14a000 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff88809a14a000, ffff88809a14a040) The buggy address belongs to the page: page:ffffea0002685280 count:1 mapcount:0 mapping:ffff88813bff0340 index:0xffff88809a14a400 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002aeac88 ffffea000295cf48 ffff88813bff0340 raw: ffff88809a14a400 ffff88809a14a000 000000010000001e 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809a149f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809a149f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809a14a000: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88809a14a080: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88809a14a100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================