================================================================== BUG: KASAN: slab-use-after-free in timer_is_static_object+0x80/0x90 kernel/time/timer.c:691 Read of size 8 at addr ffff888062f02c98 by task syz.8.3030/17774 CPU: 1 UID: 0 PID: 17774 Comm: syz.8.3030 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 timer_is_static_object+0x80/0x90 kernel/time/timer.c:691 lookup_object_or_alloc.part.0+0x420/0x590 lib/debugobjects.c:679 lookup_object_or_alloc lib/debugobjects.c:665 [inline] debug_object_activate+0x326/0x4c0 lib/debugobjects.c:820 debug_timer_activate kernel/time/timer.c:793 [inline] __mod_timer+0x814/0xd30 kernel/time/timer.c:1124 add_timer+0x62/0x90 kernel/time/timer.c:1249 call_timer_fn+0x19a/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:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:lock_release+0x24/0x2f0 kernel/locking/lockdep.c:5876 Code: 90 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 41 55 41 54 49 89 f4 53 48 89 fb 48 83 ec 18 65 48 8b 05 39 ed 08 12 48 89 44 24 10 <31> c0 0f 1f 44 00 00 65 8b 05 52 ed 08 12 83 f8 07 0f 87 38 02 00 RSP: 0018:ffffc9000c2ff438 EFLAGS: 00000292 RAX: 38cbe6c9fcc61900 RBX: ffff8880413ed430 RCX: ffffc9000d9dd000 RDX: 0000000000080000 RSI: ffffffff81ffd842 RDI: ffff8880413ed430 RBP: 0000000000000342 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff81ffd842 R13: 0000000000000000 R14: 0000000000000000 R15: ffff8880413ed418 __raw_spin_unlock include/linux/spinlock_api_smp.h:141 [inline] _raw_spin_unlock+0x16/0x50 kernel/locking/spinlock.c:186 spin_unlock include/linux/spinlock.h:391 [inline] shmem_recalc_inode+0x172/0x1a0 mm/shmem.c:462 shmem_alloc_and_add_folio+0x82d/0xc20 mm/shmem.c:1970 shmem_get_folio_gfp+0x67f/0x1610 mm/shmem.c:2535 shmem_fault+0x1fe/0xa30 mm/shmem.c:2736 __do_fault+0x10d/0x490 mm/memory.c:5281 do_read_fault mm/memory.c:5716 [inline] do_fault mm/memory.c:5850 [inline] do_pte_missing+0xf4a/0x3ba0 mm/memory.c:4362 handle_pte_fault mm/memory.c:6195 [inline] __handle_mm_fault+0x1556/0x2aa0 mm/memory.c:6336 handle_mm_fault+0x589/0xd10 mm/memory.c:6505 faultin_page mm/gup.c:1126 [inline] __get_user_pages+0x54e/0x3530 mm/gup.c:1428 populate_vma_page_range+0x267/0x3f0 mm/gup.c:1860 __mm_populate+0x1d8/0x380 mm/gup.c:1963 mm_populate include/linux/mm.h:3478 [inline] vm_mmap_pgoff+0x37f/0x470 mm/util.c:586 ksys_mmap_pgoff+0x7d/0x5c0 mm/mmap.c:604 __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/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc16db8f749 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:00007fc16eae2038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007fc16dde5fa0 RCX: 00007fc16db8f749 RDX: b635773f06ebbeee RSI: 0000000000b36000 RDI: 0000200000000000 RBP: 00007fc16dc13f91 R08: ffffffffffffffff R09: 0000000000003000 R10: 0000000000008031 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc16dde6038 R14: 00007fc16dde5fa0 R15: 00007ffd726741f8 Allocated by task 15642: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:417 kmalloc_noprof include/linux/slab.h:957 [inline] rose_add_node net/rose/rose_route.c:85 [inline] rose_rt_ioctl+0x880/0x2580 net/rose/rose_route.c:748 rose_ioctl+0x64d/0x7c0 net/rose/af_rose.c:1381 sock_do_ioctl+0x118/0x280 net/socket.c:1254 sock_ioctl+0x227/0x6b0 net/socket.c:1375 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 0: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 __kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2543 [inline] slab_free mm/slub.c:6642 [inline] kfree+0x2b8/0x6d0 mm/slub.c:6849 rose_neigh_put include/net/rose.h:166 [inline] rose_timer_expiry+0x53f/0x630 net/rose/rose_timer.c:183 call_timer_fn+0x19a/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:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 The buggy address belongs to the object at ffff888062f02c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 152 bytes inside of freed 512-byte region [ffff888062f02c00, ffff888062f02e00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x62f00 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 ffff88813ffa6c80 ffffea0001628c00 dead000000000002 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88813ffa6c80 ffffea0001628c00 dead000000000002 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea00018bc001 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 13, tgid 13 (kworker/u8:1), ts 755089056955, free_ts 754699270222 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1845 prep_new_page mm/page_alloc.c:1853 [inline] get_page_from_freelist+0x10a3/0x3a30 mm/page_alloc.c:3879 __alloc_frozen_pages_noprof+0x25f/0x2470 mm/page_alloc.c:5178 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3059 [inline] allocate_slab mm/slub.c:3232 [inline] new_slab+0x24a/0x360 mm/slub.c:3286 ___slab_alloc+0xd79/0x1a50 mm/slub.c:4655 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4778 __slab_alloc_node mm/slub.c:4854 [inline] slab_alloc_node mm/slub.c:5276 [inline] __kmalloc_cache_noprof+0x477/0x780 mm/slub.c:5766 kmalloc_noprof include/linux/slab.h:957 [inline] batadv_forw_packet_alloc+0x3ad/0x4e0 net/batman-adv/send.c:506 batadv_iv_ogm_aggregate_new+0x13c/0x4c0 net/batman-adv/bat_iv_ogm.c:570 batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:677 [inline] batadv_iv_ogm_schedule_buff+0x9c2/0x14c0 net/batman-adv/bat_iv_ogm.c:841 batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:873 [inline] batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:866 [inline] batadv_iv_send_outstanding_bat_ogm_packet+0x329/0x920 net/batman-adv/bat_iv_ogm.c:1709 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158 page last free pid 5871 tgid 5871 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0x7df/0x1160 mm/page_alloc.c:2901 vfree+0x1fd/0xb50 mm/vmalloc.c:3440 delayed_vfree_work+0x56/0x70 mm/vmalloc.c:3359 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888062f02b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888062f02c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888062f02c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888062f02d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888062f02d80: 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: f3 0f 1e fa endbr64 a: 41 57 push %r15 c: 41 56 push %r14 e: 41 55 push %r13 10: 41 54 push %r12 12: 49 89 f4 mov %rsi,%r12 15: 53 push %rbx 16: 48 89 fb mov %rdi,%rbx 19: 48 83 ec 18 sub $0x18,%rsp 1d: 65 48 8b 05 39 ed 08 mov %gs:0x1208ed39(%rip),%rax # 0x1208ed5e 24: 12 25: 48 89 44 24 10 mov %rax,0x10(%rsp) * 2a: 31 c0 xor %eax,%eax <-- trapping instruction 2c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 31: 65 8b 05 52 ed 08 12 mov %gs:0x1208ed52(%rip),%eax # 0x1208ed8a 38: 83 f8 07 cmp $0x7,%eax 3b: 0f .byte 0xf 3c: 87 38 xchg %edi,(%rax) 3e: 02 00 add (%rax),%al