================================================================== BUG: KFENCE: use-after-free read in hci_send_acl+0x3e/0x1050 net/bluetooth/hci_core.c:3231 Use-after-free read at 0xffff88823bca2018 (in kfence-#80): hci_send_acl+0x3e/0x1050 net/bluetooth/hci_core.c:3231 l2cap_send_cmd+0x6dd/0x920 net/bluetooth/l2cap_core.c:977 l2cap_send_conn_req+0x1e5/0x260 net/bluetooth/l2cap_core.c:1286 l2cap_start_connection+0x11e/0x420 net/bluetooth/l2cap_core.c:1514 l2cap_conn_start+0x7ae/0xa40 net/bluetooth/l2cap_core.c:1661 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 kfence-#80: 0xffff88823bca2000-0xffff88823bca207f, size=128, cache=kmalloc-128 allocated by task 9460 on cpu 1 at 282.367782s: kfence_alloc include/linux/kfence.h:129 [inline] slab_alloc_node mm/slub.c:3464 [inline] __kmem_cache_alloc_node+0x24e/0x340 mm/slub.c:3517 kmalloc_trace+0x25/0xe0 mm/slab_common.c:1117 kmalloc include/linux/slab.h:599 [inline] kzalloc include/linux/slab.h:720 [inline] hci_chan_create+0xa6/0x3d0 net/bluetooth/hci_conn.c:2723 l2cap_conn_add.part.0+0x1a/0xdf0 net/bluetooth/l2cap_core.c:7841 l2cap_conn_add include/net/bluetooth/hci_core.h:1521 [inline] l2cap_chan_connect+0x15de/0x2170 net/bluetooth/l2cap_core.c:8053 l2cap_sock_connect+0x33f/0x720 net/bluetooth/l2cap_sock.c:256 kernel_connect+0x103/0x170 net/socket.c:3599 rfcomm_session_create net/bluetooth/rfcomm/core.c:811 [inline] __rfcomm_dlc_open net/bluetooth/rfcomm/core.c:388 [inline] rfcomm_dlc_open+0x81f/0xaa0 net/bluetooth/rfcomm/core.c:431 rfcomm_sock_connect+0x430/0x640 net/bluetooth/rfcomm/sock.c:409 __sys_connect_file+0x15b/0x1a0 net/socket.c:2050 __sys_connect+0x145/0x170 net/socket.c:2067 __do_sys_connect net/socket.c:2077 [inline] __se_sys_connect net/socket.c:2074 [inline] __x64_sys_connect+0x72/0xb0 net/socket.c:2074 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd freed by task 51 on cpu 0 at 294.264659s: hci_chan_list_flush+0x81/0xf0 net/bluetooth/hci_conn.c:2763 hci_conn_cleanup net/bluetooth/hci_conn.c:152 [inline] hci_conn_del+0x201/0xd80 net/bluetooth/hci_conn.c:1156 hci_abort_conn_sync+0x573/0xe10 net/bluetooth/hci_sync.c:5428 abort_conn_sync+0x187/0x390 net/bluetooth/hci_conn.c:2910 hci_cmd_sync_work+0x1a4/0x410 net/bluetooth/hci_sync.c:306 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.6.0-rc6-syzkaller-01725-gd6e48462e88f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Workqueue: events l2cap_info_timeout RIP: 0010:hci_send_acl+0x3e/0x1050 net/bluetooth/hci_core.c:3231 Code: 89 d5 53 48 89 f3 48 83 ec 70 e8 4d e4 49 f8 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 71 0e 00 00 <49> 8b 46 18 48 8d b8 58 0a 00 00 48 89 44 24 10 48 b8 00 00 00 00 RSP: 0018:ffffc900000e79b8 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffff888076e14280 RCX: 0000000000000000 RDX: 1ffff11047794403 RSI: ffffffff893e0113 RDI: ffff88823bca2000 RBP: 0000000000000002 R08: 0000000000000001 R09: 0000000000000080 R10: 0000000000000001 R11: ffffffff81ddeec1 R12: ffff88823bca2018 R13: 0000000000000002 R14: ffff88823bca2000 R15: ffffc900000e7af4 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88823bca2018 CR3: 00000000273e6000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: l2cap_send_cmd+0x6dd/0x920 net/bluetooth/l2cap_core.c:977 l2cap_send_conn_req+0x1e5/0x260 net/bluetooth/l2cap_core.c:1286 l2cap_start_connection+0x11e/0x420 net/bluetooth/l2cap_core.c:1514 l2cap_conn_start+0x7ae/0xa40 net/bluetooth/l2cap_core.c:1661 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 ================================================================== ---------------- Code disassembly (best guess): 0: 89 d5 mov %edx,%ebp 2: 53 push %rbx 3: 48 89 f3 mov %rsi,%rbx 6: 48 83 ec 70 sub $0x70,%rsp a: e8 4d e4 49 f8 call 0xf849e45c f: 4c 89 e2 mov %r12,%rdx 12: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 19: fc ff df 1c: 48 c1 ea 03 shr $0x3,%rdx 20: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 24: 0f 85 71 0e 00 00 jne 0xe9b * 2a: 49 8b 46 18 mov 0x18(%r14),%rax <-- trapping instruction 2e: 48 8d b8 58 0a 00 00 lea 0xa58(%rax),%rdi 35: 48 89 44 24 10 mov %rax,0x10(%rsp) 3a: 48 rex.W 3b: b8 00 00 00 00 mov $0x0,%eax