================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x41b7/0x5270 kernel/locking/lockdep.c:4063 Read of size 8 at addr ffff8880921b7928 by task syz-executor.2/8717 CPU: 0 PID: 8717 Comm: syz-executor.2 Not tainted 5.6.0-rc3-next-20200228-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x315 mm/kasan/report.c:374 __kasan_report.cold+0x1a/0x32 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:618 __lock_acquire+0x41b7/0x5270 kernel/locking/lockdep.c:4063 lock_acquire+0x197/0x420 kernel/locking/lockdep.c:4720 flush_workqueue+0x126/0x14c0 kernel/workqueue.c:2777 hci_dev_open+0xdb/0x360 net/bluetooth/hci_core.c:1626 hci_sock_bind+0x427/0x1210 net/bluetooth/hci_sock.c:1200 __sys_bind+0x20e/0x250 net/socket.c:1662 __do_sys_bind net/socket.c:1673 [inline] __se_sys_bind net/socket.c:1671 [inline] __x64_sys_bind+0x6f/0xb0 net/socket.c:1671 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c849 Code: ad 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f6ea2aabc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 00007f6ea2aac6d4 RCX: 000000000045c849 RDX: 0000000000000006 RSI: 0000000020000080 RDI: 0000000000000006 RBP: 000000000076bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000002c R14: 00000000004c2ce6 R15: 000000000076bf0c Allocated by task 8709: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:492 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:465 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x161/0x7a0 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] kzalloc include/linux/slab.h:669 [inline] alloc_workqueue+0x166/0xe90 kernel/workqueue.c:4250 hci_register_dev+0x203/0x950 net/bluetooth/hci_core.c:3390 __vhci_create_device+0x2b5/0x5b0 drivers/bluetooth/hci_vhci.c:124 vhci_create_device drivers/bluetooth/hci_vhci.c:148 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:205 [inline] vhci_write+0x2bf/0x450 drivers/bluetooth/hci_vhci.c:285 call_write_iter include/linux/fs.h:1901 [inline] new_sync_write+0x49c/0x700 fs/read_write.c:483 __vfs_write+0xc9/0x100 fs/read_write.c:496 vfs_write+0x262/0x5c0 fs/read_write.c:558 ksys_write+0x127/0x250 fs/read_write.c:611 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7145: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:314 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:453 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 rcu_do_batch kernel/rcu/tree.c:2218 [inline] rcu_core+0x59f/0x1370 kernel/rcu/tree.c:2445 __do_softirq+0x26c/0x99d kernel/softirq.c:292 The buggy address belongs to the object at ffff8880921b7800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 296 bytes inside of 512-byte region [ffff8880921b7800, ffff8880921b7a00) The buggy address belongs to the page: page:ffffea0002486dc0 refcount:1 mapcount:0 mapping:00000000554a632b index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00024a7a48 ffffea0002916a48 ffff8880aa000a80 raw: 0000000000000000 ffff8880921b7000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880921b7800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880921b7880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880921b7900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880921b7980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880921b7a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================