Kernel bug: BUG: unable to handle kernel paging request in vma_merge_existing_range
Subsystem: mm
Status: fixed

Crash report:
RSP: 002b:00007fb22df1c208 EFLAGS: 00000246 ORIG_RAX: 0000000000000013
RAX: 0000000000000020 RBX: 00007fb22dfeb3c8 RCX: 00007fb22df69099
RDX: 0000000000000006 RSI: 0000200000000240 RDI: 0000000000000003
RBP: 00007fb22dfeb3c0 R08: 00007fb22df1bfa7 R09: 0000000000000033
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb22dfb8284
R13: 00007fb22df1c210 R14: 0000000000000001 R15: 0000200000000240
 </TASK>
BUG: unable to handle page fault for address: fffffffffffffff4
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD df84067 P4D df84067 PUD df86067 PMD 0 
Oops: Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5822 Comm: syz-executor515 Not tainted 6.14.0-rc7-syzkaller-00205-g586de92313fc #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:vma_merge_existing_range+0x266/0x2070 mm/vma.c:734
Code: e8 0f 47 ac ff 48 8b 14 24 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 1c 19 00 00 48 8b 04 24 48 8b 74 24 08 <4c> 8b 38 4c 89 ff e8 4f 41 ac ff 48 8b 44 24 08 49 39 c7 0f 83 db
RSP: 0018:ffffc900034d7950 EFLAGS: 00010246
RAX: fffffffffffffff4 RBX: ffffc900034d7ab0 RCX: ffffffff820db0e5
RDX: 1ffffffffffffffe RSI: 0000200000807000 RDI: 0000000000000005
RBP: 0000200000ce2000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000001
R13: ffffc900034d7ad0 R14: ffff8880349961f0 R15: ffff8880122a6e00
FS:  00007fb22df1c6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffff4 CR3: 000000007d69e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 vma_modify.constprop.0+0x87/0x410 mm/vma.c:1517
 vma_modify_flags_uffd+0x241/0x2e0 mm/vma.c:1598
 userfaultfd_clear_vma+0x91/0x130 mm/userfaultfd.c:1906
 userfaultfd_release_all+0x2ae/0x4c0 mm/userfaultfd.c:2024
 userfaultfd_release+0xf4/0x1c0 fs/userfaultfd.c:865
 __fput+0x3ff/0xb70 fs/file_table.c:464
 task_work_run+0x14e/0x250 kernel/task_work.c:227
 ptrace_notify+0x10e/0x130 kernel/signal.c:2522
 ptrace_report_syscall include/linux/ptrace.h:415 [inline]
 ptrace_report_syscall_exit include/linux/ptrace.h:477 [inline]
 syscall_exit_work kernel/entry/common.c:173 [inline]
 syscall_exit_to_user_mode_prepare+0x126/0x290 kernel/entry/common.c:200
 __syscall_exit_to_user_mode_work kernel/entry/common.c:205 [inline]
 syscall_exit_to_user_mode+0x11/0x2a0 kernel/entry/common.c:218
 do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb22df69099
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 31 1b 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb22df1c208 EFLAGS: 00000246 ORIG_RAX: 0000000000000013
RAX: 0000000000000020 RBX: 00007fb22dfeb3c8 RCX: 00007fb22df69099
RDX: 0000000000000006 RSI: 0000200000000240 RDI: 0000000000000003
RBP: 00007fb22dfeb3c0 R08: 00007fb22df1bfa7 R09: 0000000000000033
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb22dfb8284
R13: 00007fb22df1c210 R14: 0000000000000001 R15: 0000200000000240
 </TASK>
Modules linked in:
CR2: fffffffffffffff4
---[ end trace 0000000000000000 ]---
RIP: 0010:vma_merge_existing_range+0x266/0x2070 mm/vma.c:734
Code: e8 0f 47 ac ff 48 8b 14 24 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 1c 19 00 00 48 8b 04 24 48 8b 74 24 08 <4c> 8b 38 4c 89 ff e8 4f 41 ac ff 48 8b 44 24 08 49 39 c7 0f 83 db
RSP: 0018:ffffc900034d7950 EFLAGS: 00010246
RAX: fffffffffffffff4 RBX: ffffc900034d7ab0 RCX: ffffffff820db0e5
RDX: 1ffffffffffffffe RSI: 0000200000807000 RDI: 0000000000000005
RBP: 0000200000ce2000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000001
R13: ffffc900034d7ad0 R14: ffff8880349961f0 R15: ffff8880122a6e00
FS:  00007fb22df1c6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffff4 CR3: 000000007d69e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	e8 0f 47 ac ff       	call   0xffac4714
   5:	48 8b 14 24          	mov    (%rsp),%rdx
   9:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  10:	fc ff df
  13:	48 c1 ea 03          	shr    $0x3,%rdx
  17:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
  1b:	0f 85 1c 19 00 00    	jne    0x193d
  21:	48 8b 04 24          	mov    (%rsp),%rax
  25:	48 8b 74 24 08       	mov    0x8(%rsp),%rsi
* 2a:	4c 8b 38             	mov    (%rax),%r15 <-- trapping instruction
  2d:	4c 89 ff             	mov    %r15,%rdi
  30:	e8 4f 41 ac ff       	call   0xffac4184
  35:	48 8b 44 24 08       	mov    0x8(%rsp),%rax
  3a:	49 39 c7             	cmp    %rax,%r15
  3d:	0f                   	.byte 0xf
  3e:	83                   	.byte 0x83
  3f:	db                   	.byte 0xdb