Bluetooth: hci2 command 0x0409 tx timeout Bluetooth: hci3 command 0x0409 tx timeout Bluetooth: hci5 command 0x0409 tx timeout Bluetooth: hci4 command 0x0409 tx timeout ================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x12b/0x170 net/bluetooth/hci_conn.c:1547 Read of size 8 at addr ffff8880a09a6d98 by task syz-executor.2/6500 CPU: 0 PID: 6500 Comm: syz-executor.2 Not tainted 4.14.196-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+0x14b/0x1f1 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.7+0x11a/0x2d4 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 hci_chan_del+0x12b/0x170 net/bluetooth/hci_conn.c:1547 l2cap_conn_del.isra.23+0x3cf/0x620 net/bluetooth/l2cap_core.c:1736 l2cap_disconn_cfm+0x61/0x80 net/bluetooth/l2cap_core.c:7435 hci_disconn_cfm include/net/bluetooth/hci_core.h:1226 [inline] hci_conn_hash_flush+0x10b/0x200 net/bluetooth/hci_conn.c:1376 hci_dev_do_close+0x47a/0xb10 net/bluetooth/hci_core.c:1620 hci_unregister_dev+0x163/0x790 net/bluetooth/hci_core.c:3191 vhci_release+0x6b/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x232/0x740 fs/file_table.c:210 ____fput+0x9/0x10 fs/file_table.c:244 task_work_run+0xe5/0x170 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x953/0x2c40 kernel/exit.c:865 do_group_exit+0xf8/0x2c0 kernel/exit.c:962 SYSC_exit_group kernel/exit.c:973 [inline] SyS_exit_group+0x18/0x20 kernel/exit.c:971 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ce69 RSP: 002b:00007fff3f4e3eb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000045ce69 RDX: 00000000004168c1 RSI: 00000000016a85f0 RDI: 0000000000000043 RBP: 00000000004c2b1b R08: 000000000000000b R09: 0000000000000000 R10: 00000000026eb940 R11: 0000000000000246 R12: 0000000000000009 R13: 00007fff3f4e4000 R14: 000000000000c6c8 R15: 00007fff3f4e4010 Allocated by task 7874: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 kmem_cache_alloc_trace+0x152/0x3f0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] hci_chan_create+0x7b/0x2e0 net/bluetooth/hci_conn.c:1532 l2cap_conn_add.part.16+0x15/0xbd0 net/bluetooth/l2cap_core.c:7056 l2cap_conn_add net/bluetooth/l2cap_core.c:97 [inline] l2cap_connect_cfm+0x319/0xd20 net/bluetooth/l2cap_core.c:7373 hci_connect_cfm include/net/bluetooth/hci_core.h:1211 [inline] hci_le_conn_complete_evt net/bluetooth/hci_event.c:4609 [inline] hci_le_meta_evt+0x31b5/0x42c0 net/bluetooth/hci_event.c:5168 hci_event_packet+0x2ef6/0x70be net/bluetooth/hci_event.c:5423 hci_rx_work+0x30e/0x8d0 net/bluetooth/hci_core.c:4244 process_one_work+0x74f/0x1620 kernel/workqueue.c:2116 worker_thread+0xcc/0xed0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 7877: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xab/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 hci_chan_del+0x11b/0x170 net/bluetooth/hci_conn.c:1562 amp_destroy_logical_link+0x9/0x10 net/bluetooth/amp.c:595 hci_disconn_loglink_complete_evt net/bluetooth/hci_event.c:4440 [inline] hci_event_packet+0xc9f/0x70be net/bluetooth/hci_event.c:5444 hci_rx_work+0x30e/0x8d0 net/bluetooth/hci_core.c:4244 process_one_work+0x74f/0x1620 kernel/workqueue.c:2116 worker_thread+0xcc/0xed0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff8880a09a6d80 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff8880a09a6d80, ffff8880a09a6e00) The buggy address belongs to the page: page:ffffea0002826980 count:1 mapcount:0 mapping:ffff8880a09a6000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880a09a6000 0000000000000000 0000000100000015 raw: ffffea0002807460 ffffea00027d5ea0 ffff8880aa800640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a09a6c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880a09a6d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880a09a6d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a09a6e00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880a09a6e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== Bluetooth: hci0 command 0x041b tx timeout