================================================================== BUG: KASAN: slab-use-after-free in strlen+0x57/0x70 lib/string.c:425 Read of size 1 at addr ffff888079008b40 by task kworker/u4:8/2903 CPU: 0 PID: 2903 Comm: kworker/u4:8 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+0x18c/0x250 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xa8/0x210 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 strlen+0x57/0x70 lib/string.c:425 nla_put_string+0x19/0x30 include/net/netlink.h:1566 rtnl_fill_ifinfo+0x1ca8/0x1e50 net/core/rtnetlink.c:1943 rtmsg_ifinfo_build_skb+0x18b/0x260 net/core/rtnetlink.c:4084 rtmsg_ifinfo_event net/core/rtnetlink.c:4118 [inline] rtmsg_ifinfo+0x8c/0x1a0 net/core/rtnetlink.c:4127 netdev_state_change+0xfe/0x170 net/core/dev.c:1423 linkwatch_do_dev+0x10d/0x160 net/core/link_watch.c:191 __linkwatch_run_queue+0x417/0x670 net/core/link_watch.c:244 linkwatch_event+0x4c/0x60 net/core/link_watch.c:287 process_one_work kernel/workqueue.c:2657 [inline] process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2734 worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2815 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 Allocated by task 14789: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc_node_track_caller+0xb4/0x230 mm/slab_common.c:1027 kvasprintf+0xec/0x1a0 lib/kasprintf.c:25 kobject_set_name_vargs+0x61/0x110 lib/kobject.c:274 dev_set_name+0xe3/0x140 drivers/base/core.c:3488 usb_add_gadget+0x475/0x6f0 drivers/usb/gadget/udc/core.c:1448 usb_add_gadget_udc_release+0x19c/0x1f0 drivers/usb/gadget/udc/core.c:1506 dummy_udc_probe+0x68a/0x780 drivers/usb/gadget/udc/dummy_hcd.c:1120 platform_probe+0x13b/0x1c0 drivers/base/platform.c:1376 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x247/0xae0 drivers/base/dd.c:717 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:879 device_driver_attach+0xe0/0x1d0 drivers/base/dd.c:1206 bind_store+0x1cc/0x210 drivers/base/bus.c:267 kernfs_fop_write_iter+0x3a4/0x520 fs/kernfs/file.c:352 call_write_iter include/linux/fs.h:2018 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x474/0x9a0 fs/read_write.c:584 ksys_write+0x151/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 15725: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1811 [inline] slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837 slab_free mm/slub.c:3830 [inline] __kmem_cache_free+0xba/0x1f0 mm/slub.c:3843 kobject_cleanup lib/kobject.c:695 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x260/0x450 lib/kobject.c:737 platform_remove+0x6d/0xe0 drivers/base/platform.c:1396 device_remove drivers/base/dd.c:626 [inline] __device_release_driver drivers/base/dd.c:1351 [inline] device_release_driver_internal+0x408/0x6f0 drivers/base/dd.c:1374 unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244 kernfs_fop_write_iter+0x3a4/0x520 fs/kernfs/file.c:352 call_write_iter include/linux/fs.h:2018 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x474/0x9a0 fs/read_write.c:584 ksys_write+0x151/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff888079008b40 which belongs to the cache kmalloc-16 of size 16 The buggy address is located 0 bytes inside of freed 16-byte region [ffff888079008b40, ffff888079008b50) The buggy address belongs to the physical page: page:ffffea0001e40200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888079008760 pfn:0x79008 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888017c413c0 ffffea0001916390 ffffea0000c06490 raw: ffff888079008760 0000000000800009 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 12475, tgid 12475 (syz-executor), ts 892835708153, free_ts 892755388523 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582 prep_new_page mm/page_alloc.c:1589 [inline] get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501 __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_slab_page+0x4f/0x180 mm/slub.c:1883 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2d0 mm/slub.c:2081 ___slab_alloc+0xc5c/0x12f0 mm/slub.c:3253 __slab_alloc mm/slub.c:3339 [inline] __slab_alloc_node mm/slub.c:3392 [inline] slab_alloc_node mm/slub.c:3485 [inline] __kmem_cache_alloc_node+0x11f/0x250 mm/slub.c:3534 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc_node+0xa6/0x240 mm/slab_common.c:1014 kmalloc_node include/linux/slab.h:620 [inline] kvmalloc_node+0x70/0x180 mm/util.c:617 xt_jumpstack_alloc net/netfilter/x_tables.c:1377 [inline] xt_replace_table+0x185/0x750 net/netfilter/x_tables.c:1416 __do_replace+0x169/0x9a0 net/ipv4/netfilter/ip_tables.c:1062 do_replace net/ipv4/netfilter/ip_tables.c:1139 [inline] do_ipt_set_ctl+0xb38/0xe00 net/ipv4/netfilter/ip_tables.c:1632 nf_setsockopt+0x263/0x280 net/netfilter/nf_sockopt.c:101 do_sock_setsockopt+0x175/0x1a0 net/socket.c:2322 __sys_setsockopt net/socket.c:2345 [inline] __do_sys_setsockopt net/socket.c:2354 [inline] __se_sys_setsockopt net/socket.c:2351 [inline] __x64_sys_setsockopt+0x182/0x200 net/socket.c:2351 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1182 [inline] free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366 free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2505 release_pages+0x208a/0x2300 mm/swap.c:1022 tlb_batch_pages_flush mm/mmu_gather.c:99 [inline] tlb_flush_mmu_free mm/mmu_gather.c:294 [inline] tlb_flush_mmu+0x379/0x510 mm/mmu_gather.c:301 tlb_finish_mmu+0xf4/0x220 mm/mmu_gather.c:425 exit_mmap+0x428/0xb90 mm/mmap.c:3315 __mmput+0x118/0x3a0 kernel/fork.c:1362 exit_mm+0x23f/0x340 kernel/exit.c:576 do_exit+0x909/0x2530 kernel/exit.c:877 do_group_exit+0x22d/0x2f0 kernel/exit.c:1032 get_signal+0x12a6/0x1390 kernel/signal.c:2911 arch_do_signal_or_restart+0xc2/0x7b0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302 do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:82 Memory state around the buggy address: ffff888079008a00: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ffff888079008a80: fb fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc >ffff888079008b00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc ^ ffff888079008b80: fa fb fc fc fb fb fc fc fb fb fc fc fb fb fc fc ffff888079008c00: fb fb fc fc fa fb fc fc fb fb fc fc fb fb fc fc ==================================================================