================================================================== BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x464/0x4a0 net/rose/rose_timer.c:183 Read of size 2 at addr ffff88807ebc982a by task swapper/1/0 CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.14.0-rc3-syzkaller-00607-g5d6ba5ab8582 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 rose_timer_expiry+0x464/0x4a0 net/rose/rose_timer.c:183 call_timer_fn+0x187/0x650 kernel/time/timer.c:1789 expire_timers kernel/time/timer.c:1840 [inline] __run_timers kernel/time/timer.c:2414 [inline] __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2426 run_timer_base kernel/time/timer.c:2435 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2445 handle_softirqs+0x2d4/0x9b0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0xf7/0x220 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:native_irq_disable arch/x86/include/asm/irqflags.h:37 [inline] RIP: 0010:arch_local_irq_disable arch/x86/include/asm/irqflags.h:92 [inline] RIP: 0010:acpi_safe_halt+0x21/0x30 drivers/acpi/processor_idle.c:112 Code: 90 90 90 90 90 90 90 90 90 65 48 8b 04 25 80 d6 03 00 48 f7 00 08 00 00 00 75 10 66 90 0f 00 2d 85 ef 81 00 f3 0f 1e fa fb f4 c3 cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 RSP: 0018:ffffc900001a7d08 EFLAGS: 00000246 RAX: ffff88801de80000 RBX: ffff8880212bc064 RCX: 000000000006d911 RDX: 0000000000000001 RSI: ffff8880212bc000 RDI: ffff8880212bc064 RBP: 000000000003aab8 R08: ffff8880b873799b R09: 1ffff110170e6f33 R10: dffffc0000000000 R11: ffffffff8c089010 R12: ffff88801d727800 R13: 0000000000000001 R14: 0000000000000001 R15: ffffffff8f3377e0 acpi_idle_enter+0xe4/0x140 drivers/acpi/processor_idle.c:699 cpuidle_enter_state+0x109/0x470 drivers/cpuidle/cpuidle.c:268 cpuidle_enter+0x5d/0xa0 drivers/cpuidle/cpuidle.c:389 call_cpuidle kernel/sched/idle.c:155 [inline] cpuidle_idle_call kernel/sched/idle.c:230 [inline] do_idle+0x372/0x5c0 kernel/sched/idle.c:325 cpu_startup_entry+0x42/0x60 kernel/sched/idle.c:423 start_secondary+0x102/0x110 arch/x86/kernel/smpboot.c:315 common_startup_64+0x13e/0x147 Allocated by task 14730: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x243/0x390 mm/slub.c:4325 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] mca_alloc net/ipv6/mcast.c:884 [inline] __ipv6_dev_mc_inc+0x431/0xac0 net/ipv6/mcast.c:975 ipv6_add_dev+0xe03/0x1220 net/ipv6/addrconf.c:468 addrconf_notify+0x6a7/0x1020 net/ipv6/addrconf.c:3646 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2251 [inline] call_netdevice_notifiers net/core/dev.c:2265 [inline] register_netdevice+0x16b5/0x1b60 net/core/dev.c:10992 register_netdev+0x40/0x50 net/core/dev.c:11070 loopback_net_init+0x73/0x150 drivers/net/loopback.c:217 ops_init+0x349/0x5b0 net/core/net_namespace.c:138 setup_net+0x287/0x9e0 net/core/net_namespace.c:362 copy_net_ns+0x33f/0x570 net/core/net_namespace.c:516 create_new_namespaces+0x425/0x7b0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x124/0x180 kernel/nsproxy.c:228 ksys_unshare+0x57d/0xa70 kernel/fork.c:3342 __do_sys_unshare kernel/fork.c:3413 [inline] __se_sys_unshare kernel/fork.c:3411 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3411 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 3518: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free_freelist_hook mm/slub.c:2382 [inline] slab_free_bulk mm/slub.c:4633 [inline] kmem_cache_free_bulk+0x2d8/0x530 mm/slub.c:4997 kfree_bulk include/linux/slab.h:790 [inline] kvfree_rcu_bulk+0xd3/0x1d0 mm/slab_common.c:1498 kvfree_rcu_drain_ready mm/slab_common.c:1682 [inline] kfree_rcu_monitor+0x20a/0x2a0 mm/slab_common.c:1755 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xaa/0xc0 mm/kasan/generic.c:548 kvfree_call_rcu+0xa9/0x3e0 mm/slab_common.c:1947 ipv6_mc_destroy_dev+0x3b6/0x580 net/ipv6/mcast.c:2862 addrconf_ifdown+0x1619/0x1b00 net/ipv6/addrconf.c:3992 addrconf_notify+0x3cb/0x1020 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2251 [inline] call_netdevice_notifiers net/core/dev.c:2265 [inline] unregister_netdevice_many_notify+0x1179/0x2070 net/core/dev.c:11911 unregister_netdevice_many net/core/dev.c:11975 [inline] default_device_exit_batch+0x7ff/0x880 net/core/dev.c:12458 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x8ad/0xd60 net/core/net_namespace.c:652 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff88807ebc9800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of freed 512-byte region [ffff88807ebc9800, ffff88807ebc9a00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88807ebcb800 pfn:0x7ebc8 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 ffff88801b041c80 ffffea0001c01b10 ffffea00009e3510 raw: ffff88807ebcb800 000000000010000f 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801b041c80 ffffea0001c01b10 ffffea00009e3510 head: ffff88807ebcb800 000000000010000f 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001faf201 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 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 11, tgid 11 (kworker/u8:0), ts 65301328006, free_ts 65103735557 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2587 new_slab mm/slub.c:2640 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3826 __slab_alloc+0x58/0xa0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] __kmalloc_cache_noprof+0x27b/0x390 mm/slub.c:4320 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] mca_alloc net/ipv6/mcast.c:884 [inline] __ipv6_dev_mc_inc+0x431/0xac0 net/ipv6/mcast.c:975 addrconf_join_solict net/ipv6/addrconf.c:2240 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4095 [inline] addrconf_dad_work+0x44f/0x16a0 net/ipv6/addrconf.c:4223 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xabe/0x18e0 kernel/workqueue.c:3317 worker_thread+0x870/0xd30 kernel/workqueue.c:3398 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 5835 tgid 5835 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe0d/0x10e0 mm/page_alloc.c:2660 discard_slab mm/slub.c:2684 [inline] __put_partials+0x160/0x1c0 mm/slub.c:3153 put_cpu_partial+0x17c/0x250 mm/slub.c:3228 __slab_free+0x290/0x380 mm/slub.c:4479 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4115 [inline] slab_alloc_node mm/slub.c:4164 [inline] __kmalloc_cache_noprof+0x1d9/0x390 mm/slub.c:4320 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] ref_tracker_alloc+0x14b/0x490 lib/ref_tracker.c:203 __netdev_tracker_alloc include/linux/netdevice.h:4283 [inline] netdev_tracker_alloc include/linux/netdevice.h:4295 [inline] netdev_get_by_index+0x7a/0xb0 net/core/dev.c:991 fib6_nh_init+0x1d8/0x2180 net/ipv6/route.c:3548 ip6_route_info_create+0x999/0x12b0 net/ipv6/route.c:3814 ip6_route_add+0x28/0x160 net/ipv6/route.c:3858 addrconf_prefix_route net/ipv6/addrconf.c:2485 [inline] inet6_addr_add+0x7ed/0xe30 net/ipv6/addrconf.c:3050 inet6_rtm_newaddr+0xa89/0xf10 net/ipv6/addrconf.c:5054 rtnetlink_rcv_msg+0x791/0xcf0 net/core/rtnetlink.c:6917 Memory state around the buggy address: ffff88807ebc9700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807ebc9780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807ebc9800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807ebc9880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807ebc9900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 90 nop 4: 90 nop 5: 90 nop 6: 90 nop 7: 90 nop 8: 90 nop 9: 65 48 8b 04 25 80 d6 mov %gs:0x3d680,%rax 10: 03 00 12: 48 f7 00 08 00 00 00 testq $0x8,(%rax) 19: 75 10 jne 0x2b 1b: 66 90 xchg %ax,%ax 1d: 0f 00 2d 85 ef 81 00 verw 0x81ef85(%rip) # 0x81efa9 24: f3 0f 1e fa endbr64 28: fb sti 29: f4 hlt * 2a: fa cli <-- trapping instruction 2b: c3 ret 2c: cc int3 2d: cc int3 2e: cc int3 2f: cc int3 30: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 37: 00 00 39: 90 nop 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop