================================================================== BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183 Read of size 2 at addr ffff88802641d02a by task syz.4.473/6106 CPU: 1 PID: 6106 Comm: syz.4.473 Not tainted 6.1.145-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:finish_task_switch+0x26a/0x8f0 kernel/sched/core.c:5123 Code: 0f 84 3b 01 00 00 48 85 db 0f 85 5a 01 00 00 0f 1f 44 00 00 4c 8b 75 d0 4c 89 e7 e8 00 77 c9 08 e8 9b c1 2e 00 fb 4c 8b 65 c0 <49> 8d bc 24 f8 15 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0 RSP: 0018:ffffc900037d7338 EFLAGS: 00000282 RAX: ab17a021d580c500 RBX: 0000000000000000 RCX: ab17a021d580c500 RDX: dffffc0000000000 RSI: ffffffff8a8c0460 RDI: ffffffff8adf1c20 RBP: ffffc900037d7390 R08: dffffc0000000000 R09: ffffed10171e7551 R10: ffffed10171e7551 R11: 1ffff110171e7550 R12: ffff8880796ed940 R13: dffffc0000000000 R14: ffff888051631dc0 R15: ffff8880b8f3b550 context_switch kernel/sched/core.c:5247 [inline] __schedule+0x10f1/0x40d0 kernel/sched/core.c:6561 schedule+0xb9/0x180 kernel/sched/core.c:6637 schedule_timeout+0x97/0x280 kernel/time/timer.c:1941 unix_wait_for_peer+0x1e5/0x2e0 net/unix/af_unix.c:1449 unix_dgram_sendmsg+0xebf/0x16c0 net/unix/af_unix.c:2049 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] ____sys_sendmsg+0x59b/0x970 net/socket.c:2519 ___sys_sendmsg+0x21c/0x290 net/socket.c:2573 __sys_sendmmsg+0x272/0x490 net/socket.c:2659 __do_sys_sendmmsg net/socket.c:2688 [inline] __se_sys_sendmmsg net/socket.c:2685 [inline] __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2685 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 RIP: 0033:0x7f1a9bb8e929 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:00007f1a9c968038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f1a9bdb5fa0 RCX: 00007f1a9bb8e929 RDX: 0000000000000651 RSI: 0000200000000000 RDI: 0000000000000004 RBP: 00007f1a9bc10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1a9bdb5fa0 R15: 00007ffe801e5238 Allocated by task 5817: 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 The buggy address belongs to the object at ffff88802641d000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of 512-byte region [ffff88802641d000, ffff88802641d200) The buggy address belongs to the physical page: page:ffffea0000990700 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802641ec00 pfn:0x2641c head:ffffea0000990700 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00015c8a08 ffffea00015c0d08 ffff888017441c80 raw: ffff88802641ec00 0000000000100007 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1181, tgid 1181 (kworker/u4:4), ts 9786227537, free_ts 0 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 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:699 [inline] alloc_bprm+0x56/0x730 fs/exec.c:1537 kernel_execve+0x94/0x9c0 fs/exec.c:2004 call_usermodehelper_exec_async+0x207/0x350 kernel/umh.c:113 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 page_owner free stack trace missing Memory state around the buggy address: ffff88802641cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802641cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802641d000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802641d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802641d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 0f 84 3b 01 00 00 je 0x141 6: 48 85 db test %rbx,%rbx 9: 0f 85 5a 01 00 00 jne 0x169 f: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 14: 4c 8b 75 d0 mov -0x30(%rbp),%r14 18: 4c 89 e7 mov %r12,%rdi 1b: e8 00 77 c9 08 call 0x8c97720 20: e8 9b c1 2e 00 call 0x2ec1c0 25: fb sti 26: 4c 8b 65 c0 mov -0x40(%rbp),%r12 * 2a: 49 8d bc 24 f8 15 00 lea 0x15f8(%r12),%rdi <-- trapping instruction 31: 00 32: 48 89 f8 mov %rdi,%rax 35: 48 c1 e8 03 shr $0x3,%rax 39: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax 3e: 84 c0 test %al,%al