IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready ================================================================== BUG: KASAN: use-after-free in vhost_work_queue+0xc3/0xe0 drivers/vhost/vhost.c:258 Read of size 8 at addr ffff88018f6c2de8 by task syz-executor0/6322 CPU: 1 PID: 6322 Comm: syz-executor0 Not tainted 4.19.0+ #87 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 vhost_work_queue+0xc3/0xe0 drivers/vhost/vhost.c:258 vhost_transport_send_pkt+0x28a/0x380 drivers/vhost/vsock.c:227 virtio_transport_send_pkt_info+0x31d/0x460 net/vmw_vsock/virtio_transport_common.c:190 virtio_transport_shutdown+0x1b1/0x270 net/vmw_vsock/virtio_transport_common.c:604 vsock_send_shutdown net/vmw_vsock/af_vsock.c:451 [inline] vsock_shutdown+0x229/0x290 net/vmw_vsock/af_vsock.c:849 __sys_shutdown+0x15c/0x2c0 net/socket.c:1966 __do_sys_shutdown net/socket.c:1974 [inline] __se_sys_shutdown net/socket.c:1972 [inline] __x64_sys_shutdown+0x54/0x80 net/socket.c:1972 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457569 Code: fd b3 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 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f1970747c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000030 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 0000000000457569 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000009 RBP: 000000000072c0e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f19707486d4 R13: 00000000004c45f0 R14: 00000000004d7850 R15: 00000000ffffffff Allocated by task 6277: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3684 [inline] __kmalloc_node+0x50/0x70 mm/slab.c:3691 kmalloc_node include/linux/slab.h:589 [inline] kvmalloc_node+0xb9/0xf0 mm/util.c:416 kvmalloc include/linux/mm.h:577 [inline] vhost_vsock_dev_open+0xa2/0x5a0 drivers/vhost/vsock.c:511 misc_open+0x3ca/0x560 drivers/char/misc.c:141 chrdev_open+0x25a/0x710 fs/char_dev.c:417 do_dentry_open+0x499/0x1250 fs/open.c:771 vfs_open+0xa0/0xd0 fs/open.c:880 do_last fs/namei.c:3418 [inline] path_openat+0x12bc/0x5150 fs/namei.c:3534 do_filp_open+0x255/0x380 fs/namei.c:3564 do_sys_open+0x568/0x700 fs/open.c:1063 __do_sys_openat fs/open.c:1090 [inline] __se_sys_openat fs/open.c:1084 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1084 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6274: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 kvfree+0x61/0x70 mm/util.c:445 vhost_vsock_free drivers/vhost/vsock.c:499 [inline] vhost_vsock_dev_release+0x4f4/0x720 drivers/vhost/vsock.c:604 __fput+0x385/0xa30 fs/file_table.c:278 ____fput+0x15/0x20 fs/file_table.c:309 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88018f6c2d40 which belongs to the cache kmalloc-64k of size 65536 The buggy address is located 168 bytes inside of 65536-byte region [ffff88018f6c2d40, ffff88018f6d2d40) The buggy address belongs to the page: page:ffffea00063db000 count:1 mapcount:0 mapping:ffff8801da802500 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea00063c8008 ffffea00063e2808 ffff8801da802500 raw: 0000000000000000 ffff88018f6c2d40 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88018f6c2c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88018f6c2d00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff88018f6c2d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88018f6c2e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88018f6c2e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================