================================================================== BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x45a/0x4d0 net/rose/rose_timer.c:183 Read of size 2 at addr ffff888065f7ac2a by task swapper/0/0 CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.16.0-rc6-syzkaller-00002-g155a3c003e55 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x610 mm/kasan/report.c:480 kasan_report+0xe0/0x110 mm/kasan/report.c:593 rose_timer_expiry+0x45a/0x4d0 net/rose/rose_timer.c:183 call_timer_fn+0x197/0x620 kernel/time/timer.c:1747 expire_timers kernel/time/timer.c:1798 [inline] __run_timers+0x6ef/0x960 kernel/time/timer.c:2372 __run_timer_base kernel/time/timer.c:2384 [inline] __run_timer_base kernel/time/timer.c:2376 [inline] run_timer_base+0x114/0x190 kernel/time/timer.c:2393 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2403 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:steal_cookie_task kernel/sched/core.c:6412 [inline] RIP: 0010:sched_core_balance+0x404/0xd60 kernel/sched/core.c:6432 Code: 89 e8 85 d2 0f 85 d1 04 00 00 4c 39 e8 74 08 48 89 ef e8 ef 6f fe ff 4c 89 f7 e8 e7 6f fe ff e8 22 4f 38 00 fb 80 7c 24 38 00 <0f> 85 9c 00 00 00 8d 4b 01 48 63 d1 48 39 14 24 73 4c 83 f9 08 74 RSP: 0018:ffffffff8e207b78 EFLAGS: 00000246 RAX: 0000000003bf7203 RBX: 0000000000000001 RCX: ffffffff81c3c22f RDX: 0000000000000000 RSI: ffffffff8de32e47 RDI: ffffffff8c158f60 RBP: ffff8880b853a2c0 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff90a98757 R11: ffff8880b853b120 R12: ffff88802a866e80 R13: ffff8880b843a2c0 R14: ffff8880b843a2c0 R15: dffffc0000000000 do_balance_callbacks kernel/sched/core.c:5043 [inline] __balance_callbacks kernel/sched/core.c:5097 [inline] __schedule+0x3fef/0x5de0 kernel/sched/core.c:6789 schedule_idle+0x5c/0x90 kernel/sched/core.c:6905 do_idle+0x2b6/0x510 kernel/sched/idle.c:353 cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:423 rest_init+0x16b/0x2b0 init/main.c:745 start_kernel+0x3ee/0x4d0 init/main.c:1102 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:307 x86_64_start_kernel+0x130/0x190 arch/x86/kernel/head64.c:288 common_startup_64+0x13e/0x148 Allocated by task 11312: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4328 [inline] __kmalloc_noprof+0x223/0x510 mm/slub.c:4340 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x274/0x460 security/tomoyo/file.c:822 tomoyo_path_unlink+0x91/0xe0 security/tomoyo/tomoyo.c:162 security_path_unlink+0x145/0x2b0 security/security.c:1965 do_unlinkat+0x463/0x6a0 fs/namei.c:4656 __do_sys_unlink fs/namei.c:4705 [inline] __se_sys_unlink fs/namei.c:4703 [inline] __x64_sys_unlink+0xc5/0x110 fs/namei.c:4703 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 11312: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x2b4/0x4d0 mm/slub.c:4842 tomoyo_realpath_from_path+0x19f/0x6e0 security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x274/0x460 security/tomoyo/file.c:822 tomoyo_path_unlink+0x91/0xe0 security/tomoyo/tomoyo.c:162 security_path_unlink+0x145/0x2b0 security/security.c:1965 do_unlinkat+0x463/0x6a0 fs/namei.c:4656 __do_sys_unlink fs/namei.c:4705 [inline] __se_sys_unlink fs/namei.c:4703 [inline] __x64_sys_unlink+0xc5/0x110 fs/namei.c:4703 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888065f7a000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3114 bytes inside of freed 4096-byte region [ffff888065f7a000, ffff888065f7b000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x65f78 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b842140 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b842140 0000000000000000 dead000000000001 head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea000197de01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6586, tgid 6586 (kworker/u8:12), ts 800042501133, free_ts 799606107757 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab mm/slub.c:2619 [inline] new_slab+0x23b/0x330 mm/slub.c:2673 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3859 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949 __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kmalloc_node_track_caller_noprof+0x2ee/0x510 mm/slub.c:4347 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:601 __alloc_skb+0x166/0x380 net/core/skbuff.c:670 alloc_skb include/linux/skbuff.h:1336 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:748 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:805 [inline] nsim_dev_trap_report_work+0x2b1/0xcf0 drivers/net/netdevsim/dev.c:851 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c5/0x780 kernel/kthread.c:464 ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 17253 tgid 17253 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 discard_slab mm/slub.c:2717 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3186 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4204 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:322 getname include/linux/fs.h:2907 [inline] do_sys_openat2+0xb8/0x1d0 fs/open.c:1431 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1463 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888065f7ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888065f7ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888065f7ac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888065f7ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888065f7ad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 89 e8 mov %ebp,%eax 2: 85 d2 test %edx,%edx 4: 0f 85 d1 04 00 00 jne 0x4db a: 4c 39 e8 cmp %r13,%rax d: 74 08 je 0x17 f: 48 89 ef mov %rbp,%rdi 12: e8 ef 6f fe ff call 0xfffe7006 17: 4c 89 f7 mov %r14,%rdi 1a: e8 e7 6f fe ff call 0xfffe7006 1f: e8 22 4f 38 00 call 0x384f46 24: fb sti 25: 80 7c 24 38 00 cmpb $0x0,0x38(%rsp) * 2a: 0f 85 9c 00 00 00 jne 0xcc <-- trapping instruction 30: 8d 4b 01 lea 0x1(%rbx),%ecx 33: 48 63 d1 movslq %ecx,%rdx 36: 48 39 14 24 cmp %rdx,(%rsp) 3a: 73 4c jae 0x88 3c: 83 f9 08 cmp $0x8,%ecx 3f: 74 .byte 0x74