==================================================================
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 ffffc900042ffde0 by task syz-executor.5/16478
CPU: 1 PID: 16478 Comm: syz-executor.5 Not tainted 6.2.0-rc8-next-20230220-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:trace_lock_acquire+0x2/0x2b0 include/trace/events/lock.h:24
Code: 1e 69 8c 48 89 04 24 e8 8c 37 e6 02 48 8b 04 24 e9 b6 fe ff ff 48 89 04 24 e8 2a ee 70 00 48 8b 04 24 e9 c7 fe ff ff 90 41 57 <41> 56 41 55 41 54 55 53 48 83 ec 10 66 90 48 c7 c3 40 90 78 8e 65
RSP: 0018:ffffc900042ffc38 EFLAGS: 00000286
RAX: dffffc0000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc90000a2f5a0
RBP: ffffc90000a2f5a0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: ffffffff81790be9
spin_lock include/linux/spinlock.h:350 [inline]
futex_wake+0x1b9/0x490 kernel/futex/waitwake.c:164
lockdep_hardirqs_on+0x7d/0x100 kernel/locking/lockdep.c:4384
asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:653
RIP: ffffffff:write_comp_data+0x7/0x90
RSP: 1e185340:0000000000000046 EFLAGS: 00000246 ORIG_RAX: ffffffff817894f0
RAX: 0000000000000000 RBX: 1ffff9200085ffb8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000041b58ab3 RDI: ffffffff8c0170c8
RBP: 0000000000000000 R08: ffffffff81789758 R09: 0000000000000000
R10: 00000000000f4240 R11: 00007f24a2bac058 R12: 00000000ffffffff
R13: 159a4cfb5d047d00 R14: 00007f24a2bac05c R15: 00007fffb3701080
The buggy address belongs to stack of task syz-executor.5/16478
and is located at offset 32 in frame:
do_futex+0x0/0x360 kernel/futex/syscalls.c:72
This frame has 1 object:
[32, 36) 'val3'
The buggy address belongs to the virtual mapping at
[ffffc900042f8000, ffffc90004301000) created by:
kernel_clone+0xeb/0xa10 kernel/fork.c:2684
The buggy address belongs to the physical page:
page:ffffea000080fe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x203f8
memcg:ffff888029a49302
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888029a49302
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 16440, tgid 16440 (syz-executor.1), ts 1566978928806, free_ts 1565505873564
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_list+0x176/0xcd0 mm/page_alloc.c:3542
release_pages+0xcd7/0x1380 mm/swap.c:1042
tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:97
tlb_flush_mmu_free mm/mmu_gather.c:292 [inline]
tlb_flush_mmu mm/mmu_gather.c:299 [inline]
tlb_finish_mmu+0x14b/0x7e0 mm/mmu_gather.c:391
exit_mmap+0x205/0x7d0 mm/mmap.c:3047
__mmput+0x128/0x4c0 kernel/fork.c:1209
mmput+0x60/0x70 kernel/fork.c:1231
exit_mm kernel/exit.c:563 [inline]
do_exit+0x9d7/0x2b60 kernel/exit.c:856
do_group_exit+0xd4/0x2a0 kernel/exit.c:1019
__do_sys_exit_group kernel/exit.c:1030 [inline]
__se_sys_exit_group kernel/exit.c:1028 [inline]
__x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1028
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:
ffffc900042ffc80: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00
ffffc900042ffd00: f2 f2 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00
>ffffc900042ffd80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 f3 f3
^
ffffc900042ffe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc900042ffe80: 00 f1 f1 f1 f1 00 f2 f2 f2 00 00 f3 f3 00 00 00
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 69 8c 48 89 04 24 e8 imul $0x2e6378c,-0x17dbfb77(%rax,%rcx,2),%ecx
7: 8c 37 e6 02
b: 48 8b 04 24 mov (%rsp),%rax
f: e9 b6 fe ff ff jmpq 0xfffffeca
14: 48 89 04 24 mov %rax,(%rsp)
18: e8 2a ee 70 00 callq 0x70ee47
1d: 48 8b 04 24 mov (%rsp),%rax
21: e9 c7 fe ff ff jmpq 0xfffffeed
26: 90 nop
27: 41 57 push %r15
* 29: 41 56 push %r14 <-- trapping instruction
2b: 41 55 push %r13
2d: 41 54 push %r12
2f: 55 push %rbp
30: 53 push %rbx
31: 48 83 ec 10 sub $0x10,%rsp
35: 66 90 xchg %ax,%ax
37: 48 c7 c3 40 90 78 8e mov $0xffffffff8e789040,%rbx
3e: 65 gs