================================================================== BUG: KASAN: slab-use-after-free in __mutex_waiter_is_first kernel/locking/mutex.c:172 [inline] BUG: KASAN: slab-use-after-free in __mutex_lock_common kernel/locking/mutex.c:664 [inline] BUG: KASAN: slab-use-after-free in __mutex_lock+0x830/0x1010 kernel/locking/mutex.c:730 Read of size 8 at addr ffff888031bfd320 by task kworker/0:9/14047 CPU: 0 UID: 0 PID: 14047 Comm: kworker/0:9 Not tainted 6.14.0-rc6-syzkaller-00022-gb7f94fcf5546 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: events l2cap_chan_timeout Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 __mutex_waiter_is_first kernel/locking/mutex.c:172 [inline] __mutex_lock_common kernel/locking/mutex.c:664 [inline] __mutex_lock+0x830/0x1010 kernel/locking/mutex.c:730 l2cap_chan_timeout+0x63/0x360 net/bluetooth/l2cap_core.c:417 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd30 kernel/workqueue.c:3400 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 29514: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x243/0x390 mm/slub.c:4325 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] l2cap_conn_add+0xa9/0x8e0 net/bluetooth/l2cap_core.c:6825 l2cap_chan_connect+0x61e/0xeb0 net/bluetooth/l2cap_core.c:7016 bt_6lowpan_connect net/bluetooth/6lowpan.c:894 [inline] lowpan_control_write+0x568/0x850 net/bluetooth/6lowpan.c:1129 full_proxy_write+0x17b/0x250 fs/debugfs/file.c:398 vfs_write+0x29f/0xd10 fs/read_write.c:677 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 28116: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4609 [inline] kfree+0x196/0x430 mm/slub.c:4757 hci_disconn_cfm include/net/bluetooth/hci_core.h:2069 [inline] hci_conn_hash_flush+0x1be/0x350 net/bluetooth/hci_conn.c:2698 hci_dev_close_sync+0xa8b/0x1260 net/bluetooth/hci_sync.c:5197 hci_dev_do_close net/bluetooth/hci_core.c:482 [inline] hci_unregister_dev+0x20b/0x510 net/bluetooth/hci_core.c:2677 vhci_release+0x80/0xd0 drivers/bluetooth/hci_vhci.c:664 __fput+0x3e9/0x9f0 fs/file_table.c:464 task_work_run+0x24f/0x310 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xa2a/0x28e0 kernel/exit.c:938 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888031bfd000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 800 bytes inside of freed 1024-byte region [ffff888031bfd000, ffff888031bfd400) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888031bfc800 pfn:0x31bf8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801b041dc0 ffffea0000a5cc10 ffffea000088d010 raw: ffff888031bfc800 0000000000100009 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801b041dc0 ffffea0000a5cc10 ffffea000088d010 head: ffff888031bfc800 0000000000100009 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0000c6fe01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 23224314142, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4740 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2587 new_slab mm/slub.c:2640 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3826 __slab_alloc+0x58/0xa0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] __kmalloc_cache_noprof+0x27b/0x390 mm/slub.c:4320 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] tipc_link_create+0x101/0xda0 net/tipc/link.c:490 tipc_link_bc_create+0xe9/0x4d0 net/tipc/link.c:564 tipc_bcast_init+0x1b6/0x390 net/tipc/bcast.c:701 tipc_init_net+0x26e/0x330 net/tipc/core.c:84 ops_init+0x349/0x5b0 net/core/net_namespace.c:138 __register_pernet_operations net/core/net_namespace.c:1272 [inline] register_pernet_operations+0x30d/0x630 net/core/net_namespace.c:1348 register_pernet_device+0x33/0x80 net/core/net_namespace.c:1435 tipc_init+0x56/0x190 net/tipc/core.c:160 page_owner free stack trace missing Memory state around the buggy address: ffff888031bfd200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888031bfd280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888031bfd300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888031bfd380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888031bfd400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================