================================================================== BUG: KASAN: stack-out-of-bounds in insn_init arch/x86/lib/insn.c:70 [inline] BUG: KASAN: stack-out-of-bounds in insn_decode+0x51/0x4c0 arch/x86/lib/insn.c:758 Write of size 88 at addr ffffc9000377f610 by task syz.4.18/5372 Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#2] PREEMPT SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 UID: 0 PID: 5372 Comm: syz.4.18 Not tainted 6.11.0-rc4-next-20240821-syzkaller #0 CPU: 1 UID: 0 PID: 5372 Comm: syz.4.18 Not tainted 6.11.0-rc4-next-20240821-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: RIP: 04c0:0xffff1060 Code: Unable to access opcode bytes at 0xffff1036. __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 RSP: e86e:0000000000000018 EFLAGS: 00000010 BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page PGD 800000001f70a067 P4D 800000001f70a067 PUD 69594067 PMD 0 Oops: Oops: 0010 [#3] PREEMPT SMP KASAN PTI CPU: 0 UID: 0 PID: 5372 Comm: syz.4.18 Not tainted 6.11.0-rc4-next-20240821-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 RIP: 0000:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffffff81744b8c R09: 0000000000000086 R10: 0000000000000086 R11: ffffed101720519b R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007fec0421c6c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000 CS: 0000 DS: 0000 ES: 0000 CR0: 0000000080050033 kasan_report+0x143/0x180 mm/kasan/report.c:601 CR2: ffffffffffffffd6 CR3: 00000000797d4000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memset+0x23/0x50 mm/kasan/shadow.c:84 insn_init arch/x86/lib/insn.c:70 [inline] insn_decode+0x51/0x4c0 arch/x86/lib/insn.c:758 get_kernel_gp_address arch/x86/kernel/traps.c:558 [inline] __exc_general_protection arch/x86/kernel/traps.c:733 [inline] exc_general_protection+0x454/0x5d0 arch/x86/kernel/traps.c:693 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617 RIP: 0010:clear_pending kernel/locking/qspinlock.c:151 [inline] RIP: 0010:pv_wait_head_or_lock kernel/locking/qspinlock_paravirt.h:435 [inline] RIP: 0010:__pv_queued_spin_lock_slowpath+0x830/0xdb0 kernel/locking/qspinlock.c:508 Code: e9 6e ff ff ff 48 8d 8c 24 b0 00 00 00 80 e1 07 fe c1 38 c1 7c 97 48 8d bc 24 b0 00 00 00 e8 87 e3 34 f6 eb 88 48 8b 44 24 10 <42> 0f b6 04 28 84 c0 0f 85 d3 00 00 00 4c 8b 64 24 48 41 c6 04 24 RSP: 0018:ffffc9000377f7e0 EFLAGS: 00010056 RAX: ffffc9000377f800 RBX: 1ffff920006eff12 RCX: ffffc9000377f801 RDX: 0000000000000001 RSI: 0000000000000002 RDI: ffff8880b903ea42 RBP: ffffc9000377f918 R08: ffff8880b903ea43 R09: 1ffff11017207d48 R10: dffffc0000000000 R11: ffffed1017207d49 R12: 0000000000000000 R13: dffffc0000000000 R14: ffff8880b903ea40 R15: ffffc9000377f8a0 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 5372 at kernel/rcu/tree_plugin.h:442 __rcu_read_unlock+0x94/0x110 kernel/rcu/tree_plugin.h:442 Modules linked in: CPU: 0 UID: 0 PID: 5372 Comm: syz.4.18 Not tainted 6.11.0-rc4-next-20240821-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 RIP: 0010:__rcu_read_unlock+0x94/0x110 kernel/rcu/tree_plugin.h:442 Code: 41 83 3f 00 75 29 42 0f b6 04 23 84 c0 75 62 41 8b 45 00 3d 00 00 00 40 73 0f 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc 90 <0f> 0b 90 eb eb 4c 89 f7 e8 7f 00 00 00 eb cd 44 89 e9 80 e1 07 80 RSP: 0018:ffffc9000377de80 EFLAGS: 00010086 RAX: 00000000ffffffff RBX: 1ffff11004225088 RCX: ffffffff81703af0 RDX: 0000000000000000 RSI: ffffffff8c609d80 RDI: ffffffff8c609d40 RBP: 00000000ffffffff R08: ffffffff901c0c6f R09: 1ffffffff203818d R10: dffffc0000000000 R11: fffffbfff203818e R12: dffffc0000000000 R13: ffff888021128444 R14: ffff888021128000 R15: ffffc9000377e78a FS: 00007fec0421c6c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000000797d4000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline] queued_spin_lock_slowpath+0x42/0x50 arch/x86/include/asm/qspinlock.h:51 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x272/0x370 kernel/locking/spinlock_debug.c:116 rcu_read_unlock include/linux/rcupdate.h:882 [inline] is_bpf_text_address+0x285/0x2a0 kernel/bpf/core.c:769 kernel_text_address+0xa7/0xe0 kernel/extable.c:125 __kernel_text_address+0xd/0x40 kernel/extable.c:79 show_trace_log_lvl+0x2ed/0x410 arch/x86/kernel/dumpstack.c:259 raw_spin_rq_lock_nested+0xb0/0x140 kernel/sched/core.c:595 raw_spin_rq_lock kernel/sched/sched.h:1488 [inline] rq_lock kernel/sched/sched.h:1787 [inline] ttwu_queue kernel/sched/core.c:3938 [inline] try_to_wake_up+0x804/0x1480 kernel/sched/core.c:4266 show_regs arch/x86/kernel/dumpstack.c:478 [inline] __die_body+0x5f/0xb0 arch/x86/kernel/dumpstack.c:420 page_fault_oops+0x8e4/0xcc0 arch/x86/mm/fault.c:711 wake_up_process kernel/sched/core.c:4398 [inline] wake_up_q+0xc8/0x120 kernel/sched/core.c:1056 futex_wake+0x523/0x5c0 kernel/futex/waitwake.c:199 handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x5ed/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0000:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffffff8c0d4a0a R08: ffffc9000377e320 R09: 0000000000000086 R10: 0000000000000086 R11: ffffc9000377e785 R12: 0000000000000018 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 do_futex+0x392/0x560 kernel/futex/syscalls.c:107 __do_sys_futex kernel/futex/syscalls.c:179 [inline] __se_sys_futex+0x3f9/0x480 kernel/futex/syscalls.c:160 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec03379e79 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fec0421c0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007fec03515f88 RCX: 00007fec03379e79 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fec03515f8c RBP: 00007fec03515f80 R08: 7fffffffffffffff R09: 0000000000000000 R10: ffffffffffffffff R11: 0000000000000246 R12: 00007fec03515f8c R13: 0000000000000000 R14: 00007ffd1726c260 R15: 00007ffd1726c348 The buggy address belongs to stack of task syz.4.18/5372 internal error: frame has invalid marker: 18446744071595369491 The buggy address belongs to the virtual mapping at [ffffc90003778000, ffffc90003781000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2206 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7dad4 memcg:ffff88802784aa02 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88802784aa02 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 5217, tgid 5217 (syz-executor), ts 55684967489, free_ts 55669579350 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1517 prep_new_page mm/page_alloc.c:1525 [inline] get_page_from_freelist+0x3004/0x30c0 mm/page_alloc.c:3476 __alloc_pages_noprof+0x29e/0x780 mm/page_alloc.c:4743 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3600 [inline] __vmalloc_area_node mm/vmalloc.c:3669 [inline] __vmalloc_node_range_noprof+0xa40/0x1400 mm/vmalloc.c:3850 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1115 copy_process+0x5d1/0x3d50 kernel/fork.c:2206 kernel_clone+0x226/0x8f0 kernel/fork.c:2787 __do_sys_clone3 kernel/fork.c:3091 [inline] __se_sys_clone3+0x2cb/0x350 kernel/fork.c:3070 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5217 tgid 5217 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1098 [inline] free_unref_folios+0xe8a/0x1850 mm/page_alloc.c:2699 folios_put_refs+0x76e/0x860 mm/swap.c:1007 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __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 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 unmap_region+0x2df/0x350 mm/vma.c:174 do_vmi_align_munmap+0x11ac/0x1840 mm/vma.c:806 do_vmi_munmap+0x261/0x2f0 mm/vma.c:878 __vm_munmap+0x24c/0x480 mm/mmap.c:1620 __do_sys_munmap mm/mmap.c:1637 [inline] __se_sys_munmap mm/mmap.c:1634 [inline] __x64_sys_munmap+0x68/0x80 mm/mmap.c:1634 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc9000377f500: 01 f2 00 02 f2 f2 00 02 00 00 00 00 00 00 00 00 ffffc9000377f580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000377f600: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ^ ffffc9000377f680: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000377f700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: e9 6e ff ff ff jmp 0xffffff73 5: 48 8d 8c 24 b0 00 00 lea 0xb0(%rsp),%rcx c: 00 d: 80 e1 07 and $0x7,%cl 10: fe c1 inc %cl 12: 38 c1 cmp %al,%cl 14: 7c 97 jl 0xffffffad 16: 48 8d bc 24 b0 00 00 lea 0xb0(%rsp),%rdi 1d: 00 1e: e8 87 e3 34 f6 call 0xf634e3aa 23: eb 88 jmp 0xffffffad 25: 48 8b 44 24 10 mov 0x10(%rsp),%rax * 2a: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax <-- trapping instruction 2f: 84 c0 test %al,%al 31: 0f 85 d3 00 00 00 jne 0x10a 37: 4c 8b 64 24 48 mov 0x48(%rsp),%r12 3c: 41 rex.B 3d: c6 .byte 0xc6 3e: 04 24 add $0x24,%al