================================================================== BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x45a/0x4d0 net/rose/rose_timer.c:183 Read of size 2 at addr ffff8880329f082a by task syz.0.2164/15303 CPU: 1 UID: 0 PID: 15303 Comm: syz.0.2164 Not tainted 6.15.0-rc5-syzkaller-00277-g345030986df8 #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:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 rose_timer_expiry+0x45a/0x4d0 net/rose/rose_timer.c:183 call_timer_fn+0x197/0x620 kernel/time/timer.c:1789 expire_timers kernel/time/timer.c:1840 [inline] __run_timers+0x6ef/0x960 kernel/time/timer.c:2414 __run_timer_base kernel/time/timer.c:2426 [inline] __run_timer_base kernel/time/timer.c:2418 [inline] run_timer_base+0x114/0x190 kernel/time/timer.c:2435 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2445 handle_softirqs+0x216/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:1049 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:finish_task_switch.isra.0+0x22a/0xc10 kernel/sched/core.c:5250 Code: fb 09 00 00 44 8b 05 49 b8 fb 0e 45 85 c0 0f 85 be 01 00 00 4c 89 e7 e8 a4 f6 ff ff e8 2f 79 39 00 fb 65 48 8b 1d 8e 82 1a 12 <48> 8d bb 18 16 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 RSP: 0000:ffffc90004b57cf8 EFLAGS: 00000202 RAX: 0000000000001db5 RBX: ffff888012e98000 RCX: ffffffff81c2e5af RDX: 0000000000000000 RSI: ffffffff8dbe14c7 RDI: ffffffff8bf48360 RBP: ffffc90004b57d40 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff9084f617 R11: 0000000000000000 R12: ffff8880b8539dc0 R13: ffff888012e9a440 R14: 0000000000000000 R15: dffffc0000000000 context_switch kernel/sched/core.c:5385 [inline] __schedule+0x1177/0x5de0 kernel/sched/core.c:6767 __schedule_loop kernel/sched/core.c:6845 [inline] schedule+0xe7/0x3a0 kernel/sched/core.c:6860 exit_to_user_mode_loop kernel/entry/common.c:102 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] irqentry_exit_to_user_mode+0xe4/0x280 kernel/entry/common.c:231 asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707 RIP: 0033:0x7fe23f66ea50 Code: 38 44 89 68 fc 8b 43 28 48 83 c4 38 5b 5d 41 5c 41 5d 41 5e 41 5f c3 0f 1f 00 c6 44 24 1e 01 48 89 ee 44 89 e7 4c 89 44 24 10 <4c> 89 54 24 08 e8 46 ef fd ff 4c 8b 54 24 08 4c 8b 44 24 10 84 c0 RSP: 002b:00007ffe756e7670 EFLAGS: 00000246 RAX: 000000000000e5c8 RBX: 00007fe2404e5720 RCX: 0000000000012f60 RDX: ffffffff85017549 RSI: ffffffff85017254 RDI: 0000000000000016 RBP: ffffffff85017254 R08: 00007fe23f9b61f8 R09: 00007fe23f9a2000 R10: 00007fe23e5fb008 R11: 0000000000000016 R12: 0000000000000016 R13: 0000000000000782 R14: ffffffff85017549 R15: 0000000000012f60 Allocated by task 13616: 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 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] kernfs_fop_open+0x244/0xda0 fs/kernfs/file.c:623 do_dentry_open+0x741/0x1c10 fs/open.c:956 vfs_open+0x82/0x3f0 fs/open.c:1086 do_open fs/namei.c:3880 [inline] path_openat+0x1e5e/0x2d40 fs/namei.c:4039 do_filp_open+0x20b/0x470 fs/namei.c:4066 do_sys_openat2+0x11b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 13616: 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:2380 [inline] slab_free mm/slub.c:4642 [inline] kfree+0x2b6/0x4d0 mm/slub.c:4841 kernfs_fop_release+0x12c/0x1e0 fs/kernfs/file.c:768 __fput+0x3ff/0xb70 fs/file_table.c:465 fput_close_sync+0x118/0x260 fs/file_table.c:570 __do_sys_close fs/open.c:1581 [inline] __se_sys_close fs/open.c:1566 [inline] __x64_sys_close+0x8b/0x120 fs/open.c:1566 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880329f0800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of freed 512-byte region [ffff8880329f0800, ffff8880329f0a00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880329f1800 pfn:0x329f0 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801b441c80 ffffea00009dfd10 ffffea0001f30d10 raw: ffff8880329f1800 0000000000100007 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801b441c80 ffffea00009dfd10 ffffea0001f30d10 head: ffff8880329f1800 0000000000100007 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0000ca7c01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 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 5185, tgid 5185 (udevd), ts 30809176069, free_ts 30787352685 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2450 [inline] allocate_slab mm/slub.c:2618 [inline] new_slab+0x244/0x340 mm/slub.c:2672 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3858 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3948 __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] __kmalloc_cache_noprof+0xfb/0x3e0 mm/slub.c:4353 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] kernfs_fop_open+0x244/0xda0 fs/kernfs/file.c:623 do_dentry_open+0x741/0x1c10 fs/open.c:956 vfs_open+0x82/0x3f0 fs/open.c:1086 do_open fs/namei.c:3880 [inline] path_openat+0x1e5e/0x2d40 fs/namei.c:4039 do_filp_open+0x20b/0x470 fs/namei.c:4066 do_sys_openat2+0x11b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 page last free pid 5187 tgid 5187 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/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:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __kmalloc_cache_noprof+0x1f1/0x3e0 mm/slub.c:4353 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] kernfs_fop_open+0x244/0xda0 fs/kernfs/file.c:623 do_dentry_open+0x741/0x1c10 fs/open.c:956 vfs_open+0x82/0x3f0 fs/open.c:1086 do_open fs/namei.c:3880 [inline] path_openat+0x1e5e/0x2d40 fs/namei.c:4039 do_filp_open+0x20b/0x470 fs/namei.c:4066 do_sys_openat2+0x11b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff8880329f0700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880329f0780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880329f0800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880329f0880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880329f0900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: fb sti 1: 09 00 or %eax,(%rax) 3: 00 44 8b 05 add %al,0x5(%rbx,%rcx,4) 7: 49 b8 fb 0e 45 85 c0 movabs $0xbe850fc085450efb,%r8 e: 0f 85 be 11: 01 00 add %eax,(%rax) 13: 00 4c 89 e7 add %cl,-0x19(%rcx,%rcx,4) 17: e8 a4 f6 ff ff call 0xfffff6c0 1c: e8 2f 79 39 00 call 0x397950 21: fb sti 22: 65 48 8b 1d 8e 82 1a mov %gs:0x121a828e(%rip),%rbx # 0x121a82b8 29: 12 * 2a: 48 8d bb 18 16 00 00 lea 0x1618(%rbx),%rdi <-- trapping instruction 31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 38: fc ff df 3b: 48 89 fa mov %rdi,%rdx 3e: 48 rex.W 3f: c1 .byte 0xc1