================================================================== BUG: KASAN: slab-use-after-free in timer_is_static_object+0x80/0x90 kernel/time/timer.c:691 Read of size 8 at addr ffff888048000c98 by task syz.1.5131/22039 CPU: 3 UID: 0 PID: 22039 Comm: syz.1.5131 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 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+0x41d/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+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:_compound_head include/linux/page-flags.h:286 [inline] RIP: 0010:zap_present_ptes mm/memory.c:1564 [inline] RIP: 0010:do_zap_pte_range mm/memory.c:1682 [inline] RIP: 0010:zap_pte_range mm/memory.c:1726 [inline] RIP: 0010:zap_pmd_range mm/memory.c:1818 [inline] RIP: 0010:zap_pud_range mm/memory.c:1847 [inline] RIP: 0010:zap_p4d_range mm/memory.c:1868 [inline] RIP: 0010:unmap_page_range+0xd03/0x42c0 mm/memory.c:1889 Code: c3 52 b4 ff 48 8b 44 24 50 48 8d 78 08 48 89 f8 48 c1 e8 03 42 80 3c 30 00 0f 85 66 2f 00 00 48 8b 44 24 50 31 ff 4c 8b 78 08 <4c> 89 fb 83 e3 01 48 89 de e8 ff 4d b4 ff 48 85 db 0f 85 0e 1a 00 RSP: 0018:ffffc9000468f830 EFLAGS: 00000246 RAX: ffffea000092f480 RBX: ffff888033d20ac0 RCX: ffffffff82073721 RDX: ffff88802475c880 RSI: ffffffff82074c0d RDI: 0000000000000000 RBP: 00000000000000b1 R08: 0000000000000006 R09: 0000000000013dab R10: 0000000000024bd2 R11: 0000000000000000 R12: 00007f6bcf34f000 R13: ffff88804d714a78 R14: dffffc0000000000 R15: 0000000000000000 unmap_single_vma.constprop.0+0x153/0x240 mm/memory.c:1932 unmap_vmas+0x218/0x470 mm/memory.c:1976 exit_mmap+0x1b9/0xb90 mm/mmap.c:1280 __mmput+0x12a/0x410 kernel/fork.c:1129 mmput+0x62/0x70 kernel/fork.c:1152 exit_mm kernel/exit.c:582 [inline] do_exit+0x7c7/0x2bf0 kernel/exit.c:949 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+0x14fa/0x1720 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6bcf78eba9 Code: Unable to access opcode bytes at 0x7f6bcf78eb7f. RSP: 002b:00007fff28d60748 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6bcf78eba9 RDX: 0000000000000064 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007fff28d607ac R08: 0000001d28d6083f R09: 00000000000927c0 R10: 00000000000010d4 R11: 0000000000000246 R12: 0000000000000019 R13: 00000000000927c0 R14: 0000000000054c09 R15: 00007fff28d60800 Allocated by task 6352: 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:388 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:405 kmalloc_noprof include/linux/slab.h:905 [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/0x7d0 net/rose/af_rose.c:1381 sock_do_ioctl+0x115/0x280 net/socket.c:1238 sock_ioctl+0x227/0x6b0 net/socket.c:1359 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl fs/ioctl.c:584 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4e0 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: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:243 [inline] __kasan_slab_free+0x60/0x70 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2422 [inline] slab_free mm/slub.c:4695 [inline] kfree+0x2b4/0x4d0 mm/slub.c:4894 rose_neigh_put include/net/rose.h:166 [inline] rose_timer_expiry+0x53f/0x630 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 The buggy address belongs to the object at ffff888048000c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 152 bytes inside of freed 512-byte region [ffff888048000c00, ffff888048000e00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x48000 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 ffff88801b842c80 ffffea0000ffe000 dead000000000002 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b842c80 ffffea0000ffe000 dead000000000002 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001200001 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 5962, tgid 5962 (syz-executor), ts 55571510004, free_ts 55569214226 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2492 [inline] allocate_slab mm/slub.c:2660 [inline] new_slab+0x247/0x330 mm/slub.c:2714 ___slab_alloc+0xcf2/0x1750 mm/slub.c:3901 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3992 __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] __do_kmalloc_node mm/slub.c:4375 [inline] __kmalloc_noprof+0x2f2/0x510 mm/slub.c:4388 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x14c/0x870 net/ipv6/route.c:3811 addrconf_f6i_alloc+0x2da/0x660 net/ipv6/route.c:4680 fixup_permanent_addr net/ipv6/addrconf.c:3583 [inline] addrconf_permanent_addr net/ipv6/addrconf.c:3622 [inline] addrconf_notify+0x10a1/0x19e0 net/ipv6/addrconf.c:3694 notifier_call_chain+0xb9/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2229 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] __dev_notify_flags+0x12c/0x2e0 net/core/dev.c:9588 netif_change_flags+0x108/0x160 net/core/dev.c:9617 page last free pid 5966 tgid 5966 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 stack_depot_save_flags+0x352/0x9c0 lib/stackdepot.c:727 kasan_save_stack+0x42/0x60 mm/kasan/common.c:48 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:405 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] mca_alloc net/ipv6/mcast.c:876 [inline] __ipv6_dev_mc_inc+0x2f1/0xbc0 net/ipv6/mcast.c:966 ipv6_add_dev+0xbc6/0x15f0 net/ipv6/addrconf.c:475 addrconf_notify+0x53e/0x19e0 net/ipv6/addrconf.c:3650 notifier_call_chain+0xb9/0x410 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:2229 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] register_netdevice+0x182e/0x2270 net/core/dev.c:11244 cfg80211_register_netdevice+0x149/0x340 net/wireless/core.c:1509 ieee80211_if_add+0xc9d/0x1a40 net/mac80211/iface.c:2300 ieee80211_register_hw+0x3904/0x4120 net/mac80211/main.c:1596 mac80211_hwsim_new_radio+0x3034/0x54d0 drivers/net/wireless/virtual/mac80211_hwsim.c:5568 hwsim_new_radio_nl+0xb51/0x12c0 drivers/net/wireless/virtual/mac80211_hwsim.c:6252 Memory state around the buggy address: ffff888048000b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888048000c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888048000c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888048000d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888048000d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: c3 ret 1: 52 push %rdx 2: b4 ff mov $0xff,%ah 4: 48 8b 44 24 50 mov 0x50(%rsp),%rax 9: 48 8d 78 08 lea 0x8(%rax),%rdi d: 48 89 f8 mov %rdi,%rax 10: 48 c1 e8 03 shr $0x3,%rax 14: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1) 19: 0f 85 66 2f 00 00 jne 0x2f85 1f: 48 8b 44 24 50 mov 0x50(%rsp),%rax 24: 31 ff xor %edi,%edi 26: 4c 8b 78 08 mov 0x8(%rax),%r15 * 2a: 4c 89 fb mov %r15,%rbx <-- trapping instruction 2d: 83 e3 01 and $0x1,%ebx 30: 48 89 de mov %rbx,%rsi 33: e8 ff 4d b4 ff call 0xffb44e37 38: 48 85 db test %rbx,%rbx 3b: 0f .byte 0xf 3c: 85 0e test %ecx,(%rsi) 3e: 1a 00 sbb (%rax),%al