========================= WARNING: held lock freed! syzkaller #0 Not tainted ------------------------- syz.4.207/7686 is freeing memory ffff0000f50cb000-ffff0000f50cb7ff, with a lock still held there! ffff0000f50cb260 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1679 [inline] ffff0000f50cb260 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: bt_accept_dequeue+0xe0/0x524 net/bluetooth/af_bluetooth.c:279 3 locks held by syz.4.207/7686: #0: ffff0000f71c3008 (&sb->s_type->i_mutex_key#11){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline] #0: ffff0000f71c3008 (&sb->s_type->i_mutex_key#11){+.+.}-{4:4}, at: __sock_release net/socket.c:661 [inline] #0: ffff0000f71c3008 (&sb->s_type->i_mutex_key#11){+.+.}-{4:4}, at: sock_close+0x7c/0x1e4 net/socket.c:1455 #1: ffff0000d20c5260 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP/2){+.+.}-{0:0}, at: l2cap_sock_release+0x60/0x1d8 net/bluetooth/l2cap_sock.c:1425 #2: ffff0000f50cb260 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1679 [inline] #2: ffff0000f50cb260 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: bt_accept_dequeue+0xe0/0x524 net/bluetooth/af_bluetooth.c:279 stack backtrace: CPU: 0 UID: 0 PID: 7686 Comm: syz.4.207 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_freed_lock_bug kernel/locking/lockdep.c:6693 [inline] debug_check_no_locks_freed+0x168/0x17c kernel/locking/lockdep.c:6728 slab_free_hook mm/slub.c:2467 [inline] slab_free mm/slub.c:6630 [inline] kfree+0x10c/0x600 mm/slub.c:6837 sk_prot_free net/core/sock.c:2278 [inline] __sk_destruct+0x514/0x780 net/core/sock.c:2373 sk_destruct net/core/sock.c:2401 [inline] __sk_free+0x320/0x430 net/core/sock.c:2412 sk_free+0x60/0xc8 net/core/sock.c:2423 sock_put include/net/sock.h:1972 [inline] bt_accept_unlink+0x170/0x248 net/bluetooth/af_bluetooth.c:262 bt_accept_dequeue+0x3c0/0x524 net/bluetooth/af_bluetooth.c:308 l2cap_sock_cleanup_listen+0x44/0x28c net/bluetooth/l2cap_sock.c:1454 l2cap_sock_release+0x68/0x1d8 net/bluetooth/l2cap_sock.c:1426 __sock_release net/socket.c:662 [inline] sock_close+0xa0/0x1e4 net/socket.c:1455 __fput+0x340/0x75c fs/file_table.c:468 ____fput+0x20/0x58 fs/file_table.c:496 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xfc/0x178 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:103 [inline] el0_svc+0x170/0x254 arch/arm64/kernel/entry-common.c:747 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 ================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x218/0x2cc kernel/locking/spinlock_debug.c:115 Read of size 4 at addr ffff0000f50cb1cc by task syz.4.207/7686 CPU: 0 UID: 0 PID: 7686 Comm: syz.4.207 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x218/0x2cc kernel/locking/spinlock_debug.c:115 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:127 [inline] _raw_spin_lock_bh+0x50/0x60 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:356 [inline] release_sock+0x34/0x1ac net/core/sock.c:3733 bt_accept_dequeue+0x4c4/0x524 net/bluetooth/af_bluetooth.c:312 l2cap_sock_cleanup_listen+0x44/0x28c net/bluetooth/l2cap_sock.c:1454 l2cap_sock_release+0x68/0x1d8 net/bluetooth/l2cap_sock.c:1426 __sock_release net/socket.c:662 [inline] sock_close+0xa0/0x1e4 net/socket.c:1455 __fput+0x340/0x75c fs/file_table.c:468 ____fput+0x20/0x58 fs/file_table.c:496 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xfc/0x178 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:103 [inline] el0_svc+0x170/0x254 arch/arm64/kernel/entry-common.c:747 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Allocated by task 6144: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:77 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:573 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:417 kasan_kmalloc include/linux/kasan.h:262 [inline] __do_kmalloc_node mm/slub.c:5642 [inline] __kmalloc_noprof+0x3fc/0x728 mm/slub.c:5654 kmalloc_noprof include/linux/slab.h:961 [inline] sk_prot_alloc+0xc4/0x1f0 net/core/sock.c:2239 sk_alloc+0x44/0x3ac net/core/sock.c:2295 bt_sock_alloc+0x4c/0x300 net/bluetooth/af_bluetooth.c:151 l2cap_sock_alloc net/bluetooth/l2cap_sock.c:1897 [inline] l2cap_sock_new_connection_cb+0xe4/0x284 net/bluetooth/l2cap_sock.c:1485 l2cap_connect_cfm+0x2d8/0xd40 net/bluetooth/l2cap_core.c:7287 hci_connect_cfm include/net/bluetooth/hci_core.h:2106 [inline] hci_remote_features_evt+0x3fc/0x738 net/bluetooth/hci_event.c:3728 hci_event_func net/bluetooth/hci_event.c:7559 [inline] hci_event_packet+0x704/0xf04 net/bluetooth/hci_event.c:7613 hci_rx_work+0x320/0xb18 net/bluetooth/hci_core.c:4099 process_one_work+0x7e8/0x155c kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x958/0xed8 kernel/workqueue.c:3427 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Freed by task 7686: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:77 __kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x74/0xa4 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2539 [inline] slab_free mm/slub.c:6630 [inline] kfree+0x184/0x600 mm/slub.c:6837 sk_prot_free net/core/sock.c:2278 [inline] __sk_destruct+0x514/0x780 net/core/sock.c:2373 sk_destruct net/core/sock.c:2401 [inline] __sk_free+0x320/0x430 net/core/sock.c:2412 sk_free+0x60/0xc8 net/core/sock.c:2423 sock_put include/net/sock.h:1972 [inline] bt_accept_unlink+0x170/0x248 net/bluetooth/af_bluetooth.c:262 bt_accept_dequeue+0x3c0/0x524 net/bluetooth/af_bluetooth.c:308 l2cap_sock_cleanup_listen+0x44/0x28c net/bluetooth/l2cap_sock.c:1454 l2cap_sock_release+0x68/0x1d8 net/bluetooth/l2cap_sock.c:1426 __sock_release net/socket.c:662 [inline] sock_close+0xa0/0x1e4 net/socket.c:1455 __fput+0x340/0x75c fs/file_table.c:468 ____fput+0x20/0x58 fs/file_table.c:496 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xfc/0x178 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:103 [inline] el0_svc+0x170/0x254 arch/arm64/kernel/entry-common.c:747 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 The buggy address belongs to the object at ffff0000f50cb000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 460 bytes inside of freed 2048-byte region [ffff0000f50cb000, ffff0000f50cb800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1350c8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c0002000 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c0002000 dead000000000100 dead000000000122 head: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 head: 05ffc00000000003 fffffdffc3d43201 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000f50cb080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000f50cb100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000f50cb180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000f50cb200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000f50cb280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ ODEBUG: assert_init not available (active state 0) object: 000000005662f7f1 object type: timer_list hint: l2cap_chan_timeout+0x0/0x280 net/bluetooth/l2cap_core.c:-1 WARNING: CPU: 1 PID: 7686 at lib/debugobjects.c:615 debug_print_object+0x168/0x1e0 lib/debugobjects.c:612 Modules linked in: CPU: 1 UID: 0 PID: 7686 Comm: syz.4.207 Tainted: G B syzkaller #0 PREEMPT Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 pstate: 634000c5 (nZCv daIF +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : debug_print_object+0x168/0x1e0 lib/debugobjects.c:612 lr : debug_print_object+0x168/0x1e0 lib/debugobjects.c:612 sp : ffff80009ec67900 x29: ffff80009ec67900 x28: dfff800000000000 x27: 0000000000000001 x26: ffff80008f581000 x25: dfff800000000000 x24: ffff0000f50cd150 x23: ffff80008b3fb800 x22: ffff80008a07a3c8 x21: ffff80008aed7f20 x20: 0000000000000000 x19: ffff80008b3fb2e0 x18: 1fffe000337dfe90 x17: ffff0001fea8c870 x16: ffff800082deb6c0 x15: 0000000000000001 x14: 1fffe000337dfefa x13: 0000000000000000 x12: 0000000000000000 x11: ffff6000337dfefb x10: 0000000000ff0100 x9 : f5c267d79047da00 x8 : f5c267d79047da00 x7 : 0000000000000001 x6 : ffff800080564a40 x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000807d5f04 x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000000 Call trace: debug_print_object+0x168/0x1e0 lib/debugobjects.c:612 (P) debug_object_assert_init+0x250/0x2c8 lib/debugobjects.c:1020 debug_timer_assert_init kernel/time/timer.c:803 [inline] debug_assert_init kernel/time/timer.c:848 [inline] __timer_delete+0x48/0x354 kernel/time/timer.c:1366 timer_delete+0x24/0x34 kernel/time/timer.c:1406 try_to_grab_pending kernel/workqueue.c:2067 [inline] work_grab_pending+0xc0/0x830 kernel/workqueue.c:2160 __cancel_work+0x50/0x218 kernel/workqueue.c:4364 cancel_delayed_work+0x24/0x38 kernel/workqueue.c:4452 l2cap_clear_timer include/net/bluetooth/l2cap.h:856 [inline] l2cap_sock_cleanup_listen+0xc8/0x28c net/bluetooth/l2cap_sock.c:1463 l2cap_sock_release+0x68/0x1d8 net/bluetooth/l2cap_sock.c:1426 __sock_release net/socket.c:662 [inline] sock_close+0xa0/0x1e4 net/socket.c:1455 __fput+0x340/0x75c fs/file_table.c:468 ____fput+0x20/0x58 fs/file_table.c:496 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xfc/0x178 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:103 [inline] el0_svc+0x170/0x254 arch/arm64/kernel/entry-common.c:747 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 irq event stamp: 1679 hardirqs last enabled at (1679): [] kasan_quarantine_put+0x1a0/0x1c8 mm/kasan/quarantine.c:234 hardirqs last disabled at (1678): [] kasan_quarantine_put+0x38/0x1c8 mm/kasan/quarantine.c:207 softirqs last enabled at (1656): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (1656): [] lock_sock_nested+0xc8/0x118 net/core/sock.c:3727 softirqs last disabled at (1654): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (1654): [] lock_sock_nested+0x70/0x118 net/core/sock.c:3723 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 7686 at lib/refcount.c:28 refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 Modules linked in: CPU: 0 UID: 0 PID: 7686 Comm: syz.4.207 Tainted: G B W syzkaller #0 PREEMPT Tainted: [B]=BAD_PAGE, [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 pstate: 63400005 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 lr : refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 sp : ffff80009ec67b30 x29: ffff80009ec67b30 x28: ffff0000dcd862f0 x27: ffff80008daba320 x26: ffff80008dabadc0 x25: dfff800000000000 x24: 1fffe0001ea1960c x23: dfff800000000000 x22: ffff0000f50cd4a0 x21: 0000000000000000 x20: ffff0000f50cb080 x19: ffff800092bf8000 x18: 1fffe000337db690 x17: ffff80008f57e000 x16: ffff800082deb6c0 x15: 0000000000000001 x14: 1fffe0001ac845c8 x13: 0000000000000000 x12: 0000000000000000 x11: ffff60001ac845c9 x10: 0000000000000003 x9 : f5c267d79047da00 x8 : f5c267d79047da00 x7 : 0000000000000000 x6 : ffff800080492744 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff800080484cc8 x2 : 0000000000000001 x1 : ffff80008b3facc0 x0 : 0000000000000001 Call trace: refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 (P) __refcount_sub_and_test include/linux/refcount.h:400 [inline] __refcount_dec_and_test include/linux/refcount.h:432 [inline] refcount_dec_and_test include/linux/refcount.h:450 [inline] sock_put include/net/sock.h:1971 [inline] l2cap_sock_kill+0x170/0x234 net/bluetooth/l2cap_sock.c:1265 l2cap_sock_cleanup_listen+0xf4/0x28c net/bluetooth/l2cap_sock.c:1465 l2cap_sock_release+0x68/0x1d8 net/bluetooth/l2cap_sock.c:1426 __sock_release net/socket.c:662 [inline] sock_close+0xa0/0x1e4 net/socket.c:1455 __fput+0x340/0x75c fs/file_table.c:468 ____fput+0x20/0x58 fs/file_table.c:496 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xfc/0x178 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:103 [inline] el0_svc+0x170/0x254 arch/arm64/kernel/entry-common.c:747 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 irq event stamp: 1679 hardirqs last enabled at (1679): [] kasan_quarantine_put+0x1a0/0x1c8 mm/kasan/quarantine.c:234 hardirqs last disabled at (1678): [] kasan_quarantine_put+0x38/0x1c8 mm/kasan/quarantine.c:207 softirqs last enabled at (1656): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (1656): [] lock_sock_nested+0xc8/0x118 net/core/sock.c:3727 softirqs last disabled at (1654): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (1654): [] lock_sock_nested+0x70/0x118 net/core/sock.c:3723 ---[ end trace 0000000000000000 ]---