================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 Read of size 8 at addr ffff8881e573f540 by task kworker/u4:4/1056 CPU: 0 PID: 1056 Comm: kworker/u4:4 Not tainted 5.4.274-syzkaller-00003-g51e9abf68baf #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 print_address_description+0x8c/0x600 mm/kasan/report.c:384 __kasan_report+0xf3/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 profile_tick+0xb9/0x100 kernel/profile.c:416 tick_sched_handle kernel/time/tick-sched.c:206 [inline] tick_sched_timer+0x237/0x3c0 kernel/time/tick-sched.c:1342 __run_hrtimer kernel/time/hrtimer.c:1581 [inline] __hrtimer_run_queues+0x3e9/0xb90 kernel/time/hrtimer.c:1643 hrtimer_interrupt+0x38a/0x890 kernel/time/hrtimer.c:1705 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1122 [inline] smp_apic_timer_interrupt+0x110/0x460 arch/x86/kernel/apic/apic.c:1147 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834 RIP: 0010:_raw_spin_lock_bh+0xc2/0x1b0 kernel/locking/spinlock.c:176 Code: 89 ff be 04 00 00 00 e8 2c e8 42 fd 43 0f b6 04 26 84 c0 0f 85 aa 00 00 00 8b 44 24 20 b9 01 00 00 00 f0 41 0f b1 4d 00 75 33 <48> c7 04 24 0e 36 e0 45 49 c7 04 1c 00 00 00 00 65 48 8b 04 25 28 RSP: 0018:ffff8881e573f540 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 1ffff1103cae7ea8 RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffff8881e573f560 RBP: ffff8881e573f5d0 R08: dffffc0000000000 R09: 0000000000000003 R10: ffffffffffffffff R11: dffffc0000000001 R12: dffffc0000000000 R13: ffffffff87758020 R14: 1ffff1103cae7eac R15: ffff8881e573f560 spin_lock_bh include/linux/spinlock.h:343 [inline] addrconf_ifdown+0x308/0x1a90 net/ipv6/addrconf.c:3811 addrconf_notify+0x375/0xe50 net/ipv6/addrconf.c:3696 notifier_call_chain kernel/notifier.c:98 [inline] __raw_notifier_call_chain kernel/notifier.c:399 [inline] raw_notifier_call_chain+0x95/0x110 kernel/notifier.c:406 call_netdevice_notifiers_info net/core/dev.c:1670 [inline] call_netdevice_notifiers_extack net/core/dev.c:1682 [inline] call_netdevice_notifiers net/core/dev.c:1696 [inline] dev_close_many+0x354/0x4f0 net/core/dev.c:1439 rollback_registered_many+0x493/0x1330 net/core/dev.c:8608 unregister_netdevice_many net/core/dev.c:9786 [inline] default_device_exit_batch+0x3e0/0x680 net/core/dev.c:10257 ops_exit_list net/core/net_namespace.c:184 [inline] cleanup_net+0x6e2/0xc90 net/core/net_namespace.c:609 process_one_work+0x765/0xd20 kernel/workqueue.c:2290 worker_thread+0xaef/0x1470 kernel/workqueue.c:2436 kthread+0x2da/0x360 kernel/kthread.c:288 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 The buggy address belongs to the page: page:ffffea000795cfc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea0007986008 ffffea000763f9c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x500dc0(GFP_USER|__GFP_ZERO|__GFP_ACCOUNT) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x18f/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4893 __alloc_pages include/linux/gfp.h:503 [inline] __alloc_pages_node include/linux/gfp.h:516 [inline] alloc_pages_node include/linux/gfp.h:530 [inline] alloc_thread_stack_node kernel/fork.c:259 [inline] dup_task_struct+0x85/0x600 kernel/fork.c:886 copy_process+0x56d/0x3230 kernel/fork.c:1889 _do_fork+0x197/0x900 kernel/fork.c:2399 kernel_thread+0x16a/0x1d0 kernel/fork.c:2489 create_kthread kernel/kthread.c:311 [inline] kthreadd+0x3b1/0x4f0 kernel/kthread.c:654 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] free_pcp_prepare mm/page_alloc.c:1233 [inline] free_unref_page_prepare+0x297/0x380 mm/page_alloc.c:3085 free_unref_page mm/page_alloc.c:3134 [inline] free_the_page mm/page_alloc.c:4953 [inline] __free_pages+0xaf/0x140 mm/page_alloc.c:4961 __vunmap+0x75b/0x890 mm/vmalloc.c:2260 kcov_put kernel/kcov.c:396 [inline] kcov_close+0x27/0x50 kernel/kcov.c:495 __fput+0x262/0x680 fs/file_table.c:281 task_work_run+0x140/0x170 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xcaf/0x2bc0 kernel/exit.c:859 do_group_exit+0x138/0x300 kernel/exit.c:982 __do_sys_exit_group kernel/exit.c:993 [inline] __se_sys_exit_group kernel/exit.c:991 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:991 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 addr ffff8881e573f540 is located in stack of task kworker/u4:4/1056 at offset 0 in frame: _raw_spin_lock_bh+0x0/0x1b0 this frame has 1 object: [32, 36) 'val.i.i.i' Memory state around the buggy address: ffff8881e573f400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e573f480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881e573f500: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 f3 f3 ^ ffff8881e573f580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e573f600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 89 ff mov %edi,%edi 2: be 04 00 00 00 mov $0x4,%esi 7: e8 2c e8 42 fd call 0xfd42e838 c: 43 0f b6 04 26 movzbl (%r14,%r12,1),%eax 11: 84 c0 test %al,%al 13: 0f 85 aa 00 00 00 jne 0xc3 19: 8b 44 24 20 mov 0x20(%rsp),%eax 1d: b9 01 00 00 00 mov $0x1,%ecx 22: f0 41 0f b1 4d 00 lock cmpxchg %ecx,0x0(%r13) 28: 75 33 jne 0x5d * 2a: 48 c7 04 24 0e 36 e0 movq $0x45e0360e,(%rsp) <-- trapping instruction 31: 45 32: 49 c7 04 1c 00 00 00 movq $0x0,(%r12,%rbx,1) 39: 00 3a: 65 gs 3b: 48 rex.W 3c: 8b .byte 0x8b 3d: 04 25 add $0x25,%al 3f: 28 .byte 0x28