=========[ 224.214011][ T5848] ================================================================== BUG: KASAN: slab-use-after-free in l2cap_recv_acldata+0x78/0x1210 net/bluetooth/l2cap_core.c:7520 Read of size 8 at addr ffff888033c09198 by task kworker/u9:2/5848 CPU: 1 UID: 0 PID: 5848 Comm: kworker/u9:2 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Workqueue: hci1 hci_rx_work 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 l2cap_recv_acldata+0x78/0x1210 net/bluetooth/l2cap_core.c:7520 hci_acldata_packet net/bluetooth/hci_core.c:3833 [inline] hci_rx_work+0x5bb/0xe80 net/bluetooth/hci_core.c:4076 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 59: 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:388 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x1a8/0x320 mm/slub.c:4407 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] __hci_conn_add+0x34c/0x1c10 net/bluetooth/hci_conn.c:949 le_conn_complete_evt+0x3d6/0x1220 net/bluetooth/hci_event.c:5645 hci_le_conn_complete_evt+0x187/0x450 net/bluetooth/hci_event.c:5797 hci_event_func net/bluetooth/hci_event.c:7542 [inline] hci_event_packet+0x78f/0x1200 net/bluetooth/hci_event.c:7599 hci_rx_work+0x46a/0xe80 net/bluetooth/hci_core.c:4071 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 7809: 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:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2422 [inline] slab_free mm/slub.c:4695 [inline] kfree+0x195/0x550 mm/slub.c:4894 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 hci_conn_put include/net/bluetooth/hci_core.h:1636 [inline] hci_disconnect_all_sync+0x1bd/0x350 net/bluetooth/hci_sync.c:5713 hci_suspend_sync+0x3fc/0xc60 net/bluetooth/hci_sync.c:6188 hci_suspend_dev+0x28d/0x4d0 net/bluetooth/hci_core.c:2849 hci_suspend_notifier+0xf2/0x290 net/bluetooth/hci_core.c:2420 notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85 notifier_call_chain_robust kernel/notifier.c:120 [inline] blocking_notifier_call_chain_robust+0x85/0x100 kernel/notifier.c:345 pm_notifier_call_chain_robust+0x2c/0x60 kernel/power/main.c:103 snapshot_open+0x1a2/0x280 kernel/power/user.c:77 misc_open+0x2c2/0x340 drivers/char/misc.c:161 chrdev_open+0x4cc/0x5e0 fs/char_dev.c:414 do_dentry_open+0x9ae/0x1350 fs/open.c:965 vfs_open+0x3b/0x350 fs/open.c:1095 do_open fs/namei.c:3887 [inline] path_openat+0x2ef1/0x3840 fs/namei.c:4046 do_filp_open+0x1fa/0x410 fs/namei.c:4073 do_sys_openat2+0x121/0x1c0 fs/open.c:1435 do_sys_open fs/open.c:1450 [inline] __do_sys_openat fs/open.c:1466 [inline] __se_sys_openat fs/open.c:1461 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1461 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 The buggy address belongs to the object at ffff888033c08000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4504 bytes inside of freed 8192-byte region [ffff888033c08000, ffff888033c0a000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x33c08 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x80000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0080000000000040 ffff888019842280 ffffea0000e66200 dead000000000002 raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 0080000000000040 ffff888019842280 ffffea0000e66200 dead000000000002 head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 0080000000000003 ffffea0000cf0201 00000000ffffffff 00000000ffffffff head: 0000000000000000 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5499, tgid 5499 (S41dhcpcd), ts 63604370218, free_ts 63507706411 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 alloc_slab_page mm/slub.c:2492 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2660 new_slab mm/slub.c:2714 [inline] ___slab_alloc+0x8d1/0xdc0 mm/slub.c:3901 __slab_alloc mm/slub.c:3992 [inline] __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] __kmalloc_cache_noprof+0xe6/0x320 mm/slub.c:4402 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] tomoyo_print_bprm security/tomoyo/audit.c:26 [inline] tomoyo_init_log+0x1120/0x1f70 security/tomoyo/audit.c:264 tomoyo_supervisor+0x340/0x1480 security/tomoyo/common.c:2198 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x149/0x1e0 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0x15d1/0x1aa0 security/tomoyo/domain.c:888 tomoyo_bprm_check_security+0x11d/0x180 security/tomoyo/tomoyo.c:102 security_bprm_check+0x89/0x270 security/security.c:1302 search_binary_handler fs/exec.c:1660 [inline] exec_binprm fs/exec.c:1702 [inline] bprm_execve+0x8ee/0x1450 fs/exec.c:1754 do_execveat_common+0x510/0x6a0 fs/exec.c:1860 do_execve fs/exec.c:1934 [inline] __do_sys_execve fs/exec.c:2010 [inline] __se_sys_execve fs/exec.c:2005 [inline] __x64_sys_execve+0x94/0xb0 fs/exec.c:2005 page last free pid 5497 tgid 5497 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 discard_slab mm/slub.c:2758 [inline] __put_partials+0x159/0x1a0 mm/slub.c:3223 __slab_free+0x2b3/0x390 mm/slub.c:4565 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4191 [inline] slab_alloc_node mm/slub.c:4240 [inline] __do_kmalloc_node mm/slub.c:4375 [inline] __kmalloc_noprof+0x1a5/0x430 mm/slub.c:4388 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x213/0x4b0 security/tomoyo/file.c:822 security_inode_getattr+0x12f/0x330 security/security.c:2377 vfs_getattr fs/stat.c:259 [inline] vfs_fstat fs/stat.c:281 [inline] __do_sys_newfstat fs/stat.c:555 [inline] __se_sys_newfstat fs/stat.c:550 [inline] __x64_sys_newfstat+0xfc/0x200 fs/stat.c:550 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 Memory state around the buggy address: ffff888033c09080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888033c09100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888033c09180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888033c09200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888033c09280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================