================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: slab-use-after-free in atomic_long_read include/linux/atomic/atomic-instrumented.h:3188 [inline] BUG: KASAN: slab-use-after-free in __mutex_unlock_slowpath+0xd4/0x700 kernel/locking/mutex.c:916 Read of size 8 at addr ffff8880285e12d0 by task kworker/1:7/5998 CPU: 1 UID: 0 PID: 5998 Comm: kworker/1:7 Not tainted 6.15.0-syzkaller-07774-g90b83efa6701 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_long_read include/linux/atomic/atomic-instrumented.h:3188 [inline] __mutex_unlock_slowpath+0xd4/0x700 kernel/locking/mutex.c:916 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 5847: 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:4358 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:6862 l2cap_connect_cfm+0x143/0x1040 net/bluetooth/l2cap_core.c:7239 hci_connect_cfm include/net/bluetooth/hci_core.h:2050 [inline] hci_remote_features_evt+0x581/0x8e0 net/bluetooth/hci_event.c:3747 hci_event_func net/bluetooth/hci_event.c:7511 [inline] hci_event_packet+0x7e3/0x1200 net/bluetooth/hci_event.c:7565 hci_rx_work+0x46a/0xe80 net/bluetooth/hci_core.c:4036 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 5841: 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:2380 [inline] slab_free mm/slub.c:4642 [inline] kfree+0x18e/0x440 mm/slub.c:4841 l2cap_connect_cfm+0x11d/0x1040 net/bluetooth/l2cap_core.c:7235 hci_connect_cfm include/net/bluetooth/hci_core.h:2050 [inline] hci_conn_failed+0x1cb/0x310 net/bluetooth/hci_conn.c:1275 hci_abort_conn_sync+0x5d1/0xdf0 net/bluetooth/hci_sync.c:5620 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+0x286/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:7280 hci_connect_cfm include/net/bluetooth/hci_core.h:2050 [inline] hci_remote_features_evt+0x581/0x8e0 net/bluetooth/hci_event.c:3747 hci_event_func net/bluetooth/hci_event.c:7511 [inline] hci_event_packet+0x7e3/0x1200 net/bluetooth/hci_event.c:7565 hci_rx_work+0x46a/0xe80 net/bluetooth/hci_core.c:4036 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 ffff8880285e1000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 720 bytes inside of freed 1024-byte region [ffff8880285e1000, ffff8880285e1400) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880285e2000 pfn:0x285e0 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 ffff88801a441dc0 ffffea000140da10 ffffea0001fcb010 raw: ffff8880285e2000 000000000010000f 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801a441dc0 ffffea000140da10 ffffea0001fcb010 head: ffff8880285e2000 000000000010000f 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0000a17801 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 59, tgid 59 (kworker/u8:4), ts 12633603712, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1710 prep_new_page mm/page_alloc.c:1718 [inline] get_page_from_freelist+0x21e0/0x22c0 mm/page_alloc.c:3680 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4970 alloc_slab_page mm/slub.c:2452 [inline] allocate_slab+0x65/0x3b0 mm/slub.c:2618 new_slab mm/slub.c:2672 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3858 __slab_alloc mm/slub.c:3948 [inline] __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_node_noprof+0x2fd/0x4e0 mm/slub.c:4333 kmalloc_node_noprof include/linux/slab.h:932 [inline] blk_alloc_flush_queue+0xe2/0x230 block/blk-flush.c:490 blk_mq_alloc_hctx block/blk-mq.c:4037 [inline] blk_mq_alloc_and_init_hctx+0x679/0xd60 block/blk-mq.c:4500 __blk_mq_realloc_hw_ctxs+0x169/0x400 block/blk-mq.c:4531 blk_mq_realloc_hw_ctxs block/blk-mq.c:4558 [inline] blk_mq_init_allocated_queue+0x400/0x1490 block/blk-mq.c:4590 blk_mq_alloc_queue+0x197/0x290 block/blk-mq.c:4400 scsi_alloc_sdev+0x76d/0xb50 drivers/scsi/scsi_scan.c:339 scsi_probe_and_add_lun+0x1cb/0x4520 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 page_owner free stack trace missing Memory state around the buggy address: ffff8880285e1180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880285e1200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880285e1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880285e1300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880285e1380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================