do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 ================================================================== BUG: KASAN: use-after-free in hci_sock_get_cookie+0x60/0x68 net/bluetooth/hci_sock.c:96 Read of size 4 at addr ffff0000d4a6e580 by task syz.4.342/5699 CPU: 0 PID: 5699 Comm: syz.4.342 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: dump_backtrace+0x1c0/0x1ec arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106 print_address_description+0x88/0x218 mm/kasan/report.c:316 print_report+0x50/0x68 mm/kasan/report.c:420 kasan_report+0xa8/0xfc mm/kasan/report.c:524 __asan_report_load4_noabort+0x2c/0x38 mm/kasan/report_generic.c:350 hci_sock_get_cookie+0x60/0x68 net/bluetooth/hci_sock.c:96 mgmt_cmd_status+0x140/0x430 net/bluetooth/mgmt_util.c:149 cmd_status_rsp net/bluetooth/mgmt.c:1462 [inline] cmd_complete_rsp+0xf4/0x1ac net/bluetooth/mgmt.c:1482 mgmt_pending_foreach+0xd4/0x148 net/bluetooth/mgmt_util.c:259 __mgmt_power_off+0x13c/0x32c net/bluetooth/mgmt.c:9549 hci_dev_close_sync+0x478/0xec8 net/bluetooth/hci_sync.c:5242 hci_dev_do_close net/bluetooth/hci_core.c:510 [inline] hci_dev_close+0xe4/0x200 net/bluetooth/hci_core.c:535 hci_sock_ioctl+0x594/0x874 net/bluetooth/hci_sock.c:1074 sock_do_ioctl+0x100/0x258 net/socket.c:1201 sock_ioctl+0x238/0x824 net/socket.c:1320 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Allocated by task 4521: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:53 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0xa0/0xb8 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc+0xec/0x178 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] sk_prot_alloc+0xc4/0x1ec net/core/sock.c:2052 sk_alloc+0x44/0x390 net/core/sock.c:2108 bt_sock_alloc+0x4c/0x140 net/bluetooth/af_bluetooth.c:148 hci_sock_create+0xa8/0x190 net/bluetooth/hci_sock.c:2142 bt_sock_create+0x14c/0x24c net/bluetooth/af_bluetooth.c:132 __sock_create+0x4b0/0x8b4 net/socket.c:1549 sock_create net/socket.c:1605 [inline] __sys_socket_create net/socket.c:1642 [inline] __sys_socket+0xc0/0x1ac net/socket.c:1670 __do_sys_socket net/socket.c:1683 [inline] __se_sys_socket net/socket.c:1681 [inline] __arm64_sys_socket+0x7c/0x94 net/socket.c:1681 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Freed by task 5701: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:53 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516 ____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:237 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:245 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1729 [inline] slab_free_freelist_hook+0x16c/0x1e8 mm/slub.c:1755 slab_free mm/slub.c:3687 [inline] __kmem_cache_free+0xbc/0x218 mm/slub.c:3700 kfree+0xd0/0x1a8 mm/slab_common.c:988 sk_prot_free net/core/sock.c:2091 [inline] __sk_destruct+0x4dc/0x76c net/core/sock.c:2177 sk_destruct net/core/sock.c:2192 [inline] __sk_free+0x320/0x430 net/core/sock.c:2203 sk_free+0x60/0xc4 net/core/sock.c:2214 sock_put include/net/sock.h:2085 [inline] mgmt_pending_free+0x88/0x114 net/bluetooth/mgmt_util.c:307 mgmt_pending_remove+0xec/0x104 net/bluetooth/mgmt_util.c:315 cmd_complete_rsp+0xfc/0x1ac net/bluetooth/mgmt.c:-1 mgmt_pending_foreach+0xd4/0x148 net/bluetooth/mgmt_util.c:259 mgmt_index_removed+0x134/0x2e8 net/bluetooth/mgmt.c:9474 hci_sock_bind+0x890/0xcc0 net/bluetooth/hci_sock.c:1253 __sys_bind+0x1f8/0x2a4 net/socket.c:1810 __do_sys_bind net/socket.c:1821 [inline] __se_sys_bind net/socket.c:1819 [inline] __arm64_sys_bind+0x7c/0x94 net/socket.c:1819 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff0000d4a6e000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1408 bytes inside of 2048-byte region [ffff0000d4a6e000, ffff0000d4a6e800) The buggy address belongs to the physical page: page:000000004724d5d7 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x114a68 head:000000004724d5d7 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc000312d800 dead000000000002 ffff0000c0002900 raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d4a6e480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d4a6e500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d4a6e580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d4a6e600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d4a6e680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Unable to handle kernel paging request at virtual address e0b9a094a00002c8 KASAN: maybe wild-memory-access in range [0x05d104a500001640-0x05d104a500001647] 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 CM = 0, WnR = 0 [e0b9a094a00002c8] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 5699 Comm: syz.4.342 Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 pstate: 02400005 (nzcv daif +PAN -UAO +TCO -DIT -SSBS BTYPE=--) pc : __list_del_entry_valid+0x78/0x158 lib/list_debug.c:59 lr : __list_del_entry_valid+0x4c/0x158 lib/list_debug.c:47 sp : ffff800021c175b0 x29: ffff800021c175b0 x28: ffff0000d0e60000 x27: ffff0000d4341378 x26: dfff800000000000 x25: ffff0000d43400a8 x24: 0000000000000000 x23: ffff0000f1d07c00 x22: dfff800000000000 x21: 05d104a500001645 x20: ffff0000d607fc00 x19: ffff0000f1d07c00 x18: ffff800011b7bf60 x17: 0000000000000000 x16: ffff800008042fdc x15: ffff8000089eda3c x14: 0000000000000001 x13: 1ffff00002b4a6f2 x12: 0000000000ff0100 x11: ff00800010cd0b14 x10: 0000000000000000 x9 : ffff80001c465a90 x8 : 00ba2094a00002c8 x7 : ffff80000805977c x6 : ffff80000805998c x5 : ffff0000f61ed098 x4 : ffff800021c17290 x3 : ffff80000a8d890c x2 : dead000000000122 x1 : 0000000000000008 x0 : 0000000000000000 Call trace: __list_del_entry_valid+0x78/0x158 lib/list_debug.c:59 __list_del_entry include/linux/list.h:134 [inline] list_del include/linux/list.h:148 [inline] mgmt_pending_remove+0x30/0x104 net/bluetooth/mgmt_util.c:314 cmd_complete_rsp+0xfc/0x1ac net/bluetooth/mgmt.c:-1 mgmt_pending_foreach+0xd4/0x148 net/bluetooth/mgmt_util.c:259 __mgmt_power_off+0x13c/0x32c net/bluetooth/mgmt.c:9549 hci_dev_close_sync+0x478/0xec8 net/bluetooth/hci_sync.c:5242 hci_dev_do_close net/bluetooth/hci_core.c:510 [inline] hci_dev_close+0xe4/0x200 net/bluetooth/hci_core.c:535 hci_sock_ioctl+0x594/0x874 net/bluetooth/hci_sock.c:1074 sock_do_ioctl+0x100/0x258 net/socket.c:1201 sock_ioctl+0x238/0x824 net/socket.c:1320 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Code: 91008902 eb0202bf 54000520 d343fea8 (38766908) ---[ end trace 0000000000000000 ]---