bisecting fixing commit since 14b58326976de6ef3998eefec1dd7f8b38b97a75 building syzkaller on 28ac5c9e93a44c3eb145195ffb55591be58ef510 testing commit 14b58326976de6ef3998eefec1dd7f8b38b97a75 with gcc (GCC) 8.1.0 kernel signature: 22e3b8d9fd91eeb5ce5504316618599bf377afa97e7b59fb5b452c5a0269396c run #0: crashed: general protection fault in __queue_work run #1: crashed: KASAN: use-after-free Read in skb_dequeue run #2: crashed: KASAN: use-after-free Read in skb_dequeue run #3: crashed: WARNING: ODEBUG bug in bt_host_release run #4: crashed: KASAN: use-after-free Read in skb_dequeue run #5: crashed: KASAN: use-after-free Read in skb_dequeue run #6: crashed: KASAN: use-after-free Read in skb_dequeue run #7: crashed: KASAN: use-after-free Read in skb_dequeue run #8: crashed: WARNING: ODEBUG bug in bt_host_release run #9: OK testing current HEAD 2f166cdcf8a92fcf85524f2b5526cb28e16f0a60 testing commit 2f166cdcf8a92fcf85524f2b5526cb28e16f0a60 with gcc (GCC) 8.1.0 kernel signature: 75239f7f5ee93372b6c74fdfff67a63fd90f3343ef8d6f94c9d9a6c237b7d495 run #0: crashed: KASAN: use-after-free Read in hci_dev_reset run #1: crashed: general protection fault in __queue_work run #2: crashed: WARNING: ODEBUG bug in bt_host_release run #3: crashed: WARNING: ODEBUG bug in bt_host_release run #4: crashed: general protection fault in __queue_work run #5: crashed: KASAN: use-after-free Read in skb_dequeue run #6: crashed: WARNING: ODEBUG bug in bt_host_release run #7: crashed: KASAN: use-after-free Read in skb_dequeue run #8: crashed: KASAN: use-after-free Read in skb_dequeue run #9: OK revisions tested: 2, total time: 41m42.530426397s (build: 21m4.888880756s, test: 19m7.776453151s) the crash still happens on HEAD commit msg: Linux 4.14.196 crash: KASAN: use-after-free Read in skb_dequeue Bluetooth: hci1 command 0x040f tx timeout Bluetooth: hci2 command 0x040f tx timeout Bluetooth: hci1 command 0x0419 tx timeout Bluetooth: hci2 command 0x0419 tx timeout ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2cea/0x42d0 kernel/locking/lockdep.c:3369 Read of size 8 at addr ffff88808c61d080 by task syz-executor.1/20228 CPU: 0 PID: 20228 Comm: syz-executor.1 Not tainted 4.14.196-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_load8_noabort+0x14/0x20 mm/kasan/report.c:430 __lock_acquire+0x2cea/0x42d0 kernel/locking/lockdep.c:3369 lock_acquire+0x17e/0x3e0 kernel/locking/lockdep.c:3998 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:160 skb_dequeue+0x1e/0x1a0 net/core/skbuff.c:2816 skb_queue_purge+0x1a/0x30 net/core/skbuff.c:2854 vhci_flush+0x36/0x50 drivers/bluetooth/hci_vhci.c:239 hci_dev_do_reset net/bluetooth/hci_core.c:1726 [inline] hci_dev_reset+0x16d/0x2f0 net/bluetooth/hci_core.c:1761 hci_sock_ioctl+0x24a/0x600 net/bluetooth/hci_sock.c:1023 sock_do_ioctl+0x62/0xa0 net/socket.c:974 sock_ioctl+0x251/0x430 net/socket.c:1071 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x180/0xfb0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x74/0x80 fs/ioctl.c:692 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ce79 RSP: 002b:00007f74a45ebc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000001d340 RCX: 000000000045ce79 RDX: 0000000000000000 RSI: 00000000400448cb RDI: 0000000000000006 RBP: 000000000118c1e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118c1ac R13: 00007ffc7de5a3df R14: 00007f74a45ec9c0 R15: 000000000118c1ac Allocated by task 18505: 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] vhci_open+0x4b/0x360 drivers/bluetooth/hci_vhci.c:326 misc_open+0x31b/0x4d0 drivers/char/misc.c:154 chrdev_open+0x1e9/0x5b0 fs/char_dev.c:423 do_dentry_open+0x3e4/0xde0 fs/open.c:777 vfs_open+0xfc/0x240 fs/open.c:888 do_last fs/namei.c:3428 [inline] path_openat+0xb73/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 Freed by task 18505: 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 vhci_release+0xa7/0xe0 drivers/bluetooth/hci_vhci.c:360 __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 The buggy address belongs to the object at ffff88808c61d000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 128 bytes inside of 512-byte region [ffff88808c61d000, ffff88808c61d200) The buggy address belongs to the page: page:ffffea0002318740 count:1 mapcount:0 mapping:ffff88808c61d000 index:0xffff88808c61dc80 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88808c61d000 ffff88808c61dc80 0000000100000001 raw: ffffea0002457de0 ffffea000285bfe0 ffff8880aa800940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808c61cf80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88808c61d000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808c61d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808c61d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808c61d180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================