================================================================== BUG: KASAN: slab-use-after-free in __mutex_waiter_is_first kernel/locking/mutex.c:183 [inline] BUG: KASAN: slab-use-after-free in __mutex_lock_common kernel/locking/mutex.c:678 [inline] BUG: KASAN: slab-use-after-free in __mutex_lock+0x7f9/0x1340 kernel/locking/mutex.c:760 Read of size 8 at addr ffff888026ba6320 by task kworker/0:0/9 CPU: 0 UID: 0 PID: 9 Comm: kworker/0:0 Not tainted 6.16.0-syzkaller-06610-g4eabe4cc0958 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Workqueue: events l2cap_chan_timeout 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 __mutex_waiter_is_first kernel/locking/mutex.c:183 [inline] __mutex_lock_common kernel/locking/mutex.c:678 [inline] __mutex_lock+0x7f9/0x1340 kernel/locking/mutex.c:760 l2cap_chan_timeout+0x63/0x390 net/bluetooth/l2cap_core.c:417 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 5155: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4359 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] l2cap_conn_add+0xaa/0x8d0 net/bluetooth/l2cap_core.c:6886 l2cap_connect_cfm+0x143/0x1040 net/bluetooth/l2cap_core.c:7263 hci_connect_cfm include/net/bluetooth/hci_core.h:2050 [inline] hci_remote_features_evt+0x581/0x8e0 net/bluetooth/hci_event.c:3712 hci_event_func net/bluetooth/hci_event.c:7519 [inline] hci_event_packet+0x7e3/0x1200 net/bluetooth/hci_event.c:7573 hci_rx_work+0x46a/0xe80 net/bluetooth/hci_core.c:4071 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 5846: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x18e/0x440 mm/slub.c:4842 l2cap_connect_cfm+0x11d/0x1040 net/bluetooth/l2cap_core.c:7259 hci_connect_cfm include/net/bluetooth/hci_core.h:2050 [inline] hci_conn_failed+0x1cb/0x310 net/bluetooth/hci_conn.c:1278 hci_abort_conn_sync+0x658/0xe30 net/bluetooth/hci_sync.c:5689 hci_cmd_sync_work+0x213/0x3a0 net/bluetooth/hci_sync.c:332 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548 insert_work+0x3d/0x330 kernel/workqueue.c:2183 __queue_work+0xcfc/0xfe0 kernel/workqueue.c:2341 call_timer_fn+0x17e/0x5f0 kernel/time/timer.c:1747 expire_timers kernel/time/timer.c:1793 [inline] __run_timers kernel/time/timer.c:2372 [inline] __run_timer_base+0x646/0x860 kernel/time/timer.c:2384 run_timer_base kernel/time/timer.c:2393 [inline] run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2403 handle_softirqs+0x283/0x870 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Second to last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548 insert_work+0x3d/0x330 kernel/workqueue.c:2183 __queue_work+0xbd9/0xfe0 kernel/workqueue.c:2345 queue_work_on+0x181/0x270 kernel/workqueue.c:2392 queue_work include/linux/workqueue.h:662 [inline] l2cap_conn_ready net/bluetooth/l2cap_core.c:1644 [inline] l2cap_connect_cfm+0xd98/0x1040 net/bluetooth/l2cap_core.c:7304 hci_connect_cfm include/net/bluetooth/hci_core.h:2050 [inline] hci_remote_features_evt+0x581/0x8e0 net/bluetooth/hci_event.c:3712 hci_event_func net/bluetooth/hci_event.c:7519 [inline] hci_event_packet+0x7e3/0x1200 net/bluetooth/hci_event.c:7573 hci_rx_work+0x46a/0xe80 net/bluetooth/hci_core.c:4071 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 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 object at ffff888026ba6000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 800 bytes inside of freed 1024-byte region [ffff888026ba6000, ffff888026ba6400) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26ba0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801a441dc0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801a441dc0 0000000000000000 dead000000000001 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea00009ae801 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x252800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_THISNODE), pid 66, tgid 66 (kworker/u8:4), ts 9466942979, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_slab_page mm/slub.c:2453 [inline] allocate_slab+0x65/0x3b0 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __kmalloc_cache_node_noprof+0x29a/0x3d0 mm/slub.c:4367 kmalloc_node_noprof include/linux/slab.h:928 [inline] blk_mq_alloc_hctx block/blk-mq.c:4001 [inline] blk_mq_alloc_and_init_hctx+0x181/0xd60 block/blk-mq.c:4504 __blk_mq_realloc_hw_ctxs+0x169/0x400 block/blk-mq.c:4535 blk_mq_realloc_hw_ctxs block/blk-mq.c:4562 [inline] blk_mq_init_allocated_queue+0x400/0x1490 block/blk-mq.c:4594 blk_mq_alloc_queue+0x191/0x280 block/blk-mq.c:4404 scsi_alloc_sdev+0x767/0xb40 drivers/scsi/scsi_scan.c:339 scsi_probe_and_add_lun+0x1c5/0x4510 drivers/scsi/scsi_scan.c:1210 __scsi_scan_target+0x1dd/0xd10 drivers/scsi/scsi_scan.c:1775 scsi_scan_channel drivers/scsi/scsi_scan.c:1863 [inline] scsi_scan_host_selected+0x372/0x690 drivers/scsi/scsi_scan.c:1892 do_scsi_scan_host drivers/scsi/scsi_scan.c:2031 [inline] do_scan_async+0x124/0x760 drivers/scsi/scsi_scan.c:2041 async_run_entry_fn+0xa5/0x3f0 kernel/async.c:129 page_owner free stack trace missing Memory state around the buggy address: ffff888026ba6200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888026ba6280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888026ba6300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888026ba6380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888026ba6400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================