kobject_add_internal failed for hci1:201 with -EEXIST, don't try to register things with the same name in the same directory. Bluetooth: hci1: failed to register connection device ================================================================== BUG: KASAN: use-after-free in l2cap_sock_new_connection_cb+0x1d4/0x284 net/bluetooth/l2cap_sock.c:1517 Read of size 8 at addr ffff0000d01fe540 by task kworker/u5:8/4338 CPU: 0 PID: 4338 Comm: kworker/u5:8 Not tainted 6.1.147-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: hci1 hci_rx_work Call trace: dump_backtrace+0x1c8/0x1f4 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+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x88/0x200 mm/kasan/report.c:316 print_report+0x50/0x68 mm/kasan/report.c:418 kasan_report+0xa8/0x100 mm/kasan/report.c:522 __asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351 l2cap_sock_new_connection_cb+0x1d4/0x284 net/bluetooth/l2cap_sock.c:1517 l2cap_connect_cfm+0x2d4/0xd64 net/bluetooth/l2cap_core.c:8348 hci_connect_cfm+0x98/0x130 include/net/bluetooth/hci_core.h:1787 le_conn_complete_evt+0xaa4/0xf8c net/bluetooth/hci_event.c:5835 hci_le_conn_complete_evt+0x114/0x3f8 net/bluetooth/hci_event.c:5861 hci_le_meta_evt+0x2c0/0x4a4 net/bluetooth/hci_event.c:7031 hci_event_func net/bluetooth/hci_event.c:7342 [inline] hci_event_packet+0x6ac/0xf08 net/bluetooth/hci_event.c:7397 hci_rx_work+0x324/0xaa0 net/bluetooth/hci_core.c:4083 process_one_work+0x7f4/0x13a8 kernel/workqueue.c:2292 worker_thread+0x8c8/0xfbc kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:849 Allocated by task 4338: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x28/0x34 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa0/0xb8 mm/kasan/common.c:383 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/0x1f0 net/core/sock.c:2050 sk_alloc+0x44/0x390 net/core/sock.c:2103 bt_sock_alloc+0x4c/0x140 net/bluetooth/af_bluetooth.c:148 l2cap_sock_alloc net/bluetooth/l2cap_sock.c:1914 [inline] l2cap_sock_new_connection_cb+0xe4/0x284 net/bluetooth/l2cap_sock.c:1502 l2cap_connect_cfm+0x2d4/0xd64 net/bluetooth/l2cap_core.c:8348 hci_connect_cfm+0x98/0x130 include/net/bluetooth/hci_core.h:1787 le_conn_complete_evt+0xaa4/0xf8c net/bluetooth/hci_event.c:5835 hci_le_conn_complete_evt+0x114/0x3f8 net/bluetooth/hci_event.c:5861 hci_le_meta_evt+0x2c0/0x4a4 net/bluetooth/hci_event.c:7031 hci_event_func net/bluetooth/hci_event.c:7342 [inline] hci_event_packet+0x6ac/0xf08 net/bluetooth/hci_event.c:7397 hci_rx_work+0x324/0xaa0 net/bluetooth/hci_core.c:4083 process_one_work+0x7f4/0x13a8 kernel/workqueue.c:2292 worker_thread+0x8c8/0xfbc kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:849 Freed by task 4675: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x3c/0x60 mm/kasan/generic.c:516 ____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x16c/0x1ec mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0xc0/0x224 mm/slub.c:3674 kfree+0xd0/0x1ac mm/slab_common.c:988 sk_prot_free net/core/sock.c:2086 [inline] __sk_destruct+0x4bc/0x760 net/core/sock.c:2172 sk_destruct net/core/sock.c:2187 [inline] __sk_free+0x320/0x430 net/core/sock.c:2198 sk_free+0x60/0xc8 net/core/sock.c:2209 sock_put include/net/sock.h:2036 [inline] l2cap_sock_kill+0x12c/0x234 net/bluetooth/l2cap_sock.c:1284 l2cap_sock_cleanup_listen+0xf4/0x28c net/bluetooth/l2cap_sock.c:1482 l2cap_sock_release+0x5c/0x1ac net/bluetooth/l2cap_sock.c:1445 __sock_release net/socket.c:654 [inline] sock_close+0xb4/0x1f8 net/socket.c:1400 __fput+0x1bc/0x7c0 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x1ec/0x270 kernel/task_work.c:203 get_signal+0x1120/0x1310 kernel/signal.c:2648 do_signal arch/arm64/kernel/signal.c:1081 [inline] do_notify_resume+0x340/0x2b0c arch/arm64/kernel/signal.c:1134 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x138 arch/arm64/kernel/entry-common.c:638 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 ffff0000d01fe000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1344 bytes inside of 2048-byte region [ffff0000d01fe000, ffff0000d01fe800) The buggy address belongs to the physical page: page:0000000049236102 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1101f8 head:0000000049236102 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc0003d7cc00 dead000000000002 ffff0000c0002900 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d01fe400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d01fe480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d01fe500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d01fe580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d01fe600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 4338 at lib/refcount.c:25 refcount_warn_saturate+0x134/0x1f8 lib/refcount.c:25 Modules linked in: CPU: 0 PID: 4338 Comm: kworker/u5:8 Tainted: G B 6.1.147-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: hci1 hci_rx_work pstate: 62400005 (nZCv daif +PAN -UAO +TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0x134/0x1f8 lib/refcount.c:25 lr : refcount_warn_saturate+0x134/0x1f8 lib/refcount.c:25 sp : ffff800020ee7590 x29: ffff800020ee7590 x28: dfff800000000000 x27: 0000000000000000 x26: 1fffe0001a03fa07 x25: 1fffe0001b6d1200 x24: dfff800000000000 x23: 0000000000000000 x22: ffff0000d01fd018 x21: ffff0000d01fd03f x20: ffff0000d01fd018 x19: ffff800017a78000 x18: ffff800011aabce0 x17: 1fffe00033ed9d7e x16: ffff800008042c60 x15: 0000000040000000 x14: 0000000000000002 x13: 0000000000ff0100 x12: 0000000000ff0100 x11: ff00800008047eec x10: 0000000040000002 x9 : 700a4acee4ffd100 x8 : 700a4acee4ffd100 x7 : 0000000000000004 x6 : ffff800008251ec8 x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000 x2 : ffff800020ee7120 x1 : 0000000000000000 x0 : ffff800008251f5c Call trace: refcount_warn_saturate+0x134/0x1f8 lib/refcount.c:25 __refcount_add include/linux/refcount.h:-1 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] kref_get include/linux/kref.h:45 [inline] l2cap_chan_hold net/bluetooth/l2cap_core.c:522 [inline] __l2cap_chan_add+0x4cc/0x7c8 net/bluetooth/l2cap_core.c:652 l2cap_connect_cfm+0x380/0xd64 net/bluetooth/l2cap_core.c:8355 hci_connect_cfm+0x98/0x130 include/net/bluetooth/hci_core.h:1787 le_conn_complete_evt+0xaa4/0xf8c net/bluetooth/hci_event.c:5835 hci_le_conn_complete_evt+0x114/0x3f8 net/bluetooth/hci_event.c:5861 hci_le_meta_evt+0x2c0/0x4a4 net/bluetooth/hci_event.c:7031 hci_event_func net/bluetooth/hci_event.c:7342 [inline] hci_event_packet+0x6ac/0xf08 net/bluetooth/hci_event.c:7397 hci_rx_work+0x324/0xaa0 net/bluetooth/hci_core.c:4083 process_one_work+0x7f4/0x13a8 kernel/workqueue.c:2292 worker_thread+0x8c8/0xfbc kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:849 irq event stamp: 1775 hardirqs last enabled at (1775): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1367 [inline] hardirqs last enabled at (1775): [] finish_lock_switch+0xb0/0x1c4 kernel/sched/core.c:5003 hardirqs last disabled at (1774): [] __schedule+0x298/0x1b18 kernel/sched/core.c:6459 softirqs last enabled at (1764): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (1764): [] release_sock+0x16c/0x1bc net/core/sock.c:3514 softirqs last disabled at (1758): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (1758): [] release_sock+0x34/0x1bc net/core/sock.c:3501 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ ODEBUG: assert_init not available (active state 0) object type: timer_list hint: l2cap_chan_timeout+0x0/0x280 net/bluetooth/l2cap_core.c:-1 WARNING: CPU: 0 PID: 4338 at lib/debugobjects.c:518 debug_print_object+0x148/0x1d4 lib/debugobjects.c:515 Modules linked in: CPU: 0 PID: 4338 Comm: kworker/u5:8 Tainted: G B W 6.1.147-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: hci1 hci_rx_work pstate: 624000c5 (nZCv daIF +PAN -UAO +TCO -DIT -SSBS BTYPE=--) pc : debug_print_object+0x148/0x1d4 lib/debugobjects.c:515 lr : debug_print_object+0x148/0x1d4 lib/debugobjects.c:515 sp : ffff800020ee72b0 x29: ffff800020ee72b0 x28: 1fffe0001a03fa06 x27: 0000000000000000 x26: ffff8000150b0000 x25: ffff8000083adff8 x24: dfff800000000000 x23: 0000000000000000 x22: ffff800010bc55fc x21: ffff800011f9a500 x20: ffff800011acad00 x19: ffff800011f9a040 x18: ffff800011aabce0 x17: 203a657079742074 x16: ffff8000082e7bb0 x15: 0000000000000002 x14: 00000000ffffffff x13: 0000000000000001 x12: 0000000000100000 x11: 000000000006043a x10: ffff80003226d000 x9 : 700a4acee4ffd100 x8 : 700a4acee4ffd100 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff800020ee6d38 x4 : ffff800015194800 x3 : ffff80000852e34c x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000000 Call trace: debug_print_object+0x148/0x1d4 lib/debugobjects.c:515 debug_object_assert_init+0x250/0x2c8 lib/debugobjects.c:900 debug_timer_assert_init kernel/time/timer.c:792 [inline] debug_assert_init kernel/time/timer.c:837 [inline] timer_delete+0x48/0x1e8 kernel/time/timer.c:1277 del_timer include/linux/timer.h:211 [inline] try_to_grab_pending+0xa4/0x65c kernel/workqueue.c:1278 __cancel_work+0x44/0x224 kernel/workqueue.c:3251 cancel_delayed_work+0x24/0x38 kernel/workqueue.c:3289 l2cap_clear_timer include/net/bluetooth/l2cap.h:892 [inline] l2cap_chan_ready net/bluetooth/l2cap_core.c:1398 [inline] l2cap_le_start+0x768/0x1010 net/bluetooth/l2cap_core.c:1522 l2cap_conn_ready net/bluetooth/l2cap_core.c:1792 [inline] l2cap_connect_cfm+0x578/0xd64 net/bluetooth/l2cap_core.c:8365 hci_connect_cfm+0x98/0x130 include/net/bluetooth/hci_core.h:1787 le_conn_complete_evt+0xaa4/0xf8c net/bluetooth/hci_event.c:5835 hci_le_conn_complete_evt+0x114/0x3f8 net/bluetooth/hci_event.c:5861 hci_le_meta_evt+0x2c0/0x4a4 net/bluetooth/hci_event.c:7031 hci_event_func net/bluetooth/hci_event.c:7342 [inline] hci_event_packet+0x6ac/0xf08 net/bluetooth/hci_event.c:7397 hci_rx_work+0x324/0xaa0 net/bluetooth/hci_core.c:4083 process_one_work+0x7f4/0x13a8 kernel/workqueue.c:2292 worker_thread+0x8c8/0xfbc kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:849 irq event stamp: 1775 hardirqs last enabled at (1775): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1367 [inline] hardirqs last enabled at (1775): [] finish_lock_switch+0xb0/0x1c4 kernel/sched/core.c:5003 hardirqs last disabled at (1774): [] __schedule+0x298/0x1b18 kernel/sched/core.c:6459 softirqs last enabled at (1764): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (1764): [] release_sock+0x16c/0x1bc net/core/sock.c:3514 softirqs last disabled at (1758): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (1758): [] release_sock+0x34/0x1bc net/core/sock.c:3501 ---[ end trace 0000000000000000 ]--- Unable to handle kernel paging request at virtual address dfff800000000013 KASAN: null-ptr-deref in range [0x0000000000000098-0x000000000000009f] Mem abort info: ESR = 0x0000000096000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 [dfff800000000013] address between user and kernel address ranges Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 4338 Comm: kworker/u5:8 Tainted: G B W 6.1.147-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: hci1 hci_rx_work pstate: 62400005 (nZCv daif +PAN -UAO +TCO -DIT -SSBS BTYPE=--) pc : debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline] pc : do_raw_spin_lock+0x80/0x2ec kernel/locking/spinlock_debug.c:114 lr : __raw_spin_lock_bh include/linux/spinlock_api_smp.h:127 [inline] lr : _raw_spin_lock_bh+0x5c/0x6c kernel/locking/spinlock.c:178 sp : ffff800020ee7340 x29: ffff800020ee73d0 x28: 1fffe0001a03fa06 x27: ffff0000d01fd030 x26: dfff800000000000 x25: 1fffe0001a03fa04 x24: 1fffe0001a03fa00 x23: dfff800000000000 x22: 1ffff000041dce6c x21: 0000000000000000 x20: 000000000000009c x19: 0000000000000098 x18: ffff800011aabce0 x17: 203a657079742074 x16: ffff8000082e76dc x15: 0000000000000002 x14: 00000000ffffffff x13: 0000000000000001 x12: 0000000000100000 x11: ffff800020ee7360 x10: ffff8000149d2b82 x9 : f3f3f304f1f1f1f1 x8 : 0000000000000013 x7 : 0000000000000000 x6 : ffff80000fcc744c x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 0000000000000000 x1 : ffff800011f99a20 x0 : 0000000000000098 Call trace: debug_spin_lock_before kernel/locking/spinlock_debug.c:-1 [inline] do_raw_spin_lock+0x80/0x2ec kernel/locking/spinlock_debug.c:114 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:127 [inline] _raw_spin_lock_bh+0x5c/0x6c kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:356 [inline] lock_sock_nested+0x88/0x130 net/core/sock.c:3491 lock_sock include/net/sock.h:1756 [inline] l2cap_sock_ready_cb+0x4c/0x130 net/bluetooth/l2cap_sock.c:1694 l2cap_chan_ready net/bluetooth/l2cap_core.c:1410 [inline] l2cap_le_start+0x8f0/0x1010 net/bluetooth/l2cap_core.c:1522 l2cap_conn_ready net/bluetooth/l2cap_core.c:1792 [inline] l2cap_connect_cfm+0x578/0xd64 net/bluetooth/l2cap_core.c:8365 hci_connect_cfm+0x98/0x130 include/net/bluetooth/hci_core.h:1787 le_conn_complete_evt+0xaa4/0xf8c net/bluetooth/hci_event.c:5835 hci_le_conn_complete_evt+0x114/0x3f8 net/bluetooth/hci_event.c:5861 hci_le_meta_evt+0x2c0/0x4a4 net/bluetooth/hci_event.c:7031 hci_event_func net/bluetooth/hci_event.c:7342 [inline] hci_event_packet+0x6ac/0xf08 net/bluetooth/hci_event.c:7397 hci_rx_work+0x324/0xaa0 net/bluetooth/hci_core.c:4083 process_one_work+0x7f4/0x13a8 kernel/workqueue.c:2292 worker_thread+0x8c8/0xfbc kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:849 Code: f2de6089 aa0003f3 f2fe7e69 f8376ac9 (38f76908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: f2de6089 movk x9, #0xf304, lsl #32 4: aa0003f3 mov x19, x0 8: f2fe7e69 movk x9, #0xf3f3, lsl #48 c: f8376ac9 str x9, [x22, x23] * 10: 38f76908 ldrsb w8, [x8, x23] <-- trapping instruction