================================================================== BUG: KASAN: stack-out-of-bounds in user_mode arch/x86/include/asm/ptrace.h:136 [inline] BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x17fc/0x1ef0 arch/x86/kernel/unwind_orc.c:455 Read of size 8 at addr ffffc9000351f7b8 by task syz-executor.2/9823 CPU: 1 PID: 9823 Comm: syz-executor.2 Not tainted 6.2.0-next-20230221-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 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:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 user_mode arch/x86/include/asm/ptrace.h:136 [inline] unwind_next_frame+0x17fc/0x1ef0 arch/x86/kernel/unwind_orc.c:455 arch_stack_walk+0x81/0xf0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x90/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 irq_work_queue_on+0xd6/0x1a0 kernel/irq_work.c:140 irq_work_single+0x1e4/0x260 kernel/irq_work.c:211 __flush_smp_call_function_queue+0x4a3/0xad0 kernel/smp.c:668 __sysvec_call_function_single+0xce/0x4f0 arch/x86/kernel/smp.c:248 sysvec_call_function_single+0x92/0xc0 arch/x86/kernel/smp.c:243 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:653 RIP: 0010:__might_sleep+0x89/0x160 kernel/sched/core.c:9987 Code: ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 a8 00 00 00 48 83 bb c0 16 00 00 00 74 09 80 3d df f8 0a 0d 00 74 15 48 83 c4 10 <44> 89 e6 48 89 ef 5b 31 d2 5d 41 5c e9 e6 f9 ff ff 65 48 8b 1c 25 RSP: 0018:ffffc9000351f700 EFLAGS: 00000286 RAX: 0000000000000000 RBX: ffff888018c2d7c0 RCX: 0000000000000000 RDX: 1ffff11003185afb RSI: 0000000000000000 RDI: ffff888018c2d7d8 RBP: ffffffff8a4c5380 R08: ffffffff88cdedaa R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000244 R13: dffffc0000000000 R14: ffffc9000351f8f0 R15: ffff88802c95a9b8 asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:650 RIP: 31762b00:__mutex_unlock_slowpath+0x0/0x5e0 Code: ff ff ff 7f e9 f1 f8 ff ff 90 f3 0f 1e fa 48 89 f2 b9 02 00 00 00 48 c7 c6 60 6e 18 8a e9 d8 f8 ff ff 0f 1f 84 00 00 00 00 00 <41> 57 41 56 49 89 fe 48 83 c7 68 41 55 41 54 55 48 bd 00 00 00 00 RSP: 18c2e1f8:ffff888018c2e21a EFLAGS: 00000000 ORIG_RAX: ffffffff8beee500 RAX: 0000000041b58ab3 RBX: ffffffff88cdedaa RCX: ffffffff8beee560 RDX: ffffffff8a190790 RSI: ffffffff88ccd8eb RDI: 0000000041b58ab3 RBP: dffffc0000000000 R08: ffffffff8a18eaf7 R09: 0000000000000003 R10: ffffffff91db9240 R11: 1ffff920006a3ef0 R12: 1ffff920006a3ef4 R13: b0c421a231762b00 R14: 0000000000000000 R15: 0000000200000000 The buggy address belongs to stack of task syz-executor.2/9823 and is located at offset 56 in frame: __mutex_lock+0x0/0x1350 This frame has 2 objects: [48, 56) 'owner' [80, 120) 'waiter' The buggy address belongs to the virtual mapping at [ffffc90003518000, ffffc90003521000) created by: kernel_clone+0xeb/0xa10 kernel/fork.c:2684 The buggy address belongs to the physical page: page:ffffea00008d4100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23504 memcg:ffff888078970382 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888078970382 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 9811, tgid 9811 (syz-executor.2), ts 932054707048, free_ts 932000041313 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x11bb/0x2d50 mm/page_alloc.c:4339 __alloc_pages+0x1cb/0x5c0 mm/page_alloc.c:5605 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 vm_area_alloc_pages mm/vmalloc.c:2942 [inline] __vmalloc_area_node mm/vmalloc.c:3010 [inline] __vmalloc_node_range+0xb8a/0x1300 mm/vmalloc.c:3180 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct kernel/fork.c:984 [inline] copy_process+0x1320/0x76c0 kernel/fork.c:2100 kernel_clone+0xeb/0xa10 kernel/fork.c:2684 __do_sys_clone+0xba/0x100 kernel/fork.c:2825 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 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1453 [inline] free_pcp_prepare+0x4de/0x930 mm/page_alloc.c:1503 free_unref_page_prepare mm/page_alloc.c:3401 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3496 vfree+0x180/0x7e0 mm/vmalloc.c:2741 xskq_destroy+0x3b/0x50 net/xdp/xsk_queue.c:54 xp_release_deferred+0x93/0x220 net/xdp/xsk_buff_pool.c:256 process_one_work+0x9bf/0x1820 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffffc9000351f680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000351f700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000351f780: f1 f1 f1 f1 00 00 00 f2 f2 f2 00 00 00 00 00 f3 ^ ffffc9000351f800: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000351f880: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f2 04 f2 ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: df 48 89 fisttps -0x77(%rax) 3: fa cli 4: 48 c1 ea 03 shr $0x3,%rdx 8: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) c: 0f 85 a8 00 00 00 jne 0xba 12: 48 83 bb c0 16 00 00 cmpq $0x0,0x16c0(%rbx) 19: 00 1a: 74 09 je 0x25 1c: 80 3d df f8 0a 0d 00 cmpb $0x0,0xd0af8df(%rip) # 0xd0af902 23: 74 15 je 0x3a 25: 48 83 c4 10 add $0x10,%rsp * 29: 44 89 e6 mov %r12d,%esi <-- trapping instruction 2c: 48 89 ef mov %rbp,%rdi 2f: 5b pop %rbx 30: 31 d2 xor %edx,%edx 32: 5d pop %rbp 33: 41 5c pop %r12 35: e9 e6 f9 ff ff jmpq 0xfffffa20 3a: 65 gs 3b: 48 rex.W 3c: 8b .byte 0x8b 3d: 1c 25 sbb $0x25,%al