================================================================== BUG: KASAN: use-after-free in __queue_work+0xc6c/0xf20 kernel/workqueue.c:1412 Read of size 4 at addr ffff888093fd21c0 by task syz-executor.5/18594 CPU: 0 PID: 18594 Comm: syz-executor.5 Not tainted 5.8.0-next-20200810-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+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 __queue_work+0xc6c/0xf20 kernel/workqueue.c:1412 __queue_delayed_work+0x1c8/0x270 kernel/workqueue.c:1638 queue_delayed_work_on+0x1a2/0x210 kernel/workqueue.c:1674 queue_delayed_work include/linux/workqueue.h:522 [inline] hci_conn_drop include/net/bluetooth/hci_core.h:1142 [inline] hci_conn_drop include/net/bluetooth/hci_core.h:1112 [inline] sco_chan_del+0x1db/0x430 net/bluetooth/sco.c:149 __sco_sock_close+0x16e/0x5b0 net/bluetooth/sco.c:434 sco_sock_close net/bluetooth/sco.c:448 [inline] sco_sock_release+0x69/0x290 net/bluetooth/sco.c:1053 __sock_release+0xcd/0x280 net/socket.c:596 sock_close+0x18/0x20 net/socket.c:1277 __fput+0x285/0x920 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:135 get_signal+0xd6c/0x1ee0 kernel/signal.c:2547 arch_do_signal+0x82/0x2520 arch/x86/kernel/signal.c:811 exit_to_user_mode_loop kernel/entry/common.c:135 [inline] exit_to_user_mode_prepare+0x15d/0x1c0 kernel/entry/common.c:166 syscall_exit_to_user_mode+0x59/0x2b0 kernel/entry/common.c:241 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45ce69 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:00007f7d8674bc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: fffffffffffffffc RBX: 0000000000002180 RCX: 000000000045ce69 RDX: 0000000000000008 RSI: 0000000020000140 RDI: 0000000000000004 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffdb106899f R14: 00007f7d8674c9c0 R15: 000000000118bf2c Allocated by task 8143: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 __do_kmalloc mm/slab.c:3655 [inline] __kmalloc+0x1a8/0x320 mm/slab.c:3664 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:666 [inline] alloc_workqueue+0x166/0xe50 kernel/workqueue.c:4265 hci_register_dev+0x1b5/0xa30 net/bluetooth/hci_core.c:3688 __vhci_create_device+0x2ac/0x5b0 drivers/bluetooth/hci_vhci.c:124 vhci_create_device drivers/bluetooth/hci_vhci.c:148 [inline] vhci_open_timeout+0x38/0x50 drivers/bluetooth/hci_vhci.c:305 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Freed by task 9: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422 __cache_free mm/slab.c:3418 [inline] kfree+0x103/0x2c0 mm/slab.c:3756 rcu_do_batch kernel/rcu/tree.c:2428 [inline] rcu_core+0x5c7/0x1190 kernel/rcu/tree.c:2656 __do_softirq+0x2de/0xa24 kernel/softirq.c:298 Last call_rcu(): kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0x82/0xb0 mm/kasan/generic.c:346 __call_rcu kernel/rcu/tree.c:2894 [inline] call_rcu+0x14f/0x7e0 kernel/rcu/tree.c:2968 pwq_unbound_release_workfn+0x23a/0x2d0 kernel/workqueue.c:3694 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff888093fd2000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 448 bytes inside of 1024-byte region [ffff888093fd2000, ffff888093fd2400) The buggy address belongs to the page: page:00000000f47b22de refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x93fd2 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000251df88 ffffea000299b008 ffff8880aa040700 raw: 0000000000000000 ffff888093fd2000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888093fd2080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888093fd2100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888093fd2180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888093fd2200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888093fd2280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================