================================================================== BUG: KASAN: use-after-free in atomic64_read include/asm-generic/atomic-instrumented.h:27 [inline] BUG: KASAN: use-after-free in atomic_long_read include/asm-generic/atomic-long.h:47 [inline] BUG: KASAN: use-after-free in __mutex_trylock_or_owner kernel/locking/mutex.c:84 [inline] BUG: KASAN: use-after-free in __mutex_trylock kernel/locking/mutex.c:125 [inline] BUG: KASAN: use-after-free in __mutex_lock_common kernel/locking/mutex.c:759 [inline] BUG: KASAN: use-after-free in __mutex_lock+0x193/0x1820 kernel/locking/mutex.c:894 Read of size 8 at addr ffff8801c98452f8 by task kworker/0:3/4827 CPU: 0 PID: 4827 Comm: kworker/0:3 Not tainted 4.18.0-rc7+ #174 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 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272 atomic64_read include/asm-generic/atomic-instrumented.h:27 [inline] atomic_long_read include/asm-generic/atomic-long.h:47 [inline] __mutex_trylock_or_owner kernel/locking/mutex.c:84 [inline] __mutex_trylock kernel/locking/mutex.c:125 [inline] __mutex_lock_common kernel/locking/mutex.c:759 [inline] __mutex_lock+0x193/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+0x1ce/0x2b0 net/9p/trans_fd.c:248 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 23384: 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 23335: 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 ffff8801c98452c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 56 bytes inside of 512-byte region [ffff8801c98452c0, ffff8801c98454c0) The buggy address belongs to the page: page:ffffea0007261140 count:1 mapcount:0 mapping:ffff8801dac00940 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea00075fe0c8 ffffea0007336d48 ffff8801dac00940 raw: 0000000000000000 ffff8801c9845040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c9845180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c9845200: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801c9845280: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8801c9845300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c9845380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================