================================================================== BUG: KASAN: use-after-free in hci_send_acl+0xa8a/0xc60 net/bluetooth/hci_core.c:4373 Read of size 8 at addr ffff88810e6e3d18 by task kworker/u5:0/1557 CPU: 1 PID: 1557 Comm: kworker/u5:0 Not tainted 5.12.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: hci0 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x10c/0x14b lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2c6 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 hci_send_acl+0xa8a/0xc60 net/bluetooth/hci_core.c:4373 l2cap_send_move_chan_cfm_icid net/bluetooth/l2cap_core.c:4923 [inline] l2cap_move_fail net/bluetooth/l2cap_core.c:5407 [inline] l2cap_move_channel_rsp net/bluetooth/l2cap_core.c:5446 [inline] l2cap_bredr_sig_cmd net/bluetooth/l2cap_core.c:5725 [inline] l2cap_sig_channel net/bluetooth/l2cap_core.c:6424 [inline] l2cap_recv_frame+0x52ee/0x9dd0 net/bluetooth/l2cap_core.c:7667 hci_acldata_packet net/bluetooth/hci_core.c:4902 [inline] hci_rx_work+0x38f/0x930 net/bluetooth/hci_core.c:5093 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2275 worker_thread+0x598/0xf80 kernel/workqueue.c:2421 kthread+0x36f/0x450 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 7375: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] ____kasan_kmalloc mm/kasan/common.c:506 [inline] __kasan_kmalloc+0x78/0x90 mm/kasan/common.c:515 kasan_kmalloc include/linux/kasan.h:233 [inline] kmem_cache_alloc_trace+0x203/0x400 mm/slab.c:3570 kmalloc include/linux/slab.h:554 [inline] kzalloc include/linux/slab.h:684 [inline] hci_chan_create+0x7f/0x300 net/bluetooth/hci_conn.c:1754 l2cap_conn_add.part.0+0x12/0xd10 net/bluetooth/l2cap_core.c:7706 l2cap_conn_add net/bluetooth/l2cap_core.c:8122 [inline] l2cap_connect_cfm+0x318/0xe40 net/bluetooth/l2cap_core.c:8106 hci_connect_cfm include/net/bluetooth/hci_core.h:1471 [inline] hci_remote_features_evt.isra.0+0x51f/0x9d0 net/bluetooth/hci_event.c:3242 hci_event_packet+0x2b7c/0x78f0 net/bluetooth/hci_event.c:6181 hci_rx_work+0x16d/0x930 net/bluetooth/hci_core.c:5088 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2275 worker_thread+0x598/0xf80 kernel/workqueue.c:2421 kthread+0x36f/0x450 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Freed by task 1557: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xac/0xe0 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:199 [inline] __cache_free mm/slab.c:3440 [inline] kfree+0x10f/0x2d0 mm/slab.c:3796 hci_disconn_loglink_complete_evt net/bluetooth/hci_event.c:5043 [inline] hci_event_packet+0x3995/0x78f0 net/bluetooth/hci_event.c:6308 hci_rx_work+0x16d/0x930 net/bluetooth/hci_core.c:5088 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2275 worker_thread+0x598/0xf80 kernel/workqueue.c:2421 kthread+0x36f/0x450 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff88810e6e3d00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff88810e6e3d00, ffff88810e6e3d80) The buggy address belongs to the page: page:00000000d55ebb89 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10e6e3 flags: 0x17ffe0000000200(slab) raw: 017ffe0000000200 ffffea00040b30c8 ffffea0004037808 ffff888100040400 raw: 0000000000000000 ffff88810e6e3000 0000000100000010 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88810e6e3c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ffff88810e6e3c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88810e6e3d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88810e6e3d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810e6e3e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================