==================================================================
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 ffffc900036dfa68 by task syz-executor.2/6454
CPU: 1 PID: 6454 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:finish_task_switch.isra.0+0x2bf/0xc80 kernel/sched/core.c:5183
Code: 8b 3a 4c 89 e7 48 c7 02 00 00 00 00 ff d1 4d 85 ff 75 bf 4c 89 e7 e8 10 f8 ff ff e8 eb 8f 32 00 fb 65 48 8b 1c 25 80 b8 03 00 <48> 8d bb 50 15 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1
RSP: 0018:ffffc900036df700 EFLAGS: 00000206
RAX: 000000000000beaf RBX: ffff88807af0ba80 RCX: 1ffffffff229e0ae
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900036df748 R08: 0000000000000001 R09: ffffffff914eab8f
R10: 0000000000000001 R11: 0000000000000000 R12: ffff8880b993c280
R13: ffff888021aa3a80 R14: 0000000000000000 R15: 0000000000000000
context_switch kernel/sched/core.c:5307 [inline]
__schedule+0x24bc/0x5ac0 kernel/sched/core.c:6622
preempt_schedule_irq+0x52/0x90 kernel/sched/core.c:6934
irqentry_exit+0x35/0x80 kernel/entry/common.c:432
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:650
RIP: 0010:__sanitizer_cov_trace_switch+0x5a/0x90 kernel/kcov.c:341
Code: 4c 8b 75 00 31 db 4d 85 f6 74 1e 48 8b 74 dd 10 4c 89 e2 4c 89 ef 48 83 c3 01 48 8b 4c 24 28 e8 1c fe ff ff 49 39 de 75 e2 5b <5d> 41 5c 41 5d 41 5e c3 48 83 f8 40 41 bd 07 00 00 00 74 c2 5b 5d
RSP: 0018:ffffc900036df9b0 EFLAGS: 00000246
RAX: 0000000000000002 RBX: 0000000000000005 RCX: ffffffff89531dd9
RDX: ffff88807af0ba80 RSI: 0000000000000000 RDI: 0000000000000007
RBP: ffffffff8b797c80 R08: 0000000000000007 R09: 0000000000000006
R10: 0000000000000005 R11: 1ffff11004d14432 R12: 0000000000000005
R13: 0000000000000007 R14: 0000000000000002 R15: ffffffff8e3f7c40
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:650
RIP: 0005:ax25_device_event+0x6f/0x650 net/ax25/af_ax25.c:155
RSP: 891676ad:ffffc900036dfba8 EFLAGS: ffffc9000dca5000 ORIG_RAX: ffffffff8918c610
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff89156842
RDX: 00000000ffffffc3 RSI: 0000000000000005 RDI: 0000000000000001
RBP: ffffffff89531d30 R08: ffffffff8e317e40 R09: 0000000000000000
R10: ffffffff8e317880 R11: ffffffff8a20144a R12: ffffffff8bfe5a80
R13: 0000000041b58ab3 R14: 0000000000000000 R15: 1ffff920006dbf3e
The buggy address belongs to stack of task syz-executor.2/6454
and is located at offset 120 in frame:
phonet_device_notify+0x0/0x840 include/linux/rculist.h:106
This frame has 2 objects:
[32, 40) 'deleted'
[64, 81) 'req'
The buggy address belongs to the virtual mapping at
[ffffc900036d8000, ffffc900036e1000) created by:
kernel_clone+0xeb/0xa10 kernel/fork.c:2684
The buggy address belongs to the physical page:
page:ffffea0000ab4a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2ad2a
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
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 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 6438, tgid 6438 (syz-executor.2), ts 298423645559, free_ts 296857215993
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
get_signal+0x2315/0x25b0 kernel/signal.c:2859
arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:306
exit_to_user_mode_loop kernel/entry/common.c:168 [inline]
exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:203
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296
do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Memory state around the buggy address:
ffffc900036df900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc900036df980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
>ffffc900036dfa00: f1 f1 00 f2 f2 f2 00 00 01 f3 f3 f3 f3 f3 00 00
^
ffffc900036dfa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc900036dfb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 8b 3a mov (%rdx),%edi
2: 4c 89 e7 mov %r12,%rdi
5: 48 c7 02 00 00 00 00 movq $0x0,(%rdx)
c: ff d1 callq *%rcx
e: 4d 85 ff test %r15,%r15
11: 75 bf jne 0xffffffd2
13: 4c 89 e7 mov %r12,%rdi
16: e8 10 f8 ff ff callq 0xfffff82b
1b: e8 eb 8f 32 00 callq 0x32900b
20: fb sti
21: 65 48 8b 1c 25 80 b8 mov %gs:0x3b880,%rbx
28: 03 00
* 2a: 48 8d bb 50 15 00 00 lea 0x1550(%rbx),%rdi <-- trapping instruction
31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
38: fc ff df
3b: 48 89 fa mov %rdi,%rdx
3e: 48 rex.W
3f: c1 .byte 0xc1