================================================================== BUG: KASAN: slab-use-after-free in cfusbl_device_notify+0x140/0x6b0 net/caif/caif_usb.c:142 Read of size 8 at addr ffff888079ff0c50 by task syz.4.179/6522 CPU: 1 UID: 0 PID: 6522 Comm: syz.4.179 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 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 cfusbl_device_notify+0x140/0x6b0 net/caif/caif_usb.c:142 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] register_netdevice+0x121c/0x1ae0 net/core/dev.c:11337 register_netdev+0x40/0x60 net/core/dev.c:11458 bnep_add_connection+0x6c6/0xc70 net/bluetooth/bnep/core.c:624 do_bnep_sock_ioctl+0x40e/0x670 net/bluetooth/bnep/sock.c:83 sock_do_ioctl+0xdc/0x300 net/socket.c:1258 sock_ioctl+0x576/0x790 net/socket.c:1379 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+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7716b8efc9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7717b02038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f7716de5fa0 RCX: 00007f7716b8efc9 RDX: 00002000000001c0 RSI: 00000000400442c8 RDI: 0000000000000006 RBP: 00007f7716c11f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f7716de6038 R14: 00007f7716de5fa0 R15: 00007ffdcd91b448 Allocated by task 5825: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:397 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:414 kasan_kmalloc include/linux/kasan.h:262 [inline] __kmalloc_cache_noprof+0x3e2/0x700 mm/slub.c:5767 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] __hci_conn_add+0x3f8/0x1c50 net/bluetooth/hci_conn.c:959 hci_conn_request_evt+0x576/0xbd0 net/bluetooth/hci_event.c:3303 hci_event_func net/bluetooth/hci_event.c:7632 [inline] hci_event_packet+0x7e3/0x1260 net/bluetooth/hci_event.c:7686 hci_rx_work+0x45d/0xfc0 net/bluetooth/hci_core.c:4099 process_one_work+0x94a/0x15d0 kernel/workqueue.c:3267 process_scheduled_works kernel/workqueue.c:3350 [inline] worker_thread+0x9b0/0xee0 kernel/workqueue.c:3431 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 6523: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2543 [inline] slab_free mm/slub.c:6634 [inline] kfree+0x19a/0x6d0 mm/slub.c:6841 device_release+0x9c/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/0x570 lib/kobject.c:737 hci_conn_cleanup net/bluetooth/hci_conn.c:173 [inline] hci_conn_del+0xc33/0x1240 net/bluetooth/hci_conn.c:1229 hci_conn_hash_flush+0x191/0x260 net/bluetooth/hci_conn.c:2633 hci_dev_do_reset net/bluetooth/hci_core.c:566 [inline] hci_dev_reset+0x41c/0x6e0 net/bluetooth/hci_core.c:610 sock_do_ioctl+0xdc/0x300 net/socket.c:1258 sock_ioctl+0x576/0x790 net/socket.c:1379 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+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:56 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556 insert_work+0x3d/0x330 kernel/workqueue.c:2186 __queue_work+0xcd2/0xfb0 kernel/workqueue.c:2341 queue_delayed_work_on+0x18b/0x280 kernel/workqueue.c:2561 l2cap_chan_del+0x285/0x620 net/bluetooth/l2cap_core.c:671 l2cap_conn_del+0x323/0x5b0 net/bluetooth/l2cap_core.c:1787 hci_disconn_cfm include/net/bluetooth/hci_core.h:2136 [inline] hci_conn_hash_flush+0x10d/0x260 net/bluetooth/hci_conn.c:2632 hci_dev_do_reset net/bluetooth/hci_core.c:566 [inline] hci_dev_reset+0x41c/0x6e0 net/bluetooth/hci_core.c:610 sock_do_ioctl+0xdc/0x300 net/socket.c:1258 sock_ioctl+0x576/0x790 net/socket.c:1379 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+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888079ff0000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 3152 bytes inside of freed 8192-byte region [ffff888079ff0000, ffff888079ff2000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x79ff0 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 ffff88801b027280 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b027280 0000000000000000 dead000000000001 head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0001e7fc01 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5480, tgid 5480 (rcS), ts 41491040441, free_ts 41398906042 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+0x2365/0x2440 mm/page_alloc.c:3920 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5214 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2479 alloc_slab_page mm/slub.c:3059 [inline] allocate_slab+0x96/0x350 mm/slub.c:3232 new_slab mm/slub.c:3286 [inline] ___slab_alloc+0xe94/0x18a0 mm/slub.c:4655 __slab_alloc+0x65/0x100 mm/slub.c:4774 __slab_alloc_node mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:5272 [inline] __kmalloc_cache_noprof+0x41e/0x700 mm/slub.c:5762 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] tomoyo_print_bprm security/tomoyo/audit.c:26 [inline] tomoyo_init_log+0x111f/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+0x15ce/0x1aa0 security/tomoyo/domain.c:888 tomoyo_bprm_check_security+0x11c/0x180 security/tomoyo/tomoyo.c:102 security_bprm_check+0x89/0x270 security/security.c:794 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 page last free pid 5478 tgid 5478 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2948 discard_slab mm/slub.c:3330 [inline] __put_partials+0x146/0x170 mm/slub.c:3876 put_cpu_partial+0x1f2/0x2e0 mm/slub.c:3951 __slab_free+0x2b9/0x390 mm/slub.c:5925 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:349 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4974 [inline] slab_alloc_node mm/slub.c:5284 [inline] __kmalloc_cache_noprof+0x37c/0x700 mm/slub.c:5762 kmalloc_noprof include/linux/slab.h:957 [inline] tomoyo_print_header security/tomoyo/audit.c:156 [inline] tomoyo_init_log+0x183/0x1f70 security/tomoyo/audit.c:255 tomoyo_supervisor+0x340/0x1480 security/tomoyo/common.c:2198 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission+0x25a/0x380 security/tomoyo/file.c:587 tomoyo_check_open_permission+0x24d/0x3b0 security/tomoyo/file.c:777 security_file_open+0xb1/0x270 security/security.c:2636 do_dentry_open+0x384/0x13f0 fs/open.c:942 vfs_open+0x3b/0x340 fs/open.c:1097 do_open fs/namei.c:3975 [inline] path_openat+0x2ee5/0x3830 fs/namei.c:4134 Memory state around the buggy address: ffff888079ff0b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888079ff0b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888079ff0c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888079ff0c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888079ff0d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================