Bluetooth: hci0: command 0x040f tx timeout
Bluetooth: hci0: command 0x0419 tx timeout
Bluetooth: hci0: command 0x0405 tx timeout
==================================================================
BUG: KASAN: use-after-free in __lock_acquire+0x2cb4/0x3ff0 syzkaller/managers/linux-4-19/kernel/kernel/locking/lockdep.c:3294
Read of size 8 at addr ffff8880b2c64c60 by task kworker/0:2/3634

CPU: 0 PID: 3634 Comm: kworker/0:2 Not tainted 4.19.172-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events l2cap_chan_timeout
Call Trace:
 __dump_stack syzkaller/managers/linux-4-19/kernel/lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef syzkaller/managers/linux-4-19/kernel/lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 syzkaller/managers/linux-4-19/kernel/mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 syzkaller/managers/linux-4-19/kernel/mm/kasan/report.c:354
 kasan_report syzkaller/managers/linux-4-19/kernel/mm/kasan/report.c:412 [inline]
 __asan_report_load8_noabort+0x88/0x90 syzkaller/managers/linux-4-19/kernel/mm/kasan/report.c:433
 __lock_acquire+0x2cb4/0x3ff0 syzkaller/managers/linux-4-19/kernel/kernel/locking/lockdep.c:3294
 lock_acquire+0x170/0x3c0 syzkaller/managers/linux-4-19/kernel/kernel/locking/lockdep.c:3907
 __raw_spin_lock_bh syzkaller/managers/linux-4-19/kernel/./include/linux/spinlock_api_smp.h:135 [inline]
 _raw_spin_lock_bh+0x2f/0x40 syzkaller/managers/linux-4-19/kernel/kernel/locking/spinlock.c:168
 spin_lock_bh syzkaller/managers/linux-4-19/kernel/./include/linux/spinlock.h:334 [inline]
 lock_sock_nested+0x3b/0x110 syzkaller/managers/linux-4-19/kernel/net/core/sock.c:2864
 l2cap_sock_teardown_cb+0xa0/0x6d0 syzkaller/managers/linux-4-19/kernel/net/bluetooth/l2cap_sock.c:1340
 l2cap_chan_del+0xbc/0xa50 syzkaller/managers/linux-4-19/kernel/net/bluetooth/l2cap_core.c:599
 l2cap_chan_close+0x1b5/0x950 syzkaller/managers/linux-4-19/kernel/net/bluetooth/l2cap_core.c:757
 l2cap_chan_timeout+0x17e/0x2f0 syzkaller/managers/linux-4-19/kernel/net/bluetooth/l2cap_core.c:430
 process_one_work+0x864/0x1570 syzkaller/managers/linux-4-19/kernel/kernel/workqueue.c:2155
 worker_thread+0x64c/0x1130 syzkaller/managers/linux-4-19/kernel/kernel/workqueue.c:2298
 kthread+0x33f/0x460 syzkaller/managers/linux-4-19/kernel/kernel/kthread.c:259
 ret_from_fork+0x24/0x30 syzkaller/managers/linux-4-19/kernel/arch/x86/entry/entry_64.S:415

