================================================================== BUG: KASAN: use-after-free in __queue_work+0xdff/0x1100 kernel/workqueue.c:1383 Read of size 4 at addr ffff8880928b4240 by task syz-executor.2/11635 CPU: 1 PID: 11635 Comm: syz-executor.2 Not tainted 4.19.136-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 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 queue_work include/linux/workqueue.h:512 [inline] req_run+0x2c5/0x4a0 net/bluetooth/hci_request.c:87 hci_req_run_skb net/bluetooth/hci_request.c:99 [inline] __hci_req_sync+0x1d8/0x830 net/bluetooth/hci_request.c:212 hci_req_sync+0x7d/0xb0 net/bluetooth/hci_request.c:279 hci_dev_cmd+0x55f/0x890 net/bluetooth/hci_core.c:1911 hci_sock_ioctl+0x3c2/0x7a0 net/bluetooth/hci_sock.c:1045 sock_do_ioctl+0xcb/0x2d0 net/socket.c:950 sock_ioctl+0x2ef/0x5d0 net/socket.c:1074 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45cc79 Code: 2d b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f438b639c78 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: 00007ffe03ac323f R14: 00007f438b63a9c0 R15: 000000000078bf0c Allocated by task 14: __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 9: __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 ffff8880928b40c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 384 bytes inside of 512-byte region [ffff8880928b40c0, ffff8880928b42c0) The buggy address belongs to the page: page:ffffea00024a2d00 count:1 mapcount:0 mapping:ffff88812c39c940 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea00024f5448 ffffea00024a0e48 ffff88812c39c940 raw: 0000000000000000 ffff8880928b40c0 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880928b4100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880928b4180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880928b4200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880928b4280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880928b4300: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================