================================================================== BUG: KASAN: slab-use-after-free in hci_send_acl+0x54/0xc48 net/bluetooth/hci_core.c:3231 Read of size 8 at addr ffff0000d41ca818 by task kworker/1:4/6089 CPU: 1 PID: 6089 Comm: kworker/1:4 Not tainted 6.6.0-rc7-syzkaller-g8de1e7afcc1c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Workqueue: events l2cap_info_timeout Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x174/0x514 mm/kasan/report.c:475 kasan_report+0xd8/0x138 mm/kasan/report.c:588 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 hci_send_acl+0x54/0xc48 net/bluetooth/hci_core.c:3231 l2cap_send_cmd+0x52c/0x76c net/bluetooth/l2cap_core.c:977 l2cap_send_conn_req+0x188/0x2c4 net/bluetooth/l2cap_core.c:1286 l2cap_start_connection+0x118/0x2fc net/bluetooth/l2cap_core.c:1514 l2cap_conn_start+0x928/0xd8c net/bluetooth/l2cap_core.c:1661 l2cap_info_timeout+0x68/0xb8 net/bluetooth/l2cap_core.c:1807 process_one_work+0x694/0x1204 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:2784 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:857 Allocated by task 6232: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:511 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] kmalloc_trace+0x70/0x88 mm/slab_common.c:1122 kmalloc include/linux/slab.h:599 [inline] kzalloc include/linux/slab.h:720 [inline] hci_chan_create+0xb0/0x2b0 net/bluetooth/hci_conn.c:2723 l2cap_conn_add+0x78/0x998 net/bluetooth/l2cap_core.c:7841 l2cap_chan_connect+0x5bc/0xce4 net/bluetooth/l2cap_core.c:8053 bt_6lowpan_connect net/bluetooth/6lowpan.c:894 [inline] lowpan_control_write+0x4e8/0x824 net/bluetooth/6lowpan.c:1129 full_proxy_write+0x110/0x1f8 fs/debugfs/file.c:236 vfs_write+0x2a0/0x93c fs/read_write.c:582 ksys_write+0x15c/0x26c fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595 Freed by task 6125: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:522 ____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook mm/slub.c:1826 [inline] slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0x2ac/0x480 mm/slub.c:3822 kfree+0xb8/0x19c mm/slab_common.c:1075 hci_chan_del+0x148/0x1c4 net/bluetooth/hci_conn.c:2753 hci_chan_list_flush net/bluetooth/hci_conn.c:2763 [inline] hci_conn_cleanup net/bluetooth/hci_conn.c:152 [inline] hci_conn_del+0x3cc/0xabc net/bluetooth/hci_conn.c:1156 hci_conn_failed+0x204/0x2c0 net/bluetooth/hci_conn.c:1252 hci_abort_conn_sync+0x688/0xe38 net/bluetooth/hci_sync.c:5428 abort_conn_sync+0x5c/0x8c net/bluetooth/hci_conn.c:2910 hci_cmd_sync_work+0x1cc/0x34c net/bluetooth/hci_sync.c:306 process_one_work+0x694/0x1204 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:2784 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:857 The buggy address belongs to the object at ffff0000d41ca800 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of freed 128-byte region [ffff0000d41ca800, ffff0000d41ca880) The buggy address belongs to the physical page: page:0000000080e531c2 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000d41cad00 pfn:0x1141ca flags: 0x5ffc00000000800(slab|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000000800 ffff0000c00018c0 fffffc000369ec90 fffffc00031c2710 raw: ffff0000d41cad00 000000000010000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d41ca700: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ffff0000d41ca780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000d41ca800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d41ca880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d41ca900: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ==================================================================