================================================================== BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183 Read of size 2 at addr ffff88805f61d02a by task syz.6.418/6634 CPU: 1 PID: 6634 Comm: syz.6.418 Not tainted 5.15.188-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183 call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451 expire_timers kernel/time/timer.c:1496 [inline] __run_timers+0x525/0x7c0 kernel/time/timer.c:1767 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780 handle_softirqs+0x328/0x820 kernel/softirq.c:576 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa5/0x100 kernel/locking/spinlock.c:194 Code: 74 05 e8 be e5 ca 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 86 64 9e f7 65 8b 05 27 64 4f 76 85 c0 74 3c 48 c7 04 24 0e 36 RSP: 0018:ffffc90003d2f5e0 EFLAGS: 00000206 RAX: ce8d792a2ba87700 RBX: 0000000000000a02 RCX: ce8d792a2ba87700 RDX: dffffc0000000000 RSI: ffffffff8a0b15c0 RDI: 0000000000000001 RBP: ffffc90003d2f678 R08: dffffc0000000000 R09: fffffbfff1ff762f R10: fffffbfff1ff762f R11: 1ffffffff1ff762e R12: dffffc0000000000 R13: 1ffff1100b2fab44 R14: ffff8880597d59c8 R15: 1ffff920007a5ebc spin_unlock_irqrestore include/linux/spinlock.h:418 [inline] __skb_try_recv_datagram+0x179/0x4d0 net/core/datagram.c:267 __unix_dgram_recvmsg+0x2d3/0xd50 net/unix/af_unix.c:2315 ____sys_recvmsg+0x291/0x580 net/socket.c:-1 ___sys_recvmsg+0x1af/0x4f0 net/socket.c:2697 do_recvmmsg+0x344/0x7a0 net/socket.c:2791 __sys_recvmmsg net/socket.c:2870 [inline] __do_sys_recvmmsg net/socket.c:2893 [inline] __se_sys_recvmmsg net/socket.c:2886 [inline] __x64_sys_recvmmsg+0x18d/0x240 net/socket.c:2886 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f7dbc299929 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:00007f7dba0e0038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f7dbc4c1080 RCX: 00007f7dbc299929 RDX: 0000000000010106 RSI: 00002000000000c0 RDI: 0000000000000003 RBP: 00007f7dbc31bb39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f7dbc4c1080 R15: 00007fffb620a068 Allocated by task 14: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmalloc_reserve net/core/skbuff.c:356 [inline] __alloc_skb+0x22c/0x750 net/core/skbuff.c:427 skb_copy+0x139/0x790 net/core/skbuff.c:1595 mac80211_hwsim_tx_frame_no_nl+0xcc7/0x15d0 drivers/net/wireless/mac80211_hwsim.c:1569 mac80211_hwsim_tx_frame+0x1b5/0x200 drivers/net/wireless/mac80211_hwsim.c:1788 mac80211_hwsim_beacon_tx+0x4f3/0x920 drivers/net/wireless/mac80211_hwsim.c:1842 __iterate_interfaces+0x243/0x500 net/mac80211/util.c:793 ieee80211_iterate_active_interfaces_atomic+0xb3/0x140 net/mac80211/util.c:829 mac80211_hwsim_beacon+0x9b/0x180 drivers/net/wireless/mac80211_hwsim.c:1865 __run_hrtimer kernel/time/hrtimer.c:1690 [inline] __hrtimer_run_queues+0x53d/0xc40 kernel/time/hrtimer.c:1754 hrtimer_run_softirq+0x176/0x240 kernel/time/hrtimer.c:1771 handle_softirqs+0x328/0x820 kernel/softirq.c:576 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 Last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 kvfree_call_rcu+0x10a/0x7c0 kernel/rcu/tree.c:3600 drop_sysctl_table+0x2fa/0x430 fs/proc/proc_sysctl.c:1681 drop_sysctl_table+0x2e9/0x430 fs/proc/proc_sysctl.c:1684 unregister_sysctl_table+0x87/0x130 fs/proc/proc_sysctl.c:1719 mpls_dev_sysctl_unregister+0x8b/0xc0 net/mpls/af_mpls.c:1445 mpls_dev_notify+0x545/0x780 net/mpls/af_mpls.c:1663 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] unregister_netdevice_many+0xf57/0x18f0 net/core/dev.c:11134 default_device_exit_batch+0x336/0x390 net/core/dev.c:11667 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x77b/0xb80 net/core/net_namespace.c:635 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Second to last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 kvfree_call_rcu+0x10a/0x7c0 kernel/rcu/tree.c:3600 __ipv6_dev_mc_dec+0x2bf/0x320 net/ipv6/mcast.c:982 addrconf_leave_solict net/ipv6/addrconf.c:2214 [inline] __ipv6_ifa_notify+0x70d/0xda0 net/ipv6/addrconf.c:6207 addrconf_ifdown+0xde7/0x1970 net/ipv6/addrconf.c:3905 addrconf_notify+0x445/0xf00 net/ipv6/addrconf.c:-1 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] dev_close_many+0x28d/0x400 net/core/dev.c:1650 unregister_netdevice_many+0x472/0x18f0 net/core/dev.c:11110 ip_tunnel_delete_nets+0x318/0x360 net/ipv4/ip_tunnel.c:1151 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x77b/0xb80 net/core/net_namespace.c:635 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff88805f61d000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of 512-byte region [ffff88805f61d000, ffff88805f61d200) The buggy address belongs to the page: page:ffffea00017d8700 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88805f61e400 pfn:0x5f61c head:ffffea00017d8700 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea000189ee08 ffffea0001786c08 ffff888016841c80 raw: ffff88805f61e400 0000000000100005 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 4183, ts 70177895859, free_ts 21139273190 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1975 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] __kmalloc_node_track_caller+0x1fc/0x3a0 mm/slub.c:4958 kmalloc_reserve net/core/skbuff.c:356 [inline] pskb_expand_head+0x127/0x10f0 net/core/skbuff.c:1709 netlink_trim+0x180/0x220 net/netlink/af_netlink.c:1293 netlink_broadcast_filtered+0x7c/0x1170 net/netlink/af_netlink.c:1498 netlink_broadcast net/netlink/af_netlink.c:1543 [inline] nlmsg_multicast include/net/netlink.h:1033 [inline] nlmsg_notify+0xec/0x1a0 net/netlink/af_netlink.c:2532 fib_table_insert+0x987/0x1b20 net/ipv4/fib_trie.c:1379 fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1106 fib_add_ifaddr+0x140/0x5e0 net/ipv4/fib_frontend.c:1128 fib_inetaddr_event+0x13c/0x1c0 net/ipv4/fib_frontend.c:1442 notifier_call_chain kernel/notifier.c:83 [inline] blocking_notifier_call_chain+0x103/0x1b0 kernel/notifier.c:318 __inet_insert_ifa+0x9e9/0xbc0 net/ipv4/devinet.c:568 inet_rtm_newaddr+0x940/0x1800 net/ipv4/devinet.c:967 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x94/0x280 mm/page_alloc.c:3396 free_contig_range+0x96/0xf0 mm/page_alloc.c:9393 destroy_args+0xef/0x8b0 mm/debug_vm_pgtable.c:1018 debug_vm_pgtable+0x318/0x370 mm/debug_vm_pgtable.c:1331 do_one_initcall+0x1ee/0x680 init/main.c:1302 do_initcall_level+0x137/0x1f0 init/main.c:1375 do_initcalls+0x4b/0x90 init/main.c:1391 kernel_init_freeable+0x3ce/0x560 init/main.c:1615 kernel_init+0x19/0x1b0 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff88805f61cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805f61cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805f61d000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805f61d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805f61d100: 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 be e5 ca f7 call 0xf7cae5c5 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 86 64 9e f7 call 0xf79e64b5 <-- trapping instruction 2f: 65 8b 05 27 64 4f 76 mov %gs:0x764f6427(%rip),%eax # 0x764f645d 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