bisecting fixing commit since 14b58326976de6ef3998eefec1dd7f8b38b97a75 building syzkaller on 28ac5c9e93a44c3eb145195ffb55591be58ef510 testing commit 14b58326976de6ef3998eefec1dd7f8b38b97a75 with gcc (GCC) 8.1.0 kernel signature: 9ca68fae4088a27d8dad5c7fcc1221dab7b2f066a38825aac228825f691227f4 run #0: crashed: KASAN: use-after-free Read in hci_dev_reset 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: general protection fault in __queue_work run #5: crashed: WARNING: ODEBUG bug in bt_host_release run #6: crashed: KASAN: use-after-free Read in skb_dequeue run #7: crashed: general protection fault in __queue_work run #8: crashed: WARNING: ODEBUG bug in bt_host_release run #9: OK testing current HEAD bae31eef2a167ef160ab2703b6a2f5bbecd98d92 testing commit bae31eef2a167ef160ab2703b6a2f5bbecd98d92 with gcc (GCC) 8.1.0 kernel signature: d10d44eb5fafd4ad724d1fdd461c738ee15b47097e60a274e45be1434b3e0b80 run #0: crashed: WARNING: ODEBUG bug in bt_host_release run #1: crashed: KASAN: use-after-free Read in hci_dev_reset run #2: crashed: WARNING: ODEBUG bug in bt_host_release run #3: crashed: general protection fault in __queue_work run #4: crashed: WARNING: ODEBUG bug in bt_host_release run #5: crashed: general protection fault in __queue_work run #6: crashed: general protection fault in __queue_work 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: 37m53.84300743s (build: 17m41.910903001s, test: 19m21.369436194s) the crash still happens on HEAD commit msg: Linux 4.14.200 crash: KASAN: use-after-free Read in skb_dequeue IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready Bluetooth: hci5 command 0x040f tx timeout Bluetooth: hci5 command 0x0419 tx timeout Bluetooth: hci3 command 0x0409 tx timeout ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x2cea/0x42d0 kernel/locking/lockdep.c:3369 Read of size 8 at addr ffff88808e2b3340 by task syz-executor.1/29088 CPU: 0 PID: 29088 Comm: syz-executor.1 Not tainted 4.14.200-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+0x20/0x1f0 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:00007fe8dfa9fc78 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: 00007ffc5fec301f R14: 00007fe8dfaa09c0 R15: 000000000118c1ac Allocated by task 16871: 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 16871: 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 ffff88808e2b32c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 128 bytes inside of 512-byte region [ffff88808e2b32c0, ffff88808e2b34c0) The buggy address belongs to the page: page:ffffea000238acc0 count:1 mapcount:0 mapping:ffff88808e2b3040 index:0xffff88808e2b3cc0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88808e2b3040 ffff88808e2b3cc0 0000000100000003 raw: ffffea00026b2720 ffffea00023709a0 ffff8880aa800940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808e2b3200: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88808e2b3280: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff88808e2b3300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808e2b3380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808e2b3400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================