================================================================== BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183 Read of size 2 at addr ffff888075267c2a by task syz.3.769/7422 CPU: 1 PID: 7422 Comm: syz.3.769 Not tainted 6.1.144-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 __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 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa5/0x100 kernel/locking/spinlock.c:194 Code: 74 05 e8 de 49 65 f7 48 c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f6 44 24 21 02 75 4b f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 b6 c4 35 f7 65 8b 05 87 85 e0 75 85 c0 74 3c 48 c7 04 24 0e 36 RSP: 0018:ffffc90003ccefe0 EFLAGS: 00000206 RAX: 28dc6246e3280200 RBX: 0000000000000a06 RCX: 28dc6246e3280200 RDX: dffffc0000000000 RSI: ffffffff8a8c0460 RDI: 0000000000000001 RBP: ffffc90003ccf060 R08: dffffc0000000000 R09: fffffbfff2dc02c4 R10: fffffbfff2dc02c4 R11: 1ffffffff2dc02c3 R12: dffffc0000000000 R13: ffff88804b803000 R14: ffffffff96e01618 R15: 1ffff92000799dfc __debug_check_no_obj_freed lib/debugobjects.c:988 [inline] debug_check_no_obj_freed+0x515/0x530 lib/debugobjects.c:1009 free_pages_prepare mm/page_alloc.c:1465 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x2a6/0x9a0 mm/page_alloc.c:3384 free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3525 release_pages+0x1f92/0x2200 mm/swap.c:1035 __pagevec_release+0x6d/0xe0 mm/swap.c:1055 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] shmem_undo_range+0x75b/0x2050 mm/shmem.c:946 shmem_truncate_range mm/shmem.c:1062 [inline] shmem_evict_inode+0x248/0xa40 mm/shmem.c:1171 evict+0x485/0x870 fs/inode.c:705 __dentry_kill+0x431/0x650 fs/dcache.c:611 dentry_kill+0xb8/0x290 fs/dcache.c:-1 dput+0xfa/0x1d0 fs/dcache.c:918 __fput+0x5e0/0x920 fs/file_table.c:328 task_work_run+0x1ca/0x250 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0x93e/0x2400 kernel/exit.c:880 do_group_exit+0x217/0x2d0 kernel/exit.c:1022 get_signal+0x1272/0x1350 kernel/signal.c:2871 arch_do_signal_or_restart+0xb0/0x1230 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f7e7598e929 Code: Unable to access opcode bytes at 0x7f7e7598e8ff. RSP: 002b:00007f7e757de038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: 0000000000010106 RBX: 00007f7e75bb6080 RCX: 00007f7e7598e929 RDX: 0000000000010106 RSI: 00002000000000c0 RDI: 0000000000000003 RBP: 00007f7e75a10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f7e75bb6080 R15: 00007ffd55bd2408 Allocated by task 7299: 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 skb_copy+0x139/0x790 net/core/skbuff.c:1732 mac80211_hwsim_tx_frame_no_nl+0xd6e/0x1330 drivers/net/wireless/mac80211_hwsim.c:1729 mac80211_hwsim_tx_frame+0x1b5/0x200 drivers/net/wireless/mac80211_hwsim.c:2058 mac80211_hwsim_beacon_tx+0x61e/0xae0 drivers/net/wireless/mac80211_hwsim.c:2121 __iterate_interfaces+0x243/0x500 net/mac80211/util.c:788 ieee80211_iterate_active_interfaces_atomic+0xd7/0x170 net/mac80211/util.c:824 mac80211_hwsim_beacon+0xb7/0x1b0 drivers/net/wireless/mac80211_hwsim.c:2147 __run_hrtimer kernel/time/hrtimer.c:1752 [inline] __hrtimer_run_queues+0x554/0xd60 kernel/time/hrtimer.c:1816 hrtimer_run_softirq+0x183/0x2a0 kernel/time/hrtimer.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 Freed by task 4521: 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] kfree_skb_reason+0x163/0x370 net/core/skbuff.c:893 kfree_skb include/linux/skbuff.h:1220 [inline] ieee80211_iface_work+0x7b3/0xc80 net/mac80211/iface.c:1727 process_one_work+0x898/0x1160 kernel/workqueue.c:2292 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 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 call_rcu+0x154/0x980 kernel/rcu/tree.c:2849 fib6_info_release include/net/ip6_fib.h:340 [inline] ip6_route_info_create+0x9c5/0x1210 net/ipv6/route.c:3876 ip6_route_add+0x24/0x130 net/ipv6/route.c:3890 addrconf_add_mroute net/ipv6/addrconf.c:2507 [inline] addrconf_add_dev+0x253/0x330 net/ipv6/addrconf.c:2525 inet6_addr_add+0x19a/0x9b0 net/ipv6/addrconf.c:2982 inet6_rtm_newaddr+0x617/0x870 net/ipv6/addrconf.c:4979 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 The buggy address belongs to the object at ffff888075267c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of 512-byte region [ffff888075267c00, ffff888075267e00) The buggy address belongs to the physical page: page:ffffea0001d49900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x75264 head:ffffea0001d49900 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 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 89321214872, free_ts 89319470239 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 cfg80211_register_netdevice+0x1b7/0x2f0 net/wireless/core.c:1458 ieee80211_if_add+0xa37/0x1590 net/mac80211/iface.c:2300 ieee80211_register_hw+0x2d46/0x38c0 net/mac80211/main.c:1402 mac80211_hwsim_new_radio+0x28c2/0x4c40 drivers/net/wireless/mac80211_hwsim.c:4587 hwsim_new_radio_nl+0xafa/0xce0 drivers/net/wireless/mac80211_hwsim.c:5181 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] __proc_create+0x36c/0x8d0 fs/proc/generic.c:426 proc_create_reg fs/proc/generic.c:553 [inline] proc_create_single_data+0xa2/0x1d0 fs/proc/generic.c:660 snmp6_register_dev+0xba/0x130 net/ipv6/proc.c:257 ipv6_add_dev+0x610/0x1120 net/ipv6/addrconf.c:414 addrconf_notify+0x634/0xf40 net/ipv6/addrconf.c:3601 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline] call_netdevice_notifiers net/core/dev.c:2053 [inline] register_netdevice+0x1600/0x1aa0 net/core/dev.c:10225 cfg80211_register_netdevice+0x155/0x2f0 net/wireless/core.c:1454 ieee80211_if_add+0xa37/0x1590 net/mac80211/iface.c:2300 Memory state around the buggy address: ffff888075267b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888075267b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888075267c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888075267c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888075267d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 74 05 je 0x7 2: e8 de 49 65 f7 call 0xf76549e5 7: 48 c7 44 24 20 00 00 movq $0x0,0x20(%rsp) e: 00 00 10: 9c pushf 11: 8f 44 24 20 pop 0x20(%rsp) 15: f6 44 24 21 02 testb $0x2,0x21(%rsp) 1a: 75 4b jne 0x67 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 b6 c4 35 f7 call 0xf735c4e5 <-- trapping instruction 2f: 65 8b 05 87 85 e0 75 mov %gs:0x75e08587(%rip),%eax # 0x75e085bd 36: 85 c0 test %eax,%eax 38: 74 3c je 0x76 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss