bisecting fixing commit since 68d7a45eec101bc1550294c0e675a490c047b2e5 building syzkaller on 2398edeacca136eefe1a548721976ffe297ea36d testing commit 68d7a45eec101bc1550294c0e675a490c047b2e5 with gcc (GCC) 8.1.0 kernel signature: 76f3f53e5869b229f84afad8a5790b55fb830927 all runs: crashed: KASAN: use-after-free Read in tipc_subscrb_rcv_cb testing current HEAD e1f7d50ae3a3ec342e87a9b1ce6787bfb8b3c08b testing commit e1f7d50ae3a3ec342e87a9b1ce6787bfb8b3c08b with gcc (GCC) 8.1.0 kernel signature: 4e88a0491cb110b986e9e77f2ab36cf6f65a9e9f run #0: crashed: KASAN: use-after-free Read in tipc_subscrb_rcv_cb run #1: crashed: KASAN: use-after-free Read in tipc_subscrb_rcv_cb run #2: crashed: KASAN: use-after-free Read in tipc_subscrb_rcv_cb run #3: crashed: WARNING: ODEBUG bug in tipc_subscrb_subscrp_delete run #4: crashed: KASAN: use-after-free Read in tipc_subscrb_rcv_cb run #5: crashed: general protection fault in detach_if_pending run #6: crashed: WARNING: ODEBUG bug in tipc_subscrb_subscrp_delete run #7: crashed: KASAN: use-after-free Read in tipc_subscrb_rcv_cb run #8: crashed: KASAN: use-after-free Read in tipc_subscrb_rcv_cb run #9: crashed: KASAN: use-after-free Read in tipc_subscrb_rcv_cb revisions tested: 2, total time: 22m53.474551082s (build: 15m50.32291187s, test: 6m20.446536526s) the crash still happens on HEAD commit msg: Linux 4.14.160 crash: KASAN: use-after-free Read in tipc_subscrb_rcv_cb IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready 8021q: adding VLAN 0 to HW filter on device batadv0 8021q: adding VLAN 0 to HW filter on device batadv0 ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x32f9/0x4500 kernel/locking/lockdep.c:3365 Read of size 8 at addr ffff888099502ea0 by task kworker/u4:3/1000 CPU: 1 PID: 1000 Comm: kworker/u4:3 Not tainted 4.14.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: tipc_rcv tipc_recv_work Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xf7/0x13b lib/dump_stack.c:58 print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 __lock_acquire+0x32f9/0x4500 kernel/locking/lockdep.c:3365 lock_acquire+0x173/0x400 kernel/locking/lockdep.c:3994 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:176 spin_lock_bh include/linux/spinlock.h:322 [inline] tipc_subscrp_subscribe net/tipc/subscr.c:299 [inline] tipc_subscrb_rcv_cb+0x479/0x9c0 net/tipc/subscr.c:338 tipc_receive_from_sock+0x290/0x570 net/tipc/server.c:273 tipc_recv_work+0x78/0xd0 net/tipc/server.c:547 process_one_work+0x7a3/0x16c0 kernel/workqueue.c:2114 worker_thread+0xcc/0xee0 kernel/workqueue.c:2248 kthread+0x33b/0x410 kernel/kthread.c:232 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:404 Allocated by task 1000: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x152/0x7b0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] tipc_subscrb_create net/tipc/subscr.c:223 [inline] tipc_subscrb_connect_cb+0x44/0x140 net/tipc/subscr.c:344 tipc_accept_from_sock+0x29e/0x4c0 net/tipc/server.c:313 tipc_recv_work+0x78/0xd0 net/tipc/server.c:547 process_one_work+0x7a3/0x16c0 kernel/workqueue.c:2114 worker_thread+0xcc/0xee0 kernel/workqueue.c:2248 kthread+0x33b/0x410 kernel/kthread.c:232 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:404 Freed by task 5: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 kobject: 'loop3' (ffff8880a4a2a9a0): kobject_uevent_env __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 kobject: 'loop3' (ffff8880a4a2a9a0): fill_kobj_path: path = '/devices/virtual/block/loop3' tipc_subscrb_kref_release net/tipc/subscr.c:155 [inline] kref_put include/linux/kref.h:70 [inline] tipc_subscrb_put+0x19/0x20 net/tipc/subscr.c:160 tipc_subscrb_delete net/tipc/subscr.c:239 [inline] tipc_subscrb_release_cb+0x1a/0x20 net/tipc/subscr.c:316 tipc_close_conn+0x15d/0x1f0 net/tipc/server.c:203 tipc_send_to_sock net/tipc/server.c:538 [inline] tipc_send_work+0x462/0x5e0 net/tipc/server.c:564 process_one_work+0x7a3/0x16c0 kernel/workqueue.c:2114 worker_thread+0xcc/0xee0 kernel/workqueue.c:2248 kthread+0x33b/0x410 kernel/kthread.c:232 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff888099502e80 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 32 bytes inside of 96-byte region [ffff888099502e80, ffff888099502ee0) The buggy address belongs to the page: page:ffffea0002654080 count:1 mapcount:0 mapping:ffff888099502000 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff888099502000 0000000000000000 0000000100000020 raw: ffffea00026bc220 ffffea00025cd3a0 ffff8880aa8004c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888099502d80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff888099502e00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff888099502e80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff888099502f00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888099502f80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc kobject: 'loop3' (ffff8880a4a2a9a0): kobject_uevent_env ==================================================================