bisecting fixing commit since 6a24ca2506d64598eac5d5219e99acca9bde4ca5 building syzkaller on 6436ce4bcd8e2c7dcca0b171ac91f51e96d973f8 testing commit 6a24ca2506d64598eac5d5219e99acca9bde4ca5 with gcc (GCC) 8.1.0 kernel signature: 3d1fb1554087614bfbf9c4b4bcf21b7ed49994f55c8ca2913026b1abc6d79df0 run #0: crashed: WARNING: ODEBUG bug in bt_host_release run #1: crashed: WARNING: ODEBUG bug in bt_host_release run #2: crashed: WARNING: ODEBUG bug in netdev_freemem run #3: crashed: WARNING: ODEBUG bug in bt_host_release run #4: OK run #5: OK run #6: OK run #7: OK run #8: crashed: KASAN: use-after-free Read in __queue_work run #9: OK testing current HEAD 3f2ecb86cb909da0b9157fd2952ad79924cbe5ae testing commit 3f2ecb86cb909da0b9157fd2952ad79924cbe5ae with gcc (GCC) 8.1.0 kernel signature: b0ce9d010a351a2062036f058534831d068d2df040752945f32933bbb2b72606 run #0: crashed: WARNING: ODEBUG bug in bt_host_release run #1: crashed: WARNING: ODEBUG bug in bt_host_release 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: WARNING: ODEBUG bug in bt_host_release run #6: crashed: KASAN: use-after-free Read in __queue_work run #7: OK run #8: OK run #9: OK revisions tested: 2, total time: 37m1.975035339s (build: 17m38.849729162s, test: 18m37.166124097s) the crash still happens on HEAD commit msg: Linux 4.14.212 crash: KASAN: use-after-free Read in __queue_work ================================================================== BUG: KASAN: use-after-free in __queue_work+0xa97/0xea0 kernel/workqueue.c:1385 Read of size 4 at addr ffff8881ddf82c00 by task syz-executor.3/21632 CPU: 1 PID: 21632 Comm: syz-executor.3 Not tainted 4.14.212-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_load4_noabort+0x14/0x20 mm/kasan/report.c:429 __queue_work+0xa97/0xea0 kernel/workqueue.c:1385 queue_work_on+0x140/0x180 kernel/workqueue.c:1490 queue_work include/linux/workqueue.h:491 [inline] req_run+0x2b2/0x590 net/bluetooth/hci_request.c:77 hci_req_run_skb net/bluetooth/hci_request.c:89 [inline] __hci_req_sync+0x297/0x7d0 net/bluetooth/hci_request.c:214 hci_req_sync+0x70/0xb0 net/bluetooth/hci_request.c:285 hci_dev_cmd+0x19f/0x670 net/bluetooth/hci_core.c:1888 hci_sock_ioctl+0x2f0/0x600 net/bluetooth/hci_sock.c:1040 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:0x45d4d9 RSP: 002b:00007fa050e05c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000001e000 RCX: 000000000045d4d9 RDX: 0000000020000040 RSI: 00000000400448dd RDI: 0000000000000004 RBP: 000000000118d160 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118d12c R13: 00007fff048a804f R14: 00007fa050e069c0 R15: 000000000118d12c Allocated by task 23: 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 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15d/0x410 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] __alloc_workqueue_key+0xf8/0xc80 kernel/workqueue.c:3996 hci_register_dev+0x182/0x750 net/bluetooth/hci_core.c:3099 __vhci_create_device+0x269/0x4f0 drivers/bluetooth/hci_vhci.c:139 vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline] vhci_open_timeout+0x34/0x50 drivers/bluetooth/hci_vhci.c:319 process_one_work+0x74f/0x1620 kernel/workqueue.c:2116 worker_thread+0xcc/0xed0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 0: 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 rcu_free_wq+0x99/0xf0 kernel/workqueue.c:3279 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x7a5/0x11e0 kernel/rcu/tree.c:2946 __do_softirq+0x246/0x9b5 kernel/softirq.c:288 The buggy address belongs to the object at ffff8881ddf82a80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 384 bytes inside of 512-byte region [ffff8881ddf82a80, ffff8881ddf82c80) The buggy address belongs to the page: page:ffffea000777e080 count:1 mapcount:0 mapping:ffff8881ddf82080 index:0x0 flags: 0x17ffe0000000100(slab) raw: 017ffe0000000100 ffff8881ddf82080 0000000000000000 0000000100000006 raw: ffffea00076224a0 ffffea000745a920 ffff8881f6000940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881ddf82b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881ddf82b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881ddf82c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881ddf82c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881ddf82d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================