================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 Read of size 8 at addr ffffc90001aaf120 by task syz-executor135/3598 CPU: 1 PID: 3598 Comm: syz-executor135 Not tainted 5.17.0-rc4-syzkaller-00052-g359303076163 #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 12 fa b2 f7 f6 44 24 21 02 75 4e 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 e7 90 3b f7 65 8b 05 88 e7 e2 75 85 c0 74 3f 48 c7 04 24 0e 36 RSP: 0018:ffffc90001aaf120 EFLAGS: 00000206 RAX: 899bd1baf80f3600 RBX: 1ffff92000355e28 RCX: ffffffff81676751 RDX: dffffc0000000000 RSI: 0000000000000002 RDI: 0000000000000001 RBP: ffffc90001aaf1b0 R08: dffffc0000000000 R09: fffffbfff1ffb7c6 R10: fffffbfff1ffb7c6 R11: 0000000000000000 R12: dffffc0000000000 R13: 1ffff92000355e24 R14: ffffc90001aaf140 R15: 0000000000000246 __debug_object_init+0x830/0x1860 lib/debugobjects.c:605 debug_object_init lib/debugobjects.c:620 [inline] debug_object_activate+0x188/0x6a0 lib/debugobjects.c:706 debug_rcu_head_queue kernel/rcu/rcu.h:176 [inline] kvfree_call_rcu+0xb3/0x880 kernel/rcu/tree.c:3582 drop_sysctl_table+0x2cd/0x400 fs/proc/proc_sysctl.c:1705 drop_sysctl_table+0x2eb/0x400 fs/proc/proc_sysctl.c:1708 unregister_sysctl_table+0x86/0x130 fs/proc/proc_sysctl.c:1743 neigh_sysctl_unregister+0x74/0x90 net/core/neighbour.c:3812 devinet_sysctl_unregister net/ipv4/devinet.c:2633 [inline] inetdev_destroy net/ipv4/devinet.c:326 [inline] inetdev_event+0x774/0x1410 net/ipv4/devinet.c:1600 notifier_call_chain kernel/notifier.c:84 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:392 call_netdevice_notifiers_info net/core/dev.c:1919 [inline] call_netdevice_notifiers_extack net/core/dev.c:1931 [inline] call_netdevice_notifiers net/core/dev.c:1945 [inline] unregister_netdevice_many+0xfae/0x19e0 net/core/dev.c:10415 unregister_netdevice_queue+0x2e6/0x350 net/core/dev.c:10349 unregister_netdevice include/linux/netdevice.h:2902 [inline] __tun_detach+0x642/0x1d40 drivers/net/tun.c:676 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:313 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:0x7f201cacb509 Code: Unable to access opcode bytes at RIP 0x7f201cacb4df. RSP: 002b:00007ffe3db5cb18 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007f201cb55470 RCX: 00007f201cacb509 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001 RBP: 0000000000000001 R08: ffffffffffffffb8 R09: 00007ffe00000003 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f201cb55470 R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 addr ffffc90001aaf120 is located in stack of task syz-executor135/3598 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: ffffc90001aaf000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90001aaf080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90001aaf100: 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 ^ ffffc90001aaf180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90001aaf200: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ================================================================== ---------------- 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 12 fa b2 f7 callq 0xf7b2fa26 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 e7 90 3b f7 callq 0xf73b9116 <-- trapping instruction 2f: 65 8b 05 88 e7 e2 75 mov %gs:0x75e2e788(%rip),%eax # 0x75e2e7be 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