================================================================== BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183 Read of size 2 at addr ffff88805610f42a by task ksoftirqd/0/15 CPU: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 6.1.142-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x220 mm/kasan/report.c:427 kasan_report+0x10b/0x140 mm/kasan/report.c:531 rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183 call_timer_fn+0x1a0/0x670 kernel/time/timer.c:1504 expire_timers kernel/time/timer.c:1549 [inline] __run_timers+0x525/0x7c0 kernel/time/timer.c:1820 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 run_ksoftirqd+0x98/0xf0 kernel/softirq.c:963 smpboot_thread_fn+0x64a/0xa40 kernel/smpboot.c:164 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 6814: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc_node_track_caller+0xae/0x230 mm/slab_common.c:956 kmalloc_reserve net/core/skbuff.c:446 [inline] __alloc_skb+0x22a/0x7e0 net/core/skbuff.c:515 alloc_skb include/linux/skbuff.h:1271 [inline] alloc_uevent_skb+0x7d/0x230 lib/kobject_uevent.c:290 uevent_net_broadcast_tagged lib/kobject_uevent.c:351 [inline] kobject_uevent_net_broadcast+0x17e/0x530 lib/kobject_uevent.c:412 kobject_uevent_env+0x54c/0x8a0 lib/kobject_uevent.c:608 __kobject_del+0xd2/0x2f0 lib/kobject.c:593 kobject_cleanup lib/kobject.c:672 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x235/0x460 lib/kobject.c:729 netdev_queue_update_kobjects+0x3e9/0x480 net/core/net-sysfs.c:1731 netif_set_real_num_tx_queues+0x17f/0x8d0 net/core/dev.c:2951 veth_init_queues+0x83/0x180 drivers/net/veth.c:1650 veth_newlink+0x96f/0xbe0 drivers/net/veth.c:1773 rtnl_newlink_create net/core/rtnetlink.c:3422 [inline] __rtnl_newlink net/core/rtnetlink.c:3642 [inline] rtnl_newlink+0x14c4/0x1ff0 net/core/rtnetlink.c:3655 rtnetlink_rcv_msg+0x79b/0xed0 net/core/rtnetlink.c:6153 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2493 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x74c/0x8c0 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x89e/0xbc0 net/netlink/af_netlink.c:1859 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x44f/0x5c0 net/socket.c:2153 __do_sys_sendto net/socket.c:2165 [inline] __se_sys_sendto net/socket.c:2161 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2161 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 6814: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0xb6/0x1f0 mm/slub.c:3674 skb_free_head net/core/skbuff.c:762 [inline] skb_release_data+0x5db/0x7c0 net/core/skbuff.c:791 skb_release_all net/core/skbuff.c:856 [inline] __kfree_skb net/core/skbuff.c:870 [inline] consume_skb+0xa2/0x100 net/core/skbuff.c:1035 netlink_broadcast+0xff6/0x10f0 net/netlink/af_netlink.c:1508 uevent_net_broadcast_tagged lib/kobject_uevent.c:372 [inline] kobject_uevent_net_broadcast+0x497/0x530 lib/kobject_uevent.c:412 kobject_uevent_env+0x54c/0x8a0 lib/kobject_uevent.c:608 __kobject_del+0xd2/0x2f0 lib/kobject.c:593 kobject_cleanup lib/kobject.c:672 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x235/0x460 lib/kobject.c:729 netdev_queue_update_kobjects+0x3e9/0x480 net/core/net-sysfs.c:1731 netif_set_real_num_tx_queues+0x17f/0x8d0 net/core/dev.c:2951 veth_init_queues+0x83/0x180 drivers/net/veth.c:1650 veth_newlink+0x96f/0xbe0 drivers/net/veth.c:1773 rtnl_newlink_create net/core/rtnetlink.c:3422 [inline] __rtnl_newlink net/core/rtnetlink.c:3642 [inline] rtnl_newlink+0x14c4/0x1ff0 net/core/rtnetlink.c:3655 rtnetlink_rcv_msg+0x79b/0xed0 net/core/rtnetlink.c:6153 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2493 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x74c/0x8c0 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x89e/0xbc0 net/netlink/af_netlink.c:1859 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x44f/0x5c0 net/socket.c:2153 __do_sys_sendto net/socket.c:2165 [inline] __se_sys_sendto net/socket.c:2161 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2161 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3c0 kernel/workqueue.c:1361 __queue_work+0xba3/0xfb0 kernel/workqueue.c:1520 call_timer_fn+0x1a0/0x670 kernel/time/timer.c:1504 expire_timers kernel/time/timer.c:1544 [inline] __run_timers+0x550/0x7c0 kernel/time/timer.c:1820 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 __do_softirq kernel/softirq.c:630 [inline] invoke_softirq kernel/softirq.c:470 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679 irq_exit_rcu+0x5/0x20 kernel/softirq.c:691 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691 The buggy address belongs to the object at ffff88805610f400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of 512-byte region [ffff88805610f400, ffff88805610f600) The buggy address belongs to the physical page: page:ffffea0001584300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5610c head:ffffea0001584300 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888017441c80 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4274, tgid 4274 (syz-executor), ts 80754629725, free_ts 80748699363 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614 alloc_slab_page+0x5d/0x160 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x87/0x2c0 mm/slub.c:1992 ___slab_alloc+0xbc6/0x1220 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc_node_track_caller+0x9e/0x230 mm/slab_common.c:956 kmalloc_reserve net/core/skbuff.c:446 [inline] pskb_expand_head+0x1a6/0x12a0 net/core/skbuff.c:1848 netlink_trim+0x180/0x220 net/netlink/af_netlink.c:1293 netlink_broadcast+0x75/0x10f0 net/netlink/af_netlink.c:1487 nlmsg_multicast include/net/netlink.h:1071 [inline] nlmsg_notify+0xe7/0x1a0 net/netlink/af_netlink.c:2536 fib_table_insert+0xd5d/0x1b50 net/ipv4/fib_trie.c:1385 fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1118 fib_add_ifaddr+0x140/0x5e0 net/ipv4/fib_frontend.c:1140 fib_inetaddr_event+0x13c/0x1c0 net/ipv4/fib_frontend.c:1454 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479 __stack_depot_save+0x435/0x460 lib/stackdepot.c:506 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x60/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x123/0x2f0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:689 [inline] fill_pool lib/debugobjects.c:169 [inline] debug_objects_fill_pool+0x438/0x650 lib/debugobjects.c:607 __debug_object_init+0x29/0x420 lib/debugobjects.c:617 wg_peer_create+0x306/0x840 drivers/net/wireguard/peer.c:49 set_peer drivers/net/wireguard/netlink.c:412 [inline] wg_set_device+0x100b/0x1ee0 drivers/net/wireguard/netlink.c:592 genl_family_rcv_msg_doit+0x22e/0x320 net/netlink/genetlink.c:756 genl_family_rcv_msg net/netlink/genetlink.c:833 [inline] genl_rcv_msg+0x5f2/0x780 net/netlink/genetlink.c:850 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2493 genl_rcv+0x24/0x40 net/netlink/genetlink.c:861 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x74c/0x8c0 net/netlink/af_netlink.c:1337 Memory state around the buggy address: ffff88805610f300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805610f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805610f400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805610f480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805610f500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================