Allocated by task 8133:
 __do_kmalloc syzkaller/managers/linux-4-19/kernel/mm/slab.c:3727 [inline]
 __kmalloc+0x15a/0x3c0 syzkaller/managers/linux-4-19/kernel/mm/slab.c:3736
 kmalloc syzkaller/managers/linux-4-19/kernel/./include/linux/slab.h:520 [inline]
 sk_prot_alloc+0x1e2/0x2d0 syzkaller/managers/linux-4-19/kernel/net/core/sock.c:1466
 sk_alloc+0x36/0xec0 syzkaller/managers/linux-4-19/kernel/net/core/sock.c:1520
 l2cap_sock_alloc.constprop.0+0x31/0x210 syzkaller/managers/linux-4-19/kernel/net/bluetooth/l2cap_sock.c:1617
 l2cap_sock_create+0x123/0x1f0 syzkaller/managers/linux-4-19/kernel/net/bluetooth/l2cap_sock.c:1663
 bt_sock_create+0x154/0x2a0 syzkaller/managers/linux-4-19/kernel/net/bluetooth/af_bluetooth.c:130
 __sock_create+0x3d8/0x740 syzkaller/managers/linux-4-19/kernel/net/socket.c:1276
 sock_create syzkaller/managers/linux-4-19/kernel/net/socket.c:1316 [inline]
 __sys_socket+0xef/0x200 syzkaller/managers/linux-4-19/kernel/net/socket.c:1346
 __do_sys_socket syzkaller/managers/linux-4-19/kernel/net/socket.c:1355 [inline]
 __se_sys_socket syzkaller/managers/linux-4-19/kernel/net/socket.c:1353 [inline]
 __x64_sys_socket+0x6f/0xb0 syzkaller/managers/linux-4-19/kernel/net/socket.c:1353
 do_syscall_64+0xf9/0x620 syzkaller/managers/linux-4-19/kernel/arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 8133:
 __cache_free syzkaller/managers/linux-4-19/kernel/mm/slab.c:3503 [inline]
 kfree+0xcc/0x210 syzkaller/managers/linux-4-19/kernel/mm/slab.c:3822
 sk_prot_free syzkaller/managers/linux-4-19/kernel/net/core/sock.c:1503 [inline]
 __sk_destruct+0x684/0x8a0 syzkaller/managers/linux-4-19/kernel/net/core/sock.c:1584
 sk_destruct syzkaller/managers/linux-4-19/kernel/net/core/sock.c:1599 [inline]
 __sk_free+0x165/0x3b0 syzkaller/managers/linux-4-19/kernel/net/core/sock.c:1610
 sk_free+0x3b/0x50 syzkaller/managers/linux-4-19/kernel/net/core/sock.c:1621
 sock_put syzkaller/managers/linux-4-19/kernel/./include/net/sock.h:1711 [inline]
 l2cap_sock_kill.part.0+0x124/0x150 syzkaller/managers/linux-4-19/kernel/net/bluetooth/l2cap_sock.c:1055
 l2cap_sock_kill syzkaller/managers/linux-4-19/kernel/net/bluetooth/l2cap_sock.c:1046 [inline]
 l2cap_sock_release+0x1e6/0x290 syzkaller/managers/linux-4-19/kernel/net/bluetooth/l2cap_sock.c:1209
 __sock_release+0xcd/0x2a0 syzkaller/managers/linux-4-19/kernel/net/socket.c:579
 sock_close+0x15/0x20 syzkaller/managers/linux-4-19/kernel/net/socket.c:1140
 __fput+0x2ce/0x890 syzkaller/managers/linux-4-19/kernel/fs/file_table.c:278
 task_work_run+0x148/0x1c0 syzkaller/managers/linux-4-19/kernel/kernel/task_work.c:113
 exit_task_work syzkaller/managers/linux-4-19/kernel/./include/linux/task_work.h:22 [inline]
 do_exit+0xbf3/0x2be0 syzkaller/managers/linux-4-19/kernel/kernel/exit.c:870
 do_group_exit+0x125/0x310 syzkaller/managers/linux-4-19/kernel/kernel/exit.c:967
 get_signal+0x3f2/0x1f70 syzkaller/managers/linux-4-19/kernel/kernel/signal.c:2589
 do_signal+0x8f/0x1670 syzkaller/managers/linux-4-19/kernel/arch/x86/kernel/signal.c:821
 exit_to_usermode_loop+0x204/0x2a0 syzkaller/managers/linux-4-19/kernel/arch/x86/entry/common.c:163
 prepare_exit_to_usermode syzkaller/managers/linux-4-19/kernel/arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath syzkaller/managers/linux-4-19/kernel/arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 syzkaller/managers/linux-4-19/kernel/arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880b2c64bc0
 which belongs to the cache kmalloc-2048 of size 2048
The buggy address is located 160 bytes inside of
 2048-byte region [ffff8880b2c64bc0, ffff8880b2c653c0)
The buggy address belongs to the page:
page:ffffea0002cb1900 count:1 mapcount:0 mapping:ffff88813bff0c40 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0002c00b88 ffffea0002c4cc88 ffff88813bff0c40
raw: 0000000000000000 ffff8880b2c64340 0000000100000003 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b2c64b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880b2c64b80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
>ffff8880b2c64c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                       ^
 ffff8880b2c64c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880b2c64d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================