Bluetooth: hci2 command 0x041b tx timeout ================================================================== BUG: KASAN: use-after-free in __queue_work+0xc2f/0xf70 kernel/workqueue.c:1385 Read of size 4 at addr ffff8880a7e71b80 by task syz-executor.4/10075 CPU: 0 PID: 10075 Comm: syz-executor.4 Not tainted 4.14.191-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+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:429 __queue_work+0xc2f/0xf70 kernel/workqueue.c:1385 queue_work_on+0x159/0x1d0 kernel/workqueue.c:1490 queue_work include/linux/workqueue.h:491 [inline] req_run+0x2bb/0x490 net/bluetooth/hci_request.c:77 hci_req_run_skb net/bluetooth/hci_request.c:89 [inline] __hci_req_sync+0x277/0x770 net/bluetooth/hci_request.c:214 hci_req_sync+0x71/0xa0 net/bluetooth/hci_request.c:285 hci_dev_cmd+0x395/0x720 net/bluetooth/hci_core.c:1865 hci_sock_ioctl+0x30c/0x650 net/bluetooth/hci_sock.c:1040 sock_do_ioctl net/socket.c:974 [inline] sock_ioctl+0x2cc/0x4c0 net/socket.c:1071 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45cc79 RSP: 002b:00007feecffd8c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000001d300 RCX: 000000000045cc79 RDX: 0000000020000000 RSI: 00000000400448de RDI: 0000000000000004 RBP: 000000000078bf40 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007ffc48cb57af R14: 00007feecffd99c0 R15: 000000000078bf0c Allocated by task 6675: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] kzalloc include/linux/slab.h:661 [inline] __alloc_workqueue_key+0x10e/0x1080 kernel/workqueue.c:3996 hci_register_dev+0x1a0/0x800 net/bluetooth/hci_core.c:3099 __vhci_create_device+0x28d/0x540 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+0x793/0x14a0 kernel/workqueue.c:2116 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 17: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 __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+0x780/0x1180 kernel/rcu/tree.c:2946 __do_softirq+0x254/0xa1d kernel/softirq.c:288 The buggy address belongs to the object at ffff8880a7e71a00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 384 bytes inside of 512-byte region [ffff8880a7e71a00, ffff8880a7e71c00) The buggy address belongs to the page: page:ffffea00029f9c40 count:1 mapcount:0 mapping:ffff8880a7e71000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880a7e71000 0000000000000000 0000000100000006 raw: ffffea00029fc060 ffffea0002a0da20 ffff88812fe52940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a7e71a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a7e71b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a7e71b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a7e71c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a7e71c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================