================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3829/0x5020 kernel/locking/lockdep.c:3314 Read of size 8 at addr ffff8801c7803a98 by task kworker/1:0/19 CPU: 1 PID: 19 Comm: kworker/1:0 Not tainted 4.18.0-rc6+ #168 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events p9_poll_workfn Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __lock_acquire+0x3829/0x5020 kernel/locking/lockdep.c:3314 lock_acquire+0x1e4/0x540 kernel/locking/lockdep.c:3924 __mutex_lock_common kernel/locking/mutex.c:757 [inline] __mutex_lock+0x176/0x1820 kernel/locking/mutex.c:894 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:909 ep_scan_ready_list+0xb77/0xf50 fs/eventpoll.c:681 ep_eventpoll_poll+0x192/0x200 fs/eventpoll.c:937 vfs_poll include/linux/poll.h:86 [inline] p9_fd_poll+0x118/0x2b0 net/9p/trans_fd.c:246 p9_poll_mux net/9p/trans_fd.c:617 [inline] p9_poll_workfn+0x463/0x6d0 net/9p/trans_fd.c:1107 process_one_work+0xc73/0x1ba0 kernel/workqueue.c:2153 worker_thread+0x189/0x13c0 kernel/workqueue.c:2296 kthread+0x345/0x410 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 Allocated by task 6677: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x780 mm/slab.c:3620 kmalloc include/linux/slab.h:513 [inline] kzalloc include/linux/slab.h:707 [inline] ep_alloc fs/eventpoll.c:1016 [inline] do_epoll_create+0x170/0x5c0 fs/eventpoll.c:1952 __do_sys_epoll_create1 fs/eventpoll.c:1983 [inline] __se_sys_epoll_create1 fs/eventpoll.c:1981 [inline] __x64_sys_epoll_create1+0x31/0x40 fs/eventpoll.c:1981 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6677: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 ep_free+0x273/0x310 fs/eventpoll.c:856 ep_eventpoll_release+0x44/0x60 fs/eventpoll.c:864 __fput+0x355/0x8b0 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x1ec/0x2a0 kernel/task_work.c:113 get_signal+0x1559/0x1970 kernel/signal.c:2298 do_signal+0x9c/0x21c0 arch/x86/kernel/signal.c:816 exit_to_usermode_loop+0x2e0/0x370 arch/x86/entry/common.c:162 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 ffff8801c7803a00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 152 bytes inside of 512-byte region [ffff8801c7803a00, ffff8801c7803c00) The buggy address belongs to the page: page:ffffea00071e00c0 count:1 mapcount:0 mapping:ffff8801dac00940 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0006f19008 ffffea00076573c8 ffff8801dac00940 raw: 0000000000000000 ffff8801c7803000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c7803980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c7803a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c7803a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c7803b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c7803b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================