================================================================== BUG: KASAN: use-after-free in strlen+0x53/0x60 lib/string.c:502 Read of size 1 at addr ffff88807d322f20 by task kworker/u4:6/4330 CPU: 0 PID: 4330 Comm: kworker/u4:6 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Workqueue: events_unbound linkwatch_event Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 strlen+0x53/0x60 lib/string.c:502 nla_put_string+0x19/0x30 include/net/netlink.h:1522 rtnl_fill_ifinfo+0x1b8a/0x1d00 net/core/rtnetlink.c:1901 rtmsg_ifinfo_build_skb+0xe3/0x190 net/core/rtnetlink.c:3984 rtmsg_ifinfo_event net/core/rtnetlink.c:4018 [inline] rtmsg_ifinfo+0xc4/0x200 net/core/rtnetlink.c:4027 netdev_state_change+0xfa/0x170 net/core/dev.c:1405 linkwatch_do_dev+0x10d/0x160 net/core/link_watch.c:168 __linkwatch_run_queue+0x410/0x660 net/core/link_watch.c:221 linkwatch_event+0x48/0x50 net/core/link_watch.c:264 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 4432: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc_node_track_caller+0xb0/0x240 mm/slab_common.c:956 kvasprintf+0xe8/0x1a0 lib/kasprintf.c:25 kobject_set_name_vargs+0x5d/0x110 lib/kobject.c:265 dev_set_name+0xdf/0x130 drivers/base/core.c:3485 usb_add_gadget+0x474/0x6f0 drivers/usb/gadget/udc/core.c:1448 usb_add_gadget_udc_release+0x198/0x1e0 drivers/usb/gadget/udc/core.c:1506 dummy_udc_probe+0x686/0x780 drivers/usb/gadget/udc/dummy_hcd.c:1102 platform_probe+0x137/0x1c0 drivers/base/platform.c:1400 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x24a/0xb40 drivers/base/dd.c:638 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804 device_driver_attach+0xd9/0x1c0 drivers/base/dd.c:1131 bind_store+0x33b/0x380 drivers/base/bus.c:216 kernfs_fop_write_iter+0x3a0/0x520 fs/kernfs/file.c:352 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x482/0x9a0 fs/read_write.c:584 ksys_write+0x14d/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 4535: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1729 [inline] slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1755 slab_free mm/slub.c:3687 [inline] __kmem_cache_free+0xb6/0x200 mm/slub.c:3700 kobject_cleanup lib/kobject.c:687 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x25c/0x450 lib/kobject.c:729 dummy_udc_remove+0x54/0x60 drivers/usb/gadget/udc/dummy_hcd.c:1123 platform_remove+0x92/0xe0 drivers/base/platform.c:1422 device_remove drivers/base/dd.c:547 [inline] __device_release_driver drivers/base/dd.c:1279 [inline] device_release_driver_internal+0x47d/0x7c0 drivers/base/dd.c:1305 unbind_store+0x2e2/0x300 drivers/base/bus.c:193 kernfs_fop_write_iter+0x3a0/0x520 fs/kernfs/file.c:352 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x482/0x9a0 fs/read_write.c:584 ksys_write+0x14d/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88807d322f20 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 0 bytes inside of 16-byte region [ffff88807d322f20, ffff88807d322f30) The buggy address belongs to the physical page: page:ffffea0001f4c880 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7d322 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000001 ffff8880174413c0 raw: 0000000000000000 0000000000800080 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY), pid 3621, tgid 3621 (rcS), ts 29271515035, free_ts 26926497061 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560 prep_new_page mm/page_alloc.c:2567 [inline] get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658 alloc_slab_page+0x5d/0x180 mm/slub.c:1799 allocate_slab mm/slub.c:1944 [inline] new_slab+0x87/0x2d0 mm/slub.c:1997 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3154 __slab_alloc mm/slub.c:3240 [inline] slab_alloc_node mm/slub.c:3325 [inline] __kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3398 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc+0xa3/0x240 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] tomoyo_add_entry security/tomoyo/common.c:2022 [inline] tomoyo_supervisor+0xc66/0x11b0 security/tomoyo/common.c:2094 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x14e/0x1f0 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0x12dd/0x1a30 security/tomoyo/domain.c:882 tomoyo_bprm_check_security+0x100/0x150 security/tomoyo/tomoyo.c:101 security_bprm_check+0x5e/0x90 security/security.c:870 search_binary_handler fs/exec.c:1752 [inline] exec_binprm fs/exec.c:1805 [inline] bprm_execve+0xa5d/0x17e0 fs/exec.c:1874 do_execveat_common+0x501/0x6b0 fs/exec.c:1979 do_execve fs/exec.c:2053 [inline] __do_sys_execve fs/exec.c:2129 [inline] __se_sys_execve fs/exec.c:2124 [inline] __x64_sys_execve+0x8e/0xa0 fs/exec.c:2124 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1487 [inline] free_pcp_prepare mm/page_alloc.c:1537 [inline] free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509 free_contig_range+0x9d/0x150 mm/page_alloc.c:9626 destroy_args+0xef/0xa0e mm/debug_vm_pgtable.c:1031 debug_vm_pgtable+0x33c/0x38e mm/debug_vm_pgtable.c:1359 do_one_initcall+0x257/0x800 init/main.c:1309 do_initcall_level+0x13d/0x1ed init/main.c:1382 do_initcalls+0x4b/0x8a init/main.c:1398 kernel_init_freeable+0x401/0x5ab init/main.c:1637 kernel_init+0x19/0x1b0 init/main.c:1525 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88807d322e00: fa fb fc fc fa fb fc fc 00 00 fc fc 00 00 fc fc ffff88807d322e80: 00 00 fc fc fa fb fc fc 00 03 fc fc fa fb fc fc >ffff88807d322f00: 00 07 fc fc fa fb fc fc fa fb fc fc 00 04 fc fc ^ ffff88807d322f80: fa fb fc fc 00 04 fc fc 00 03 fc fc fa fb fc fc ffff88807d323000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================