================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 kernel/locking/lockdep.c:3309 Read of size 8 at addr ffff8801c6eff720 by task syz-executor1/10681 CPU: 0 PID: 10681 Comm: syz-executor1 Not tainted 4.15.0-rc8-next-20180119+ #102 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23b/0x360 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __lock_acquire+0x3d4d/0x3e00 kernel/locking/lockdep.c:3309 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3919 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152 remove_wait_queue+0x81/0x350 kernel/sched/wait.c:50 vhost_poll_stop drivers/vhost/vhost.c:230 [inline] vhost_dev_stop+0x15c/0x2a0 drivers/vhost/vhost.c:566 vhost_net_release+0x6e/0x190 drivers/vhost/net.c:1017 __fput+0x327/0x7e0 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x199/0x270 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9bb/0x1ad0 kernel/exit.c:869 do_group_exit+0x149/0x400 kernel/exit.c:972 get_signal+0x73a/0x16d0 kernel/signal.c:2346 do_signal+0x90/0x1eb0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:161 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264 entry_SYSCALL_64_fastpath+0x9e/0xa0 RIP: 0033:0x452ee9 RSP: 002b:00007fd373eb2ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000071c038 RCX: 0000000000452ee9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000071c038 RBP: 000000000071c038 R08: 0000000000000000 R09: 000000000071c010 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000a2f7cf R14: 00007fd373eb39c0 R15: 0000000000000004 Allocated by task 10654: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552 kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3607 kmalloc include/linux/slab.h:512 [inline] eventfd_file_create.part.3+0x96/0x250 fs/eventfd.c:441 eventfd_file_create fs/eventfd.c:483 [inline] SYSC_eventfd2 fs/eventfd.c:468 [inline] SyS_eventfd2 fs/eventfd.c:458 [inline] SYSC_eventfd fs/eventfd.c:485 [inline] SyS_eventfd+0x2c/0x80 fs/eventfd.c:483 entry_SYSCALL_64_fastpath+0x29/0xa0 Freed by task 10681: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3485 [inline] kfree+0xd9/0x260 mm/slab.c:3800 eventfd_free_ctx fs/eventfd.c:72 [inline] eventfd_free fs/eventfd.c:79 [inline] kref_put include/linux/kref.h:70 [inline] eventfd_ctx_put+0x26/0x30 fs/eventfd.c:104 eventfd_release+0x52/0x60 fs/eventfd.c:113 __fput+0x327/0x7e0 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x199/0x270 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9bb/0x1ad0 kernel/exit.c:869 do_group_exit+0x149/0x400 kernel/exit.c:972 get_signal+0x73a/0x16d0 kernel/signal.c:2346 do_signal+0x90/0x1eb0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:161 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264 entry_SYSCALL_64_fastpath+0x9e/0xa0 The buggy address belongs to the object at ffff8801c6eff700 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 32 bytes inside of 96-byte region [ffff8801c6eff700, ffff8801c6eff760) The buggy address belongs to the page: page:ffffea00071bbfc0 count:1 mapcount:0 mapping:ffff8801c6eff000 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801c6eff000 0000000000000000 0000000100000020 raw: ffffea000740e9a0 ffffea000740b020 ffff8801dac004c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c6eff600: 00 00 00 00 00 00 00 00 05 fc fc fc fc fc fc fc ffff8801c6eff680: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8801c6eff700: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff8801c6eff780: 00 00 00 00 00 00 00 00 05 fc fc fc fc fc fc fc ffff8801c6eff800: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================