Bluetooth: hci0: command 0x0c1a tx timeout ================================================================== BUG: KASAN: use-after-free in __queue_work+0xdff/0x1100 kernel/workqueue.c:1383 Read of size 4 at addr ffff888099c50400 by task kworker/1:3/15266 CPU: 1 PID: 15266 Comm: kworker/1:3 Not tainted 4.19.141-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events hci_cmd_timeout Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1c7 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load4_noabort+0x88/0x90 mm/kasan/report.c:432 __queue_work+0xdff/0x1100 kernel/workqueue.c:1383 queue_work_on+0x17e/0x1f0 kernel/workqueue.c:1488 process_one_work+0x864/0x1570 kernel/workqueue.c:2155 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 3727: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] kzalloc include/linux/slab.h:709 [inline] __alloc_workqueue_key+0x789/0xed0 kernel/workqueue.c:4087 hci_register_dev+0x1bf/0x870 net/bluetooth/hci_core.c:3179 __vhci_create_device+0x2b5/0x580 drivers/bluetooth/hci_vhci.c:139 vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline] vhci_open_timeout+0x35/0x50 drivers/bluetooth/hci_vhci.c:319 process_one_work+0x864/0x1570 kernel/workqueue.c:2155 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 16312: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0x8ff/0x18b0 kernel/rcu/tree.c:2881 __do_softirq+0x26c/0x9a0 kernel/softirq.c:292 The buggy address belongs to the object at ffff888099c50280 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 384 bytes inside of 512-byte region [ffff888099c50280, ffff888099c50480) The buggy address belongs to the page: page:ffffea0002671400 count:1 mapcount:0 mapping:ffff88812c39c940 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea000292e548 ffffea00024a07c8 ffff88812c39c940 raw: 0000000000000000 ffff888099c50000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888099c50300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099c50380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888099c50400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888099c50480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888099c50500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================