================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0xd2/0x170 arch/x86/kernel/time.c:42 Read of size 8 at addr ffffc90000a17d00 by task syz.0.695/7629 CPU: 1 PID: 7629 Comm: syz.0.695 Not tainted 6.10.0-rc5-syzkaller-00175-g6d6444ba8205 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 profile_pc+0xd2/0x170 arch/x86/kernel/time.c:42 profile_tick+0xd7/0x150 kernel/profile.c:339 tick_sched_handle kernel/time/tick-sched.c:277 [inline] tick_nohz_handler+0x386/0x500 kernel/time/tick-sched.c:297 __run_hrtimer kernel/time/hrtimer.c:1687 [inline] __hrtimer_run_queues+0x551/0xd50 kernel/time/hrtimer.c:1751 hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1813 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline] __sysvec_apic_timer_interrupt+0x110/0x3f0 arch/x86/kernel/apic/apic.c:1049 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x52/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd8/0x140 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 be 78 70 f6 f6 44 24 21 02 75 52 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 a3 7f dd f5 65 8b 05 e4 b7 7b 74 85 c0 74 43 48 c7 04 24 0e 36 RSP: 0018:ffffc90000a17d00 EFLAGS: 00000206 RAX: beb07f315bccfa00 RBX: 1ffff92000142fa4 RCX: ffffffff8172d8fa RDX: dffffc0000000000 RSI: ffffffff8bcabb40 RDI: 0000000000000001 RBP: ffffc90000a17d90 R08: ffffffff92f71647 R09: 1ffffffff25ee2c8 R10: dffffc0000000000 R11: fffffbfff25ee2c9 R12: dffffc0000000000 R13: 1ffff92000142fa0 R14: ffffc90000a17d20 R15: 0000000000000246 __debug_check_no_obj_freed lib/debugobjects.c:998 [inline] debug_check_no_obj_freed+0x561/0x580 lib/debugobjects.c:1019 slab_free_hook mm/slub.c:2163 [inline] slab_free mm/slub.c:4438 [inline] kfree+0x10f/0x360 mm/slub.c:4559 ieee80211_inform_bss+0xbb2/0x1080 net/mac80211/scan.c:160 rdev_inform_bss net/wireless/rdev-ops.h:418 [inline] cfg80211_inform_single_bss_data+0x1121/0x2360 net/wireless/scan.c:2293 cfg80211_inform_bss_data+0x3dd/0x5a70 net/wireless/scan.c:3117 cfg80211_inform_bss_frame_data+0x3bc/0x720 net/wireless/scan.c:3207 ieee80211_bss_info_update+0x8a7/0xbc0 net/mac80211/scan.c:226 ieee80211_scan_rx+0x526/0x9c0 net/mac80211/scan.c:340 __ieee80211_rx_handle_packet net/mac80211/rx.c:5222 [inline] ieee80211_rx_list+0x2b00/0x3780 net/mac80211/rx.c:5459 ieee80211_rx_napi+0x18a/0x3c0 net/mac80211/rx.c:5482 ieee80211_rx include/net/mac80211.h:5093 [inline] ieee80211_handle_queued_frames+0xe7/0x1e0 net/mac80211/main.c:437 tasklet_action_common+0x321/0x4d0 kernel/softirq.c:785 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:26 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:173 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x11/0x70 kernel/kcov.c:207 Code: 5b e9 03 f7 56 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 8b 04 24 65 48 8b 0c 25 80 d4 03 00 <65> 8b 15 20 ab 6d 7e f7 c2 00 01 ff 00 74 11 f7 c2 00 01 00 00 74 RSP: 0018:ffffc90012986df8 EFLAGS: 00000246 RAX: ffffffff820450aa RBX: dffffc0000000000 RCX: ffff888020a45a00 RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff888017a607ec RBP: ffff888017a607ec R08: ffff888017a607ef R09: 1ffff11002f4c0fd R10: dffffc0000000000 R11: ffffed1002f4c0fe R12: ffff888017a607a0 R13: 1ffffffff28fadd0 R14: 0000000000000000 R15: 0000000000000000 __page_table_check_zero+0x19a/0x350 mm/page_table_check.c:158 page_table_check_free include/linux/page_table_check.h:41 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_folios+0xf26/0x19c0 mm/page_alloc.c:2637 folios_put_refs+0x93a/0xa60 mm/swap.c:1024 free_pages_and_swap_cache+0x2ea/0x690 mm/swap_state.c:329 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 zap_pte_range mm/memory.c:1685 [inline] zap_pmd_range mm/memory.c:1724 [inline] zap_pud_range mm/memory.c:1753 [inline] zap_p4d_range mm/memory.c:1774 [inline] unmap_page_range+0x36f2/0x40f0 mm/memory.c:1795 unmap_vmas+0x3cc/0x5f0 mm/memory.c:1885 exit_mmap+0x264/0xc80 mm/mmap.c:3341 __mmput+0x115/0x3c0 kernel/fork.c:1346 exit_mm+0x220/0x310 kernel/exit.c:565 do_exit+0x9aa/0x27e0 kernel/exit.c:861 do_group_exit+0x207/0x2c0 kernel/exit.c:1023 get_signal+0x16a1/0x1740 kernel/signal.c:2909 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f84c0575b29 Code: Unable to access opcode bytes at 0x7f84c0575aff. RSP: 002b:00007f84c138f048 EFLAGS: 00000246 ORIG_RAX: 0000000000000097 RAX: 0000000000000000 RBX: 00007f84c0703fa0 RCX: 00007f84c0575b29 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: 00007f84c05f6756 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f84c0703fa0 R15: 00007ffc9be31578 The buggy address belongs to the virtual mapping at [ffffc90000a11000, ffffc90000a1a000) created by: map_irq_stack arch/x86/kernel/irq_64.c:49 [inline] irq_init_percpu_irqstack+0x356/0x4d0 arch/x86/kernel/irq_64.c:76 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xb9508 flags: 0xfff00000002000(reserved|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002000 ffffea0002e54208 ffffea0002e54208 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffffc90000a17c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90000a17c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90000a17d00: f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc90000a17d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90000a17e00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 f3 f3 f3 ================================================================== ---------------- Code disassembly (best guess): 0: 9c pushf 1: 8f 44 24 20 pop 0x20(%rsp) 5: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1) a: 74 08 je 0x14 c: 4c 89 f7 mov %r14,%rdi f: e8 be 78 70 f6 call 0xf67078d2 14: f6 44 24 21 02 testb $0x2,0x21(%rsp) 19: 75 52 jne 0x6d 1b: 41 f7 c7 00 02 00 00 test $0x200,%r15d 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 a3 7f dd f5 call 0xf5dd7fd2 <-- trapping instruction 2f: 65 8b 05 e4 b7 7b 74 mov %gs:0x747bb7e4(%rip),%eax # 0x747bb81a 36: 85 c0 test %eax,%eax 38: 74 43 je 0x7d 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss