================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x14f/0x190 net/bluetooth/hci_conn.c:1728 Read of size 8 at addr ffff88809de67218 by task syz-executor284/6848 CPU: 1 PID: 6848 Comm: syz-executor284 Not tainted 5.8.0-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/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 hci_chan_del+0x14f/0x190 net/bluetooth/hci_conn.c:1728 l2cap_conn_del+0x61b/0x9e0 net/bluetooth/l2cap_core.c:1900 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:8160 [inline] l2cap_disconn_cfm+0x85/0xa0 net/bluetooth/l2cap_core.c:8153 hci_disconn_cfm include/net/bluetooth/hci_core.h:1438 [inline] hci_conn_hash_flush+0x114/0x220 net/bluetooth/hci_conn.c:1557 hci_dev_do_close+0x5c6/0x1080 net/bluetooth/hci_core.c:1770 hci_unregister_dev+0x1bd/0xe30 net/bluetooth/hci_core.c:3790 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:340 __fput+0x33c/0x880 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:135 exit_task_work include/linux/task_work.h:25 [inline] do_exit+0xb7d/0x29f0 kernel/exit.c:806 __do_sys_exit kernel/exit.c:872 [inline] __se_sys_exit kernel/exit.c:870 [inline] __x64_sys_exit+0x3e/0x50 kernel/exit.c:870 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x402bfe Code: Bad RIP value. RSP: 002b:00007f759d1e6de0 EFLAGS: 00000246 ORIG_RAX: 000000000000003c RAX: ffffffffffffffda RBX: 00007f759d1e7700 RCX: 0000000000402bfe RDX: 000000000000003c RSI: 00000000007fb000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 00000000000000f1 R09: 00007f759d1e7700 R10: 00007f759d1e79d0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd84c5b06f R14: 00007f759d1e79c0 R15: 0000000000000001 Allocated by task 6850: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 kmem_cache_alloc_trace+0x14f/0x2d0 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] hci_chan_create+0x9b/0x330 net/bluetooth/hci_conn.c:1713 l2cap_conn_add.part.0+0x1e/0xe10 net/bluetooth/l2cap_core.c:7698 l2cap_conn_add net/bluetooth/l2cap_core.c:8140 [inline] l2cap_connect_cfm+0x23b/0x1090 net/bluetooth/l2cap_core.c:8098 hci_connect_cfm include/net/bluetooth/hci_core.h:1423 [inline] le_conn_complete_evt+0x1153/0x1740 net/bluetooth/hci_event.c:5190 hci_le_conn_complete_evt net/bluetooth/hci_event.c:5215 [inline] hci_le_meta_evt+0x745/0x3ff0 net/bluetooth/hci_event.c:5915 hci_event_packet+0x2e25/0x87a8 net/bluetooth/hci_event.c:6192 hci_rx_work+0x22e/0xb50 net/bluetooth/hci_core.c:4889 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 6850: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf5/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x103/0x2c0 mm/slab.c:3757 hci_disconn_loglink_complete_evt net/bluetooth/hci_event.c:5018 [inline] hci_event_packet+0x3e33/0x87a8 net/bluetooth/hci_event.c:6213 hci_rx_work+0x22e/0xb50 net/bluetooth/hci_core.c:4889 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 ffff88809de67200 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff88809de67200, ffff88809de67280) The buggy address belongs to the page: page:ffffea00027799c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88809de67900 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000273ff48 ffffea0002795848 ffff8880aa000700 raw: ffff88809de67900 ffff88809de67000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809de67100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809de67180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809de67200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809de67280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809de67300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================