bisecting fixing commit since 14b58326976de6ef3998eefec1dd7f8b38b97a75 building syzkaller on ff51e5229e0ee846d2fd687cb0dbca13de758c66 testing commit 14b58326976de6ef3998eefec1dd7f8b38b97a75 with gcc (GCC) 8.1.0 kernel signature: f5453a7284b533e2c5bd59006af36f75cf6273178695b4f714ec3fb651e79521 run #0: crashed: KASAN: use-after-free Write in hci_conn_del run #1: crashed: KASAN: use-after-free Write in hci_conn_del run #2: crashed: KASAN: use-after-free Write in hci_conn_del run #3: crashed: KASAN: use-after-free Write in hci_conn_del run #4: crashed: KASAN: use-after-free Write in hci_conn_del run #5: crashed: KASAN: use-after-free Write in hci_conn_del run #6: crashed: KASAN: use-after-free Write in hci_conn_del run #7: crashed: KASAN: use-after-free Write in hci_conn_del run #8: crashed: KASAN: use-after-free Write in hci_conn_del run #9: crashed: KASAN: use-after-free Read in sco_chan_del testing current HEAD 1752938529c614a8ed4432ecce6ebc95d3b87207 testing commit 1752938529c614a8ed4432ecce6ebc95d3b87207 with gcc (GCC) 8.1.0 kernel signature: c145405f8524c465bc7bbc476a2c57dd1e76757a95e89f1a8cf1c8dd7a7ec785 run #0: crashed: WARNING: ODEBUG bug in bt_link_release run #1: crashed: KASAN: use-after-free Write in hci_conn_del run #2: crashed: KASAN: use-after-free Write in hci_conn_del run #3: crashed: KASAN: use-after-free Read in __queue_work run #4: crashed: KASAN: use-after-free Write in hci_conn_del run #5: crashed: KASAN: slab-out-of-bounds Write in hci_conn_del run #6: crashed: KASAN: slab-out-of-bounds Write in hci_conn_del run #7: crashed: KASAN: slab-out-of-bounds Write in hci_conn_del run #8: crashed: KASAN: use-after-free Write in hci_conn_del run #9: crashed: KASAN: use-after-free Write in hci_conn_del revisions tested: 2, total time: 27m8.19708137s (build: 16m56.357388708s, test: 9m40.233287597s) the crash still happens on HEAD commit msg: Linux 4.14.213 crash: KASAN: use-after-free Write in hci_conn_del IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready Bluetooth: hci0 command 0x0405 tx timeout ================================================================== BUG: KASAN: use-after-free in hci_conn_del+0x587/0x5e0 net/bluetooth/hci_conn.c:596 Write of size 8 at addr ffff8881d4701048 by task syz-executor.5/5829 CPU: 0 PID: 5829 Comm: syz-executor.5 Not tainted 4.14.213-syzkaller #0 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+0x14b/0x1f1 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.7+0x11a/0x2d4 mm/kasan/report.c:409 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report.c:435 hci_conn_del+0x587/0x5e0 net/bluetooth/hci_conn.c:596 hci_conn_hash_flush+0x168/0x200 net/bluetooth/hci_conn.c:1394 hci_dev_do_close+0x47a/0xb10 net/bluetooth/hci_core.c:1620 hci_unregister_dev+0x163/0x790 net/bluetooth/hci_core.c:3191 vhci_release+0x6b/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x232/0x740 fs/file_table.c:210 ____fput+0x9/0x10 fs/file_table.c:244 task_work_run+0xe5/0x170 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x98b/0x2c90 kernel/exit.c:868 do_group_exit+0xf8/0x2c0 kernel/exit.c:965 SYSC_exit_group kernel/exit.c:976 [inline] SyS_exit_group+0x18/0x20 kernel/exit.c:974 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ce79 RSP: 002b:00007ffe7e5d1f28 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000045ce79 RDX: 00000000004168d1 RSI: 00000000016a85f0 RDI: 0000000000000043 RBP: 00000000004c2b1b R08: 000000000000000b R09: 0000000000000000 R10: 0000000001fe6940 R11: 0000000000000246 R12: 000000000000000f R13: 00007ffe7e5d2070 R14: 00000000000353d2 R15: 00007ffe7e5d2080 Allocated by task 27925: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 kmem_cache_alloc_trace+0x152/0x3f0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] kernfs_iop_get_link+0x59/0x670 fs/kernfs/symlink.c:127 get_link fs/namei.c:1099 [inline] trailing_symlink+0x57d/0x800 fs/namei.c:2283 path_openat+0x677/0x27a0 fs/namei.c:3571 do_filp_open+0x16b/0x220 fs/namei.c:3603 do_sys_open+0x1c2/0x340 fs/open.c:1081 SYSC_open fs/open.c:1099 [inline] SyS_open+0x19/0x20 fs/open.c:1094 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 27925: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xab/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 kfree_link+0x9/0x10 fs/libfs.c:1074 do_delayed_call include/linux/delayed_call.h:28 [inline] put_link fs/namei.c:900 [inline] step_into fs/namei.c:1787 [inline] do_last fs/namei.c:3393 [inline] path_openat+0x7d9/0x27a0 fs/namei.c:3569 do_filp_open+0x16b/0x220 fs/namei.c:3603 do_sys_open+0x1c2/0x340 fs/open.c:1081 SYSC_open fs/open.c:1099 [inline] SyS_open+0x19/0x20 fs/open.c:1094 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8881d4700840 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2056 bytes inside of 4096-byte region [ffff8881d4700840, ffff8881d4701840) The buggy address belongs to the page: page:ffffea000751c000 count:1 mapcount:0 mapping:ffff8881d4700840 index:0x0 compound_mapcount: 0 flags: 0x17ffe0000008100(slab|head) raw: 017ffe0000008100 ffff8881d4700840 0000000000000000 0000000100000001 raw: ffffea00078fbd20 ffffea00074e7220 ffff8881f6000dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d4700f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d4700f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881d4701000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881d4701080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d4701100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================