================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x1b4/0x1f0 net/bluetooth/hci_conn.c:1683 Read of size 8 at addr ffff8880b51b8cd8 by task syz-executor.2/28294 CPU: 0 PID: 28294 Comm: syz-executor.2 Not tainted 4.19.190-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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 hci_chan_del+0x1b4/0x1f0 net/bluetooth/hci_conn.c:1683 l2cap_conn_del+0x45e/0x6e0 net/bluetooth/l2cap_core.c:1739 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7441 [inline] l2cap_disconn_cfm+0x98/0xd0 net/bluetooth/l2cap_core.c:7434 hci_disconn_cfm include/net/bluetooth/hci_core.h:1261 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1512 hci_dev_do_close+0x659/0xf10 net/bluetooth/hci_core.c:1668 hci_rfkill_set_block+0xe7/0x160 net/bluetooth/hci_core.c:2102 rfkill_set_block+0x1f9/0x540 net/rfkill/core.c:353 rfkill_fop_write+0x250/0x4a0 net/rfkill/core.c:1249 __vfs_write+0xf7/0x770 fs/read_write.c:485 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665f9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff74c444188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9 RDX: 0000000000000008 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00000000004bfce1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffed60f5c6f R14: 00007ff74c444300 R15: 0000000000022000 Allocated by task 8142: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] hci_chan_create+0x9d/0x3a0 net/bluetooth/hci_conn.c:1668 l2cap_conn_add.part.0+0x18/0xc40 net/bluetooth/l2cap_core.c:7062 l2cap_conn_add include/net/bluetooth/l2cap.h:811 [inline] l2cap_connect_cfm+0x5bc/0xf50 net/bluetooth/l2cap_core.c:7379 hci_connect_cfm include/net/bluetooth/hci_core.h:1246 [inline] le_conn_complete_evt+0x114c/0x1880 net/bluetooth/hci_event.c:4932 hci_le_enh_conn_complete_evt net/bluetooth/hci_event.c:4974 [inline] hci_le_meta_evt+0x363/0x3e00 net/bluetooth/hci_event.c:5660 hci_event_packet+0x34ad/0x7e20 net/bluetooth/hci_event.c:5901 hci_rx_work+0x4ad/0xc70 net/bluetooth/hci_core.c:4361 process_one_work+0x864/0x1570 kernel/workqueue.c:2152 worker_thread+0x64c/0x1130 kernel/workqueue.c:2295 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 8138: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 hci_disconn_loglink_complete_evt.isra.0+0x1cf/0x240 net/bluetooth/hci_event.c:4759 hci_event_packet+0x34e1/0x7e20 net/bluetooth/hci_event.c:5922 hci_rx_work+0x4ad/0xc70 net/bluetooth/hci_core.c:4361 process_one_work+0x864/0x1570 kernel/workqueue.c:2152 worker_thread+0x64c/0x1130 kernel/workqueue.c:2295 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8880b51b8cc0 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff8880b51b8cc0, ffff8880b51b8d40) The buggy address belongs to the page: page:ffffea0002d46e00 count:1 mapcount:0 mapping:ffff88813bff0640 index:0xffff8880b51b89c0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00025cb5c8 ffffea0002aaf288 ffff88813bff0640 raw: ffff8880b51b89c0 ffff8880b51b8000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b51b8b80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ffff8880b51b8c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880b51b8c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880b51b8d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880b51b8d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================