================================================================== BUG: KASAN: slab-use-after-free in hci_send_acl+0x54/0xc48 net/bluetooth/hci_core.c:3231 Read of size 8 at addr ffff0000d1526f18 by task kworker/0:1/10 CPU: 0 PID: 10 Comm: kworker/0:1 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 6249: 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 The buggy address belongs to the object at ffff0000d1526f00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of freed 128-byte region [ffff0000d1526f00, ffff0000d1526f80) The buggy address belongs to the physical page: page:0000000071b02b7a refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000d1526f00 pfn:0x111526 ksm flags: 0x5ffc00000000800(slab|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000000800 ffff0000c00018c0 fffffc00034465c0 dead000000000003 raw: ffff0000d1526f00 000000008010000f 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d1526e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ffff0000d1526e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000d1526f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d1526f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d1527000: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ================================================================== Unable to handle kernel paging request at virtual address fbd529d5a000014e KASAN: maybe wild-memory-access in range [0xdead4ead00000a70-0xdead4ead00000a77] Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [fbd529d5a000014e] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 10 Comm: kworker/0:1 Tainted: G B 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 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : hci_send_acl+0x60/0xc48 net/bluetooth/hci_core.c:3231 lr : hci_send_acl+0x54/0xc48 net/bluetooth/hci_core.c:3231 sp : ffff800092d576f0 x29: ffff800092d57760 x28: dfff800000000000 x27: ffff0000e3305e0e x26: ffff0000e3305e0c x25: dfff800000000000 x24: 1fffe0001a2a4de3 x23: dead4ead00000a70 x22: ffff0000d1526f18 x21: 0000000000000002 x20: ffff0000d1526f00 x19: ffff0000d6086140 x18: 1fffe0003682efce x17: ffff80008e33d000 x16: ffff80008a71b23c x15: 0000000000000001 x14: 1ffff0001225d338 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 x8 : 1bd5a9d5a000014e x7 : 1fffe0003682efcf x6 : ffff80008028e628 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff8000801b8c4c x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000001 Call trace: hci_send_acl+0x60/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 Code: 979ac1b3 f94002c8 9129c117 d343fee8 (38796908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 979ac1b3 bl 0xfffffffffe6b06cc 4: f94002c8 ldr x8, [x22] 8: 9129c117 add x23, x8, #0xa70 c: d343fee8 lsr x8, x23, #3 * 10: 38796908 ldrb w8, [x8, x25] <-- trapping instruction