================================================================== BUG: KASAN: use-after-free in hci_send_acl+0xabe/0xc60 net/bluetooth/hci_core.c:4174 Read of size 8 at addr ffff8880a733bd18 by task kworker/u5:0/1545 CPU: 1 PID: 1545 Comm: kworker/u5:0 Not tainted 5.9.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: hci3 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x198/0x1fd lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 hci_send_acl+0xabe/0xc60 net/bluetooth/hci_core.c:4174 l2cap_send_cmd+0x6d5/0x8a0 net/bluetooth/l2cap_core.c:949 l2cap_send_move_chan_cfm_icid net/bluetooth/l2cap_core.c:4916 [inline] l2cap_move_fail net/bluetooth/l2cap_core.c:5400 [inline] l2cap_move_channel_rsp net/bluetooth/l2cap_core.c:5439 [inline] l2cap_bredr_sig_cmd net/bluetooth/l2cap_core.c:5718 [inline] l2cap_sig_channel net/bluetooth/l2cap_core.c:6417 [inline] l2cap_recv_frame+0x6936/0xae10 net/bluetooth/l2cap_core.c:7659 l2cap_recv_acldata+0x7f6/0x8e0 net/bluetooth/l2cap_core.c:8314 hci_acldata_packet net/bluetooth/hci_core.c:4703 [inline] hci_rx_work+0x4c7/0xb50 net/bluetooth/hci_core.c:4894 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 Allocated by task 6985: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 kmem_cache_alloc_trace+0x174/0x2c0 mm/slab.c:3554 kmalloc include/linux/slab.h:554 [inline] kzalloc include/linux/slab.h:666 [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] hci_remote_features_evt net/bluetooth/hci_event.c:3222 [inline] hci_event_packet+0x36e2/0x87a8 net/bluetooth/hci_event.c:6086 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 1545: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422 __cache_free mm/slab.c:3422 [inline] kfree+0x10e/0x2b0 mm/slab.c:3760 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 ffff8880a733bd00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff8880a733bd00, ffff8880a733bd80) The buggy address belongs to the page: page:00000000d3daa2e0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xa733b flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00027e4888 ffffea00027715c8 ffff8880aa040400 raw: 0000000000000000 ffff8880a733b000 0000000100000010 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a733bc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ffff8880a733bc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a733bd00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a733bd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a733be00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ==================================================================