kobject_add_internal failed for hci2:201 with -EEXIST, don't try to register things with the same name in the same directory. Bluetooth: hci2: failed to register connection device ================================================================== BUG: KASAN: use-after-free in l2cap_sock_ready_cb+0xca/0x120 net/bluetooth/l2cap_sock.c:1662 Read of size 8 at addr ffff88802c30d4c8 by task kworker/u5:3/4196 CPU: 0 PID: 4196 Comm: kworker/u5:3 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Workqueue: hci2 hci_rx_work Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 l2cap_sock_ready_cb+0xca/0x120 net/bluetooth/l2cap_sock.c:1662 l2cap_chan_ready net/bluetooth/l2cap_core.c:1387 [inline] l2cap_le_start+0x73b/0x1710 net/bluetooth/l2cap_core.c:1499 l2cap_conn_ready net/bluetooth/l2cap_core.c:1769 [inline] l2cap_connect_cfm+0x6d7/0x10f0 net/bluetooth/l2cap_core.c:8321 hci_connect_cfm include/net/bluetooth/hci_core.h:1505 [inline] le_conn_complete_evt+0xd42/0x15c0 net/bluetooth/hci_event.c:5456 hci_le_conn_complete_evt net/bluetooth/hci_event.c:5481 [inline] hci_le_meta_evt+0x285/0x3c90 net/bluetooth/hci_event.c:6203 hci_event_packet+0xe48/0x1370 net/bluetooth/hci_event.c:6552 hci_rx_work+0x255/0xa10 net/bluetooth/hci_core.c:5160 process_one_work+0x85f/0x1010 kernel/workqueue.c:2310 worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 5409: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:612 [inline] sk_prot_alloc+0xe7/0x210 net/core/sock.c:1866 sk_alloc+0x2f/0x310 net/core/sock.c:1922 l2cap_sock_alloc+0x33/0x200 net/bluetooth/l2cap_sock.c:1867 l2cap_sock_create+0x118/0x1d0 net/bluetooth/l2cap_sock.c:1915 bt_sock_create+0x155/0x220 net/bluetooth/af_bluetooth.c:130 __sock_create+0x47b/0x900 net/socket.c:1495 sock_create net/socket.c:1551 [inline] __sys_socket+0xe2/0x170 net/socket.c:1593 __do_sys_socket net/socket.c:1602 [inline] __se_sys_socket net/socket.c:1600 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1600 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 5412: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xea/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 sk_prot_free net/core/sock.c:1905 [inline] __sk_destruct+0x578/0x840 net/core/sock.c:1991 l2cap_sock_release+0x169/0x1e0 net/bluetooth/l2cap_sock.c:1432 __sock_release net/socket.c:651 [inline] sock_close+0xd5/0x240 net/socket.c:1345 __fput+0x234/0x930 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:3011 [inline] call_rcu+0x189/0x950 kernel/rcu/tree.c:3091 netlink_release+0x1369/0x17b0 net/netlink/af_netlink.c:799 __sock_release net/socket.c:651 [inline] sock_close+0xd5/0x240 net/socket.c:1345 __fput+0x234/0x930 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88802c30d000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1224 bytes inside of 2048-byte region [ffff88802c30d000, ffff88802c30d800) The buggy address belongs to the page: page:ffffea0000b0c200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2c308 head:ffffea0000b0c200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888016c42000 raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 12555751741, free_ts 0 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1bbd/0x1ca0 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5487 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x80a/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] kmem_cache_alloc_trace+0x1a5/0x2a0 mm/slub.c:3250 kmalloc include/linux/slab.h:607 [inline] kzalloc include/linux/slab.h:738 [inline] ext4_fill_super+0x36b/0x95a0 fs/ext4/super.c:3968 mount_bdev+0x287/0x3c0 fs/super.c:1400 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x24a/0xa40 fs/namespace.c:3034 init_mount+0xda/0x130 fs/init.c:25 do_mount_root+0x97/0x400 init/do_mounts.c:376 mount_block_root+0x1a5/0x540 init/do_mounts.c:415 prepare_namespace+0x1ef/0x230 init/do_mounts.c:645 kernel_init_freeable+0x42a/0x570 init/main.c:1642 page_owner free stack trace missing Memory state around the buggy address: ffff88802c30d380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802c30d400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802c30d480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802c30d500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802c30d580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================