================================================================== BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x45a/0x4d0 net/rose/rose_timer.c:183 Read of size 2 at addr ffff888029dbd42a by task syz.0.1903/13220 CPU: 0 UID: 0 PID: 13220 Comm: syz.0.1903 Not tainted 6.15.0-rc5-syzkaller-00022-g01f95500a162 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/29/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+0x19a/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+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: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:const_folio_flags+0x54/0x100 include/linux/page-flags.h:348 Code: 00 00 00 4c 8b 65 08 31 ff 41 83 e4 01 4c 89 e6 e8 61 22 af ff 4d 85 e4 75 29 e8 e7 26 af ff 31 ff 89 de e8 1e 22 af ff 85 db <75> 2e e8 d5 26 af ff 48 c1 e3 06 48 8d 44 1d 00 5b 5d 41 5c e9 8e RSP: 0018:ffffc90004737688 EFLAGS: 00000246 RAX: 0000000000000002 RBX: 0000000000000000 RCX: ffffffff820c0b62 RDX: ffff88807dd63c00 RSI: 0000000000000000 RDI: 0000000000000005 RBP: ffffea000139b600 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000001 R14: 0000000000000027 R15: 0000000000000000 folio_test_head include/linux/page-flags.h:860 [inline] folio_test_large include/linux/page-flags.h:881 [inline] __folio_add_rmap mm/rmap.c:1256 [inline] __folio_add_file_rmap mm/rmap.c:1620 [inline] folio_add_file_rmap_ptes+0x81/0x840 mm/rmap.c:1642 set_pte_range+0x135/0x520 mm/memory.c:5256 finish_fault+0x895/0x1120 mm/memory.c:5382 do_read_fault mm/memory.c:5522 [inline] do_fault mm/memory.c:5652 [inline] do_pte_missing+0x105a/0x3fb0 mm/memory.c:4160 handle_pte_fault mm/memory.c:5997 [inline] __handle_mm_fault+0x103d/0x2a40 mm/memory.c:6140 handle_mm_fault+0x3fe/0xad0 mm/memory.c:6309 faultin_page mm/gup.c:1193 [inline] __get_user_pages+0x771/0x36f0 mm/gup.c:1491 populate_vma_page_range+0x278/0x3a0 mm/gup.c:1929 __mm_populate+0x1d8/0x380 mm/gup.c:2032 mm_populate include/linux/mm.h:3487 [inline] vm_mmap_pgoff+0x362/0x450 mm/util.c:584 ksys_mmap_pgoff+0x7d/0x5c0 mm/mmap.c:607 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:89 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:82 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:82 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 RIP: 0033:0x7f3f8318e969 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:00007f3f8402d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f3f833b5fa0 RCX: 00007f3f8318e969 RDX: b635773f06ebbeee RSI: 0000000000b36000 RDI: 0000200000000000 RBP: 00007f3f83210ab1 R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000008031 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3f833b5fa0 R15: 00007ffe233ba7b8 Allocated by task 6028: 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] mca_alloc net/ipv6/mcast.c:884 [inline] __ipv6_dev_mc_inc+0x2b9/0xc10 net/ipv6/mcast.c:975 addrconf_join_solict net/ipv6/addrconf.c:2242 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4100 [inline] addrconf_dad_work+0x284/0x14e0 net/ipv6/addrconf.c:4228 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c5/0x780 kernel/kthread.c:464 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 4528: 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_freelist_hook mm/slub.c:2409 [inline] slab_free_bulk mm/slub.c:4666 [inline] kmem_cache_free_bulk.part.0+0x38d/0x7f0 mm/slub.c:5243 kfree_bulk include/linux/slab.h:794 [inline] kvfree_rcu_bulk+0x1bb/0x1f0 mm/slab_common.c:1516 kfree_rcu_work+0x124/0x1a0 mm/slab_common.c:1594 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c5/0x780 kernel/kthread.c:464 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xb8/0xd0 mm/kasan/generic.c:548 kvfree_call_rcu+0x76/0x470 mm/slab_common.c:1962 ma_put net/ipv6/mcast.c:873 [inline] ma_put+0xff/0x150 net/ipv6/mcast.c:869 __ipv6_dev_mc_dec+0x2cf/0x3b0 net/ipv6/mcast.c:1024 addrconf_leave_solict net/ipv6/addrconf.c:2254 [inline] __ipv6_ifa_notify+0x3d8/0xd60 net/ipv6/addrconf.c:6299 addrconf_ifdown.isra.0+0xe8b/0x1a90 net/ipv6/addrconf.c:3978 addrconf_notify+0x220/0x19e0 net/ipv6/addrconf.c:3777 notifier_call_chain+0xbc/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2176 call_netdevice_notifiers_extack net/core/dev.c:2214 [inline] call_netdevice_notifiers net/core/dev.c:2228 [inline] dev_close_many+0x319/0x630 net/core/dev.c:1731 unregister_netdevice_many_notify+0x578/0x26f0 net/core/dev.c:11952 unregister_netdevice_many net/core/dev.c:12046 [inline] unregister_netdevice_queue+0x305/0x3f0 net/core/dev.c:11889 unregister_netdevice include/linux/netdevice.h:3374 [inline] __tun_detach+0x1249/0x1540 drivers/net/tun.c:620 tun_detach drivers/net/tun.c:636 [inline] tun_chr_close+0xc2/0x230 drivers/net/tun.c:3390 __fput+0x402/0xb70 fs/file_table.c:465 task_work_run+0x150/0x240 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xafb/0x2c30 kernel/exit.c:953 do_group_exit+0xd3/0x2a0 kernel/exit.c:1102 __do_sys_exit_group kernel/exit.c:1113 [inline] __se_sys_exit_group kernel/exit.c:1111 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1111 x64_sys_call+0x1530/0x1730 arch/x86/include/generated/asm/syscalls_64.h:232 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 ffff888029dbd400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of freed 512-byte region [ffff888029dbd400, ffff888029dbd600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29dbc head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b441c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b441c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0000a76f01 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 5196, tgid 5196 (udevadm), ts 43898764714, free_ts 43874394414 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+0x744/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 5196 tgid 5196 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 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 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] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] kernfs_fop_write_iter+0x237/0x510 fs/kernfs/file.c:311 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5bd/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 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: ffff888029dbd300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888029dbd380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888029dbd400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888029dbd480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888029dbd500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: 00 4c 8b 65 add %cl,0x65(%rbx,%rcx,4) 6: 08 31 or %dh,(%rcx) 8: ff 41 83 incl -0x7d(%rcx) b: e4 01 in $0x1,%al d: 4c 89 e6 mov %r12,%rsi 10: e8 61 22 af ff call 0xffaf2276 15: 4d 85 e4 test %r12,%r12 18: 75 29 jne 0x43 1a: e8 e7 26 af ff call 0xffaf2706 1f: 31 ff xor %edi,%edi 21: 89 de mov %ebx,%esi 23: e8 1e 22 af ff call 0xffaf2246 28: 85 db test %ebx,%ebx * 2a: 75 2e jne 0x5a <-- trapping instruction 2c: e8 d5 26 af ff call 0xffaf2706 31: 48 c1 e3 06 shl $0x6,%rbx 35: 48 8d 44 1d 00 lea 0x0(%rbp,%rbx,1),%rax 3a: 5b pop %rbx 3b: 5d pop %rbp 3c: 41 5c pop %r12 3e: e9 .byte 0xe9 3f: 8e .byte 0x8e