bisecting fixing commit since 6a24ca2506d64598eac5d5219e99acca9bde4ca5 building syzkaller on 6436ce4bcd8e2c7dcca0b171ac91f51e96d973f8 testing commit 6a24ca2506d64598eac5d5219e99acca9bde4ca5 with gcc (GCC) 8.1.0 kernel signature: 135825c3144f5675081a253b7d969b4bb763dd380c1ebad8927038d6d13f35da run #0: crashed: WARNING: ODEBUG bug in bt_host_release run #1: crashed: general protection fault in __queue_work run #2: crashed: WARNING: ODEBUG bug in bt_host_release run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK reproducer seems to be flaky testing current HEAD 2d2791fce891fc20709232d49a6bae075b9a77f8 testing commit 2d2791fce891fc20709232d49a6bae075b9a77f8 with gcc (GCC) 8.1.0 kernel signature: 7c90f938ce8daee8661379ffc9118713a67f3cc1f2f09c9e5da28f551beed3d0 run #0: crashed: KASAN: use-after-free Read in __queue_work run #1: crashed: WARNING: ODEBUG bug in bt_host_release 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: WARNING: ODEBUG bug in bt_host_release run #6: crashed: WARNING: ODEBUG bug in bt_host_release run #7: crashed: KASAN: use-after-free Read in __queue_work run #8: OK run #9: OK Reproducer flagged being flaky revisions tested: 2, total time: 33m46.972852784s (build: 16m51.464389454s, test: 16m25.970672875s) the crash still happens on HEAD commit msg: Linux 4.14.217 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 ffff8881ddb91e00 by task syz-executor.0/25423 CPU: 1 PID: 25423 Comm: syz-executor.0 Not tainted 4.14.217-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/0x1e7 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/0x2d3 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:00007f987c1cdc78 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: 00007ffc814a04ff R14: 00007f987c1ce9c0 R15: 000000000118d12c Allocated by task 3094: 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:4003 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 ffff8881ddb91c80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 384 bytes inside of 512-byte region [ffff8881ddb91c80, ffff8881ddb91e80) The buggy address belongs to the page: page:ffffea000776e440 count:1 mapcount:0 mapping:ffff8881ddb91000 index:0x0 flags: 0x17ffe0000000100(slab) raw: 017ffe0000000100 ffff8881ddb91000 0000000000000000 0000000100000006 raw: ffffea00071e1aa0 ffffea00079de5e0 ffff8881f6000940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881ddb91d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881ddb91d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881ddb91e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881ddb91e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881ddb91f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================