================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0x118/0x130 arch/x86/kernel/time.c:44 Read of size 8 at addr ffffc90003787848 by task kworker/1:3/5053 CPU: 1 PID: 5053 Comm: kworker/1:3 Not tainted 6.4.0-rc6-syzkaller-00037-gb6dad5178cea #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Workqueue: mld mld_ifc_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 profile_pc+0x118/0x130 arch/x86/kernel/time.c:44 profile_tick+0xcd/0x130 kernel/profile.c:339 tick_sched_timer+0xee/0x110 kernel/time/tick-sched.c:1481 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x1c0/0xbe0 kernel/time/hrtimer.c:1749 hrtimer_interrupt+0x320/0x7b0 kernel/time/hrtimer.c:1811 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline] __sysvec_apic_timer_interrupt+0x14a/0x430 arch/x86/kernel/apic/apic.c:1112 sysvec_apic_timer_interrupt+0x92/0xc0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645 RIP: 0010:queued_write_lock_slowpath+0x147/0x2d0 kernel/locking/qrwlock.c:85 Code: 00 00 00 fc ff df 49 01 c7 41 83 c6 03 41 0f b6 07 41 38 c6 7c 08 84 c0 0f 85 46 01 00 00 8b 45 00 3d 00 01 00 00 74 19 f3 90 <41> 0f b6 07 41 38 c6 7c eb 84 c0 74 e7 48 89 ef e8 d4 1c c2 f7 eb RSP: 0018:ffffc90003787840 EFLAGS: 00000206 RAX: 00000000000001ff RBX: 1ffff920006f0f09 RCX: ffffffff8a131e5d RDX: fffffbfff1c57f19 RSI: 0000000000000004 RDI: ffffffff8e2bf8c0 RBP: ffffffff8e2bf8c0 R08: 0000000000000001 R09: ffffffff8e2bf8c3 R10: fffffbfff1c57f18 R11: 0000000000000000 R12: ffffffff8e2bf8c4 R13: 00000000000000ff R14: 0000000000000003 R15: fffffbfff1c57f18 queued_write_lock include/asm-generic/qrwlock.h:101 [inline] do_raw_write_lock+0x1d2/0x3b0 kernel/locking/spinlock_debug.c:210 neigh_forced_gc net/core/neighbour.c:261 [inline] neigh_alloc net/core/neighbour.c:476 [inline] ___neigh_create+0x1195/0x2a40 net/core/neighbour.c:640 ip6_finish_output2+0xfde/0x1560 net/ipv6/ip6_output.c:125 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0x69a/0x1170 net/ipv6/ip6_output.c:206 NF_HOOK_COND include/linux/netfilter.h:292 [inline] ip6_output+0x1f1/0x540 net/ipv6/ip6_output.c:227 dst_output include/net/dst.h:458 [inline] NF_HOOK include/linux/netfilter.h:303 [inline] NF_HOOK include/linux/netfilter.h:297 [inline] mld_sendpack+0xa09/0xed0 net/ipv6/mcast.c:1820 mld_send_cr net/ipv6/mcast.c:2121 [inline] mld_ifc_work+0x73c/0xe20 net/ipv6/mcast.c:2653 process_one_work+0x99a/0x15e0 kernel/workqueue.c:2405 worker_thread+0x67d/0x10c0 kernel/workqueue.c:2552 kthread+0x344/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to stack of task kworker/1:3/5053 and is located at offset 0 in frame: queued_write_lock_slowpath+0x0/0x2d0 This frame has 1 object: [32, 36) 'val' The buggy address belongs to the virtual mapping at [ffffc90003780000, ffffc90003789000) created by: kernel_clone+0xeb/0x890 kernel/fork.c:2915 The buggy address belongs to the physical page: page:ffffea0000b2d7c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2cb5f flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 2, tgid 2 (kthreadd), ts 64739056578, free_ts 31775836936 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_pages_node include/linux/gfp.h:260 [inline] vm_area_alloc_pages mm/vmalloc.c:3011 [inline] __vmalloc_area_node mm/vmalloc.c:3085 [inline] __vmalloc_node_range+0xa4d/0x14a0 mm/vmalloc.c:3257 alloc_thread_stack_node kernel/fork.c:313 [inline] dup_task_struct kernel/fork.c:1116 [inline] copy_process+0x13bb/0x75c0 kernel/fork.c:2333 kernel_clone+0xeb/0x890 kernel/fork.c:2915 kernel_thread+0xc0/0x100 kernel/fork.c:2977 create_kthread kernel/kthread.c:402 [inline] kthreadd+0x50c/0x790 kernel/kthread.c:737 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564 free_unref_page+0x33/0x370 mm/page_alloc.c:2659 slab_destroy mm/slab.c:1612 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1632 cache_flusharray mm/slab.c:3360 [inline] ___cache_free+0x2ae/0x3d0 mm/slab.c:3423 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:711 [inline] slab_alloc_node mm/slab.c:3256 [inline] slab_alloc mm/slab.c:3265 [inline] __kmem_cache_alloc_lru mm/slab.c:3442 [inline] kmem_cache_alloc+0x1bd/0x3f0 mm/slab.c:3451 vm_area_alloc+0x20/0x230 kernel/fork.c:489 mmap_region+0x407/0x28d0 mm/mmap.c:2631 do_mmap+0x831/0xf60 mm/mmap.c:1394 vm_mmap_pgoff+0x1a2/0x3b0 mm/util.c:543 ksys_mmap_pgoff+0x41f/0x5a0 mm/mmap.c:1440 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffffc90003787700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90003787780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90003787800: 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 f3 ^ ffffc90003787880: f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 ffffc90003787900: f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 5 bytes skipped: 0: df 49 01 fisttps 0x1(%rcx) 3: c7 41 83 c6 03 41 0f movl $0xf4103c6,-0x7d(%rcx) a: b6 07 mov $0x7,%dh c: 41 38 c6 cmp %al,%r14b f: 7c 08 jl 0x19 11: 84 c0 test %al,%al 13: 0f 85 46 01 00 00 jne 0x15f 19: 8b 45 00 mov 0x0(%rbp),%eax 1c: 3d 00 01 00 00 cmp $0x100,%eax 21: 74 19 je 0x3c 23: f3 90 pause * 25: 41 0f b6 07 movzbl (%r15),%eax <-- trapping instruction 29: 41 38 c6 cmp %al,%r14b 2c: 7c eb jl 0x19 2e: 84 c0 test %al,%al 30: 74 e7 je 0x19 32: 48 89 ef mov %rbp,%rdi 35: e8 d4 1c c2 f7 callq 0xf7c21d0e 3a: eb .byte 0xeb