================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 Read of size 8 at addr ffffc90001a6fb00 by task syz-executor173/3592 CPU: 1 PID: 3592 Comm: syz-executor173 Not tainted 5.17.0-rc7-syzkaller-00020-gea4424be1688 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x65/0x3a0 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report+0x19a/0x1f0 mm/kasan/report.c:459 profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 profile_tick+0xcd/0x120 kernel/profile.c:336 tick_sched_handle kernel/time/tick-sched.c:227 [inline] tick_sched_timer+0x287/0x420 kernel/time/tick-sched.c:1428 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x4cb/0xa60 kernel/time/hrtimer.c:1749 hrtimer_interrupt+0x3b3/0x1040 kernel/time/hrtimer.c:1811 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline] __sysvec_apic_timer_interrupt+0xf9/0x270 arch/x86/kernel/apic/apic.c:1103 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 c2 49 b4 f7 f6 44 24 21 02 75 4e 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 27 f1 3c f7 65 8b 05 88 67 e4 75 85 c0 74 3f 48 c7 04 24 0e 36 RSP: 0018:ffffc90001a6fb00 EFLAGS: 00000206 RAX: 1e0f832d4935d800 RBX: 1ffff9200034df64 RCX: ffffffff81674de1 RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000001 RBP: ffffc90001a6fba0 R08: dffffc0000000000 R09: fffffbfff1ffbbc9 R10: fffffbfff1ffbbc9 R11: 0000000000000000 R12: dffffc0000000000 R13: 1ffff9200034df60 R14: ffffc90001a6fb20 R15: 0000000000000246 spin_unlock_irqrestore include/linux/spinlock.h:404 [inline] ref_tracker_dir_exit+0x212/0x470 lib/ref_tracker.c:37 __put_net+0x15/0x60 net/core/net_namespace.c:642 put_net include/net/net_namespace.h:268 [inline] put_net_track include/net/net_namespace.h:342 [inline] __sk_destruct+0x4b6/0x850 net/core/sock.c:2044 tun_detach drivers/net/tun.c:693 [inline] tun_chr_close+0xed/0x130 drivers/net/tun.c:3405 __fput+0x3fc/0x870 fs/file_table.c:317 task_work_run+0x146/0x1c0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0x63b/0x22f0 kernel/exit.c:806 do_group_exit+0x2af/0x2b0 kernel/exit.c:935 __do_sys_exit_group+0x13/0x20 kernel/exit.c:946 __se_sys_exit_group+0x10/0x10 kernel/exit.c:944 __x64_sys_exit_group+0x37/0x40 kernel/exit.c:944 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f8caf2dcb99 Code: Unable to access opcode bytes at RIP 0x7f8caf2dcb6f. RSP: 002b:00007ffceebdf308 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007f8caf35f450 RCX: 00007f8caf2dcb99 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001 RBP: 0000000000000001 R08: ffffffffffffffb8 R09: 00007ffceebdf400 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8caf35f450 R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 addr ffffc90001a6fb00 is located in stack of task syz-executor173/3592 at offset 0 in frame: _raw_spin_unlock_irqrestore+0x0/0x130 kernel/locking/spinlock.c:187 this frame has 1 object: [32, 40) 'flags.i.i.i.i' Memory state around the buggy address: ffffc90001a6fa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90001a6fa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90001a6fb00: f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc90001a6fb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90001a6fc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 9c pushfq 1: 8f 44 24 20 popq 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 c2 49 b4 f7 callq 0xf7b449d6 14: f6 44 24 21 02 testb $0x2,0x21(%rsp) 19: 75 4e jne 0x69 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 27 f1 3c f7 callq 0xf73cf156 <-- trapping instruction 2f: 65 8b 05 88 67 e4 75 mov %gs:0x75e46788(%rip),%eax # 0x75e467be 36: 85 c0 test %eax,%eax 38: 74 3f je 0x79 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss