RBP: 00000000009300a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 R13: 00000000004d0830 R14: 00000000004c645b R15: 0000000000000009 kobject_add_internal failed for tap0 (error: -12 parent: net) ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3829/0x5020 kernel/locking/lockdep.c:3314 Read of size 8 at addr ffff8801b2f91b58 by task kworker/0:5/7149 CPU: 0 PID: 7149 Comm: kworker/0:5 Not tainted 4.18.0+ #190 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+0x17f/0x18a0 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+0x35a/0x420 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:413 Allocated by task 8408: 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 8408: 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+0x39b/0x860 fs/file_table.c:251 ____fput+0x15/0x20 fs/file_table.c:282 task_work_run+0x1e8/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+0x2e5/0x380 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 ffff8801b2f91ac0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 152 bytes inside of 512-byte region [ffff8801b2f91ac0, ffff8801b2f91cc0) The buggy address belongs to the page: page:ffffea0006cbe440 count:1 mapcount:0 mapping:ffff8801dac00940 index:0xffff8801b2f91340 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0006c7c5c8 ffffea0006c7ed48 ffff8801dac00940 raw: ffff8801b2f91340 ffff8801b2f910c0 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801b2f91a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801b2f91a80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8801b2f91b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801b2f91b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801b2f91c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================