================================================================== BUG: KASAN: slab-use-after-free in __mutex_lock_common kernel/locking/mutex.c:714 [inline] BUG: KASAN: slab-use-after-free in __mutex_lock+0x80b/0x1550 kernel/locking/mutex.c:806 Read of size 8 at addr ffff888079bd22e8 by task syz.3.4088/22495 CPU: 1 UID: 0 PID: 22495 Comm: syz.3.4088 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 __mutex_lock_common kernel/locking/mutex.c:714 [inline] __mutex_lock+0x80b/0x1550 kernel/locking/mutex.c:806 l2cap_unregister_user+0x36/0x170 net/bluetooth/l2cap_core.c:1740 hidp_connection_del+0xb0/0x170 net/bluetooth/hidp/core.c:1421 do_hidp_sock_ioctl net/bluetooth/hidp/sock.c:97 [inline] hidp_sock_ioctl+0x3ab/0x650 net/bluetooth/hidp/sock.c:128 sock_do_ioctl+0x101/0x320 net/socket.c:1313 sock_ioctl+0x5c6/0x7f0 net/socket.c:1434 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5e6379c819 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5e64642028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5e63a16090 RCX: 00007f5e6379c819 RDX: 0000200000000000 RSI: 00000000400448c9 RDI: 000000000000000c RBP: 00007f5e63832c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5e63a16128 R14: 00007f5e63a16090 R15: 00007ffe89e74608 Allocated by task 18820: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x31c/0x660 mm/slub.c:5380 kmalloc_noprof include/linux/slab.h:950 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] l2cap_conn_add+0xaa/0x960 net/bluetooth/l2cap_core.c:7009 l2cap_connect_cfm+0x142/0x1560 net/bluetooth/l2cap_core.c:7386 hci_connect_cfm include/net/bluetooth/hci_core.h:2139 [inline] hci_remote_features_evt+0x5b9/0x950 net/bluetooth/hci_event.c:3760 hci_event_func net/bluetooth/hci_event.c:7773 [inline] hci_event_packet+0x6ab/0xef0 net/bluetooth/hci_event.c:7824 hci_rx_work+0x3ee/0x1040 net/bluetooth/hci_core.c:4077 process_one_work kernel/workqueue.c:3288 [inline] process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3371 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3452 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 5838: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2685 [inline] slab_free mm/slub.c:6165 [inline] kfree+0x1c1/0x620 mm/slub.c:6483 l2cap_connect_cfm+0x12b/0x1560 net/bluetooth/l2cap_core.c:7382 hci_connect_cfm include/net/bluetooth/hci_core.h:2139 [inline] hci_conn_failed+0x1ce/0x340 net/bluetooth/hci_conn.c:1342 hci_abort_conn_sync+0xdd0/0x1190 net/bluetooth/hci_sync.c:5763 hci_cmd_sync_work+0x213/0x400 net/bluetooth/hci_sync.c:332 process_one_work kernel/workqueue.c:3288 [inline] process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3371 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3452 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 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:57 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556 insert_work+0x3d/0x330 kernel/workqueue.c:2211 __queue_work+0xccf/0xfc0 kernel/workqueue.c:2366 call_timer_fn+0x192/0x5e0 kernel/time/timer.c:1748 expire_timers kernel/time/timer.c:1794 [inline] __run_timers kernel/time/timer.c:2374 [inline] __run_timer_base+0x67e/0x8b0 kernel/time/timer.c:2386 run_timer_base kernel/time/timer.c:2395 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2405 handle_softirqs+0x22a/0x840 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x220 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1061 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 Second to last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556 insert_work+0x3d/0x330 kernel/workqueue.c:2211 __queue_work+0xbad/0xfc0 kernel/workqueue.c:2370 queue_work_on+0x106/0x1d0 kernel/workqueue.c:2417 queue_work include/linux/workqueue.h:669 [inline] l2cap_conn_ready net/bluetooth/l2cap_core.c:1660 [inline] l2cap_connect_cfm+0x10f5/0x1560 net/bluetooth/l2cap_core.c:7427 hci_connect_cfm include/net/bluetooth/hci_core.h:2139 [inline] hci_remote_features_evt+0x5b9/0x950 net/bluetooth/hci_event.c:3760 hci_event_func net/bluetooth/hci_event.c:7773 [inline] hci_event_packet+0x6ab/0xef0 net/bluetooth/hci_event.c:7824 hci_rx_work+0x3ee/0x1040 net/bluetooth/hci_core.c:4077 process_one_work kernel/workqueue.c:3288 [inline] process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3371 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3452 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888079bd2000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 744 bytes inside of freed 1024-byte region [ffff888079bd2000, ffff888079bd2400) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888079bd2800 pfn:0x79bd0 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 ffff88813fe2cdc0 ffffea0002814810 ffffea0001dbe410 raw: ffff888079bd2800 0000000800100006 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88813fe2cdc0 ffffea0002814810 ffffea0001dbe410 head: ffff888079bd2800 0000000800100006 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0001e6f401 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5814, tgid 5814 (sh), ts 78399568749, free_ts 78397080835 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250 alloc_slab_page mm/slub.c:3292 [inline] allocate_slab+0x77/0x660 mm/slub.c:3481 new_slab mm/slub.c:3539 [inline] refill_objects+0x331/0x3c0 mm/slub.c:7175 refill_sheaf mm/slub.c:2812 [inline] __pcs_replace_empty_main+0x2e6/0x730 mm/slub.c:4615 alloc_from_pcs mm/slub.c:4717 [inline] slab_alloc_node mm/slub.c:4851 [inline] __do_kmalloc_node mm/slub.c:5259 [inline] __kmalloc_noprof+0x474/0x760 mm/slub.c:5272 kmalloc_noprof include/linux/slab.h:954 [inline] load_elf_phdrs fs/binfmt_elf.c:541 [inline] load_elf_binary+0x30f/0x2980 fs/binfmt_elf.c:870 search_binary_handler fs/exec.c:1664 [inline] exec_binprm fs/exec.c:1696 [inline] bprm_execve+0x94a/0x1440 fs/exec.c:1748 do_execveat_common+0x50d/0x690 fs/exec.c:1846 __do_sys_execve fs/exec.c:1930 [inline] __se_sys_execve fs/exec.c:1924 [inline] __x64_sys_execve+0x97/0xc0 fs/exec.c:1924 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5814 tgid 5814 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xc2b/0xdb0 mm/page_alloc.c:2978 __slab_free+0x263/0x2b0 mm/slub.c:5573 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4538 [inline] slab_alloc_node mm/slub.c:4866 [inline] __do_kmalloc_node mm/slub.c:5259 [inline] __kmalloc_noprof+0x316/0x760 mm/slub.c:5272 kmalloc_noprof include/linux/slab.h:954 [inline] tomoyo_add_entry security/tomoyo/common.c:2166 [inline] tomoyo_supervisor+0xc22/0x1570 security/tomoyo/common.c:2238 tomoyo_find_next_domain+0x486/0x1aa0 security/tomoyo/domain.c:763 tomoyo_bprm_check_security+0x11b/0x180 security/tomoyo/tomoyo.c:102 security_bprm_check+0x85/0x240 security/security.c:820 search_binary_handler fs/exec.c:1654 [inline] exec_binprm fs/exec.c:1696 [inline] bprm_execve+0x8a4/0x1440 fs/exec.c:1748 do_execveat_common+0x50d/0x690 fs/exec.c:1846 __do_sys_execve fs/exec.c:1930 [inline] __se_sys_execve fs/exec.c:1924 [inline] __x64_sys_execve+0x97/0xc0 fs/exec.c:1924 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888079bd2180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888079bd2200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888079bd2280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888079bd2300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888079bd2380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================