================================================================== BUG: KASAN: use-after-free in __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline] BUG: KASAN: use-after-free in _raw_spin_lock_irq+0xa2/0xf0 kernel/locking/spinlock.c:170 Read of size 1 at addr ffff888058064068 by task khidpd_0004000f/11901 CPU: 0 UID: 0 PID: 11901 Comm: khidpd_0004000f Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 __kasan_check_byte+0x2a/0x40 mm/kasan/common.c:568 kasan_check_byte include/linux/kasan.h:399 [inline] lock_acquire+0x8d/0x360 kernel/locking/lockdep.c:5842 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline] _raw_spin_lock_irq+0xa2/0xf0 kernel/locking/spinlock.c:170 rt_mutex_slowlock_block+0x5c2/0x6d0 kernel/locking/rtmutex.c:1650 __rt_mutex_slowlock kernel/locking/rtmutex.c:1721 [inline] __rt_mutex_slowlock_locked kernel/locking/rtmutex.c:1760 [inline] rt_mutex_slowlock+0x2b1/0x6e0 kernel/locking/rtmutex.c:1800 __rt_mutex_lock kernel/locking/rtmutex.c:1815 [inline] __mutex_lock_common kernel/locking/rtmutex_api.c:536 [inline] mutex_lock_nested+0x16a/0x1d0 kernel/locking/rtmutex_api.c:547 l2cap_unregister_user+0x6a/0x1b0 net/bluetooth/l2cap_core.c:1728 hidp_session_thread+0x3c9/0x410 net/bluetooth/hidp/core.c:1304 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x439/0x7d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888058064000 pfn:0x58064 flags: 0x80000000000000(node=0|zone=1) raw: 0080000000000000 ffff8880b88420c0 ffff8880b88420c0 0000000000000000 raw: ffff888058064000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 2, migratetype Unmovable, gfp_mask 0x140dc0(GFP_USER|__GFP_ZERO|__GFP_COMP), pid 11670, tgid 11670 (syz-executor), ts 1084433118576, free_ts 1510743520339 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x2119/0x21b0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2416 ___kmalloc_large_node+0x5f/0x1b0 mm/slub.c:4317 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:4348 __do_kmalloc_node mm/slub.c:4364 [inline] __kmalloc_noprof+0x27a/0x430 mm/slub.c:4388 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] hci_alloc_dev_priv+0x28/0x20b0 net/bluetooth/hci_core.c:2448 hci_alloc_dev include/net/bluetooth/hci_core.h:1726 [inline] __vhci_create_device drivers/bluetooth/hci_vhci.c:421 [inline] vhci_create_device+0x120/0x660 drivers/bluetooth/hci_vhci.c:479 vhci_get_user drivers/bluetooth/hci_vhci.c:536 [inline] vhci_write+0x3d0/0x4a0 drivers/bluetooth/hci_vhci.c:616 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5d2/0xb40 fs/read_write.c:686 ksys_write+0x14b/0x260 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 14520 tgid 14515 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xb59/0xce0 mm/page_alloc.c:2895 free_large_kmalloc+0x13a/0x1f0 mm/slub.c:4820 bt_host_release+0x82/0x90 net/bluetooth/hci_sysfs.c:87 device_release+0x99/0x1c0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22b/0x480 lib/kobject.c:737 vhci_release+0x15d/0x1b0 drivers/bluetooth/hci_vhci.c:691 __fput+0x45b/0xa80 fs/file_table.c:468 task_work_run+0x1d4/0x260 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x6b5/0x2300 kernel/exit.c:961 do_group_exit+0x21c/0x2d0 kernel/exit.c:1102 get_signal+0x125e/0x1310 kernel/signal.c:3034 arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888058063f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888058063f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888058064000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888058064080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888058064100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================