kobject_add_internal failed for hci3:201 with -EEXIST, don't try to register things with the same name in the same directory. Bluetooth: hci3: failed to register connection device ================================================================== BUG: KASAN: use-after-free in l2cap_sock_new_connection_cb+0x224/0x304 net/bluetooth/l2cap_sock.c:1491 Read of size 8 at addr ffff0000d72fd548 by task kworker/u5:2/4049 CPU: 0 PID: 4049 Comm: kworker/u5:2 Not tainted 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: hci3 hci_rx_work Call trace: dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x78/0x30c mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xec/0x15c mm/kasan/report.c:451 __asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309 l2cap_sock_new_connection_cb+0x224/0x304 net/bluetooth/l2cap_sock.c:1491 l2cap_connect_cfm+0x2d4/0xd64 net/bluetooth/l2cap_core.c:8287 hci_connect_cfm include/net/bluetooth/hci_core.h:1505 [inline] le_conn_complete_evt+0xa7c/0x11bc net/bluetooth/hci_event.c:5429 hci_le_conn_complete_evt net/bluetooth/hci_event.c:5454 [inline] hci_le_meta_evt+0x85c/0x3010 net/bluetooth/hci_event.c:6176 hci_event_packet+0xd10/0x11bc net/bluetooth/hci_event.c:6525 hci_rx_work+0x1cc/0x880 net/bluetooth/hci_core.c:5160 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:855 Allocated by task 4049: 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+0xb0/0xf0 mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc+0x298/0x44c mm/slub.c:4407 kmalloc include/linux/slab.h:609 [inline] sk_prot_alloc+0xc4/0x1f0 net/core/sock.c:1864 sk_alloc+0x40/0x388 net/core/sock.c:1917 l2cap_sock_alloc net/bluetooth/l2cap_sock.c:1861 [inline] l2cap_sock_new_connection_cb+0xe0/0x304 net/bluetooth/l2cap_sock.c:1476 l2cap_connect_cfm+0x2d4/0xd64 net/bluetooth/l2cap_core.c:8287 hci_connect_cfm include/net/bluetooth/hci_core.h:1505 [inline] le_conn_complete_evt+0xa7c/0x11bc net/bluetooth/hci_event.c:5429 hci_le_conn_complete_evt net/bluetooth/hci_event.c:5454 [inline] hci_le_meta_evt+0x85c/0x3010 net/bluetooth/hci_event.c:6176 hci_event_packet+0xd10/0x11bc net/bluetooth/hci_event.c:6525 hci_rx_work+0x1cc/0x880 net/bluetooth/hci_core.c:5160 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:855 Freed by task 4733: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x84 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360 ____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0x128/0x1e8 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0x170/0x40c mm/slub.c:4559 sk_prot_free net/core/sock.c:1900 [inline] __sk_destruct+0x41c/0x604 net/core/sock.c:1986 sk_destruct net/core/sock.c:2001 [inline] __sk_free+0x320/0x430 net/core/sock.c:2012 sk_free+0x68/0xdc net/core/sock.c:2023 sock_put include/net/sock.h:1939 [inline] l2cap_sock_kill+0x114/0x228 net/bluetooth/l2cap_sock.c:1258 l2cap_sock_cleanup_listen+0xf4/0x28c net/bluetooth/l2cap_sock.c:1456 l2cap_sock_release+0x5c/0x1ac net/bluetooth/l2cap_sock.c:1419 __sock_release net/socket.c:649 [inline] sock_close+0xb4/0x1f8 net/socket.c:1336 __fput+0x1c0/0x7f8 fs/file_table.c:311 ____fput+0x20/0x30 fs/file_table.c:339 task_work_run+0x12c/0x1e0 kernel/task_work.c:188 get_signal+0x1240/0x1340 kernel/signal.c:2672 do_signal arch/arm64/kernel/signal.c:893 [inline] do_notify_resume+0x35c/0x3128 arch/arm64/kernel/signal.c:946 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xf0/0x1e0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 The buggy address belongs to the object at ffff0000d72fd000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1352 bytes inside of 2048-byte region [ffff0000d72fd000, ffff0000d72fd800) The buggy address belongs to the page: page:000000003a688b9a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1172f8 head:000000003a688b9a order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc000305de00 0000000300000003 ffff0000c0002900 raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d72fd400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d72fd480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d72fd500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d72fd580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d72fd600: 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: 4049 at lib/refcount.c:25 refcount_warn_saturate+0x134/0x1f8 lib/refcount.c:25 Modules linked in: CPU: 0 PID: 4049 Comm: kworker/u5:2 Tainted: G B 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: hci3 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 : ffff80001f637480 x29: ffff80001f637480 x28: dfff800000000000 x27: 0000000000000000 x26: 1fffe000182ef607 x25: 1fffe0001a13d800 x24: dfff800000000000 x23: ffff0000ee828021 x22: 00000000ffffffff x21: ffff0000c177b03f x20: ffff0000c177b018 x19: ffff8000165b2000 x18: 0000000000000001 x17: 0000000000000000 x16: ffff8000083020fc x15: 00000000ffffffff x14: 0000000000ff0100 x13: 0000000000000001 x12: 0000000000ff0100 x11: 0000000000000000 x10: 0000000000000000 x9 : bc4e8cd2c3c67100 x8 : bc4e8cd2c3c67100 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80001f636d78 x4 : ffff80001424f400 x3 : ffff80000830220c x2 : 0000000000000001 x1 : 0000000100000000 x0 : 000000000000002a 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+0xa4/0x13c net/bluetooth/l2cap_core.c:519 __l2cap_chan_add+0x278/0x6e4 net/bluetooth/l2cap_core.c:628 l2cap_connect_cfm+0x380/0xd64 net/bluetooth/l2cap_core.c:8294 hci_connect_cfm include/net/bluetooth/hci_core.h:1505 [inline] le_conn_complete_evt+0xa7c/0x11bc net/bluetooth/hci_event.c:5429 hci_le_conn_complete_evt net/bluetooth/hci_event.c:5454 [inline] hci_le_meta_evt+0x85c/0x3010 net/bluetooth/hci_event.c:6176 hci_event_packet+0xd10/0x11bc net/bluetooth/hci_event.c:6525 hci_rx_work+0x1cc/0x880 net/bluetooth/hci_core.c:5160 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:855 irq event stamp: 4532 hardirqs last enabled at (4531): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1338 [inline] hardirqs last enabled at (4531): [] finish_lock_switch+0xb0/0x1c4 kernel/sched/core.c:4784 hardirqs last disabled at (4532): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (4532): [] _raw_spin_lock_irqsave+0xfc/0x14c kernel/locking/spinlock.c:162 softirqs last enabled at (4528): [] spin_unlock_bh include/linux/spinlock.h:408 [inline] softirqs last enabled at (4528): [] release_sock+0x1d0/0x258 net/core/sock.c:3277 softirqs last disabled at (4524): [] spin_lock_bh include/linux/spinlock.h:368 [inline] softirqs last disabled at (4524): [] release_sock+0x34/0x258 net/core/sock.c:3264 ---[ end trace f0ced86f0acff3fd ]--- ------------[ cut here ]------------ ODEBUG: assert_init not available (active state 0) object type: timer_list hint: arch_local_irq_disable arch/arm64/include/asm/irqflags.h:-1 [inline] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: arch_local_irq_save arch/arm64/include/asm/irqflags.h:112 [inline] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x90 kernel/workqueue.c:1638 WARNING: CPU: 1 PID: 4049 at lib/debugobjects.c:521 debug_print_object+0x148/0x1d4 lib/debugobjects.c:518 Modules linked in: CPU: 1 PID: 4049 Comm: kworker/u5:2 Tainted: G B W 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: hci3 hci_rx_work pstate: 624000c5 (nZCv daIF +PAN -UAO +TCO -DIT -SSBS BTYPE=--) pc : debug_print_object+0x148/0x1d4 lib/debugobjects.c:518 lr : debug_print_object+0x148/0x1d4 lib/debugobjects.c:518 sp : ffff80001f6371e0 x29: ffff80001f6371e0 x28: 1fffe000182ef606 x27: 0000000000000000 x26: ffff800014170000 x25: ffff80000837e25c x24: dfff800000000000 x23: 0000000000000000 x22: ffff8000081e85f0 x21: ffff8000117c8f60 x20: ffff800011332ce0 x19: ffff8000117c8aa0 x18: 0000000000000001 x17: 0000000000000000 x16: ffff8000111bc798 x15: 00000000ffffffff x14: 0000000000ff0100 x13: 0000000000000001 x12: 0000000000ff0100 x11: 0000000000000000 x10: 0000000000000000 x9 : bc4e8cd2c3c67100 x8 : bc4e8cd2c3c67100 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80001f636ad8 x4 : ffff80001424f400 x3 : ffff80000850433c x2 : 0000000000000001 x1 : 0000000100000000 x0 : 000000000000006f Call trace: debug_print_object+0x148/0x1d4 lib/debugobjects.c:518 debug_object_assert_init+0x24c/0x2c4 lib/debugobjects.c:894 debug_timer_assert_init kernel/time/timer.c:739 [inline] debug_assert_init kernel/time/timer.c:784 [inline] del_timer+0x48/0x1e4 kernel/time/timer.c:1224 try_to_grab_pending+0xa4/0x66c kernel/workqueue.c:1283 __cancel_work+0x44/0x224 kernel/workqueue.c:3269 cancel_delayed_work+0x24/0x38 kernel/workqueue.c:3307 l2cap_clear_timer include/net/bluetooth/l2cap.h:884 [inline] l2cap_chan_ready net/bluetooth/l2cap_core.c:1374 [inline] l2cap_le_start+0x3dc/0x131c net/bluetooth/l2cap_core.c:1498 l2cap_conn_ready net/bluetooth/l2cap_core.c:1768 [inline] l2cap_connect_cfm+0x578/0xd64 net/bluetooth/l2cap_core.c:8304 hci_connect_cfm include/net/bluetooth/hci_core.h:1505 [inline] le_conn_complete_evt+0xa7c/0x11bc net/bluetooth/hci_event.c:5429 hci_le_conn_complete_evt net/bluetooth/hci_event.c:5454 [inline] hci_le_meta_evt+0x85c/0x3010 net/bluetooth/hci_event.c:6176 hci_event_packet+0xd10/0x11bc net/bluetooth/hci_event.c:6525 hci_rx_work+0x1cc/0x880 net/bluetooth/hci_core.c:5160 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:855 irq event stamp: 4532 hardirqs last enabled at (4531): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1338 [inline] hardirqs last enabled at (4531): [] finish_lock_switch+0xb0/0x1c4 kernel/sched/core.c:4784 hardirqs last disabled at (4532): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (4532): [] _raw_spin_lock_irqsave+0xfc/0x14c kernel/locking/spinlock.c:162 softirqs last enabled at (4528): [] spin_unlock_bh include/linux/spinlock.h:408 [inline] softirqs last enabled at (4528): [] release_sock+0x1d0/0x258 net/core/sock.c:3277 softirqs last disabled at (4524): [] spin_lock_bh include/linux/spinlock.h:368 [inline] softirqs last disabled at (4524): [] release_sock+0x34/0x258 net/core/sock.c:3264 ---[ end trace f0ced86f0acff3fe ]--- Unable to handle kernel paging request at virtual address dfff800000000011 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 [dfff800000000011] address between user and kernel address ranges Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 4049 Comm: kworker/u5:2 Tainted: G B W 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: hci3 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/0x2f0 kernel/locking/spinlock_debug.c:114 lr : __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline] lr : _raw_spin_lock_bh+0x11c/0x1b4 kernel/locking/spinlock.c:178 sp : ffff80001f637240 x29: ffff80001f6372d0 x28: 1fffe000182ef606 x27: dfff800000000000 x26: ffff700003ec6e84 x25: 1fffe000182ef600 x24: dfff800000000000 x23: dfff800000000000 x22: 1ffff00003ec6e4c x21: ffff8000167a8000 x20: 000000000000008c x19: 0000000000000088 x18: 0000000000000001 x17: 0000000000000000 x16: ffff8000082d5f6c x15: 00000000ffffffff x14: 0000000000ff0100 x13: 0000000000000001 x12: 0000000000ff0100 x11: ffff80001f637260 x10: ffff800013a7cc50 x9 : f3f3f304f1f1f1f1 x8 : 0000000000000011 x7 : 0000000000000000 x6 : ffff80000f69f014 x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 0000000000000000 x1 : ffff8000117c8460 x0 : 0000000000000088 Call trace: debug_spin_lock_before kernel/locking/spinlock_debug.c:-1 [inline] do_raw_spin_lock+0x80/0x2f0 kernel/locking/spinlock_debug.c:114 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline] _raw_spin_lock_bh+0x11c/0x1b4 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:368 [inline] lock_sock_nested+0xf4/0x1d4 net/core/sock.c:3254 lock_sock include/net/sock.h:1694 [inline] l2cap_sock_ready_cb+0x4c/0x130 net/bluetooth/l2cap_sock.c:1649 l2cap_chan_ready net/bluetooth/l2cap_core.c:1386 [inline] l2cap_le_start+0x56c/0x131c net/bluetooth/l2cap_core.c:1498 l2cap_conn_ready net/bluetooth/l2cap_core.c:1768 [inline] l2cap_connect_cfm+0x578/0xd64 net/bluetooth/l2cap_core.c:8304 hci_connect_cfm include/net/bluetooth/hci_core.h:1505 [inline] le_conn_complete_evt+0xa7c/0x11bc net/bluetooth/hci_event.c:5429 hci_le_conn_complete_evt net/bluetooth/hci_event.c:5454 [inline] hci_le_meta_evt+0x85c/0x3010 net/bluetooth/hci_event.c:6176 hci_event_packet+0xd10/0x11bc net/bluetooth/hci_event.c:6525 hci_rx_work+0x1cc/0x880 net/bluetooth/hci_core.c:5160 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:855 Code: f2de6089 aa0003f3 f2fe7e69 f8376ac9 (38f76908) ---[ end trace f0ced86f0acff3ff ]--- ---------------- 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