bisecting fixing commit since 14b58326976de6ef3998eefec1dd7f8b38b97a75 building syzkaller on ff51e5229e0ee846d2fd687cb0dbca13de758c66 testing commit 14b58326976de6ef3998eefec1dd7f8b38b97a75 with gcc (GCC) 8.1.0 kernel signature: 275d082a2307cdd1e8b26d83108054c23ed3053b95e8bb3fa8372772d84cc276 all runs: crashed: KASAN: use-after-free Write in hci_conn_del testing current HEAD 6b6446efedb27c2766745a04f9b5d4449f51391d testing commit 6b6446efedb27c2766745a04f9b5d4449f51391d with gcc (GCC) 8.1.0 kernel signature: 71679194996bc9565756be5863e88357d584f450d4d8f846804aa49c5d512b55 run #0: crashed: KASAN: use-after-free Write in hci_conn_del run #1: crashed: KASAN: slab-out-of-bounds Read 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: OK revisions tested: 2, total time: 30m18.264691013s (build: 16m53.14137264s, test: 12m48.724277555s) the crash still happens on HEAD commit msg: Linux 4.14.204 crash: KASAN: use-after-free Write in hci_conn_del batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready ================================================================== BUG: KASAN: use-after-free in hci_conn_del+0x587/0x5e0 net/bluetooth/hci_conn.c:596 Write of size 8 at addr ffff8880917f1408 by task syz-executor.1/6495 CPU: 1 PID: 6495 Comm: syz-executor.1 Not tainted 4.14.204-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+0x953/0x2c40 kernel/exit.c:865 do_group_exit+0xf8/0x2c0 kernel/exit.c:962 SYSC_exit_group kernel/exit.c:973 [inline] SyS_exit_group+0x18/0x20 kernel/exit.c:971 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ce79 RSP: 002b:00007ffd5d949c98 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000045ce79 RDX: 00000000004168d1 RSI: 00000000016a85f0 RDI: 0000000000000043 RBP: 00000000004c2b1b R08: 000000000000000b R09: 0000000000000000 R10: 0000000003245940 R11: 0000000000000246 R12: 000000000000000f R13: 00007ffd5d949de0 R14: 0000000000010c13 R15: 00007ffd5d949df0 Allocated by task 3651: 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 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x3e0 mm/slab.c:3552 getname_flags+0xb8/0x510 fs/namei.c:138 getname+0xd/0x10 fs/namei.c:209 do_sys_open+0x13f/0x340 fs/open.c:1075 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 3651: 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] kmem_cache_free+0x80/0x2d0 mm/slab.c:3758 putname+0xa8/0xe0 fs/namei.c:259 do_sys_open+0x161/0x340 fs/open.c:1090 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 ffff8880917f05c0 which belongs to the cache names_cache of size 4096 The buggy address is located 3656 bytes inside of 4096-byte region [ffff8880917f05c0, ffff8880917f15c0) The buggy address belongs to the page: page:ffffea000245fc00 count:1 mapcount:0 mapping:ffff8880917f05c0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff8880917f05c0 0000000000000000 0000000100000001 raw: ffffea00026bb720 ffffea00026f53a0 ffff88823f830dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880917f1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880917f1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880917f1400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880917f1480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880917f1500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================