syzbot


general protection fault in unpin_user_page_range_dirty_lock

Status: closed as dup on 2025/09/05 13:27
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+0d2f32dad7098551e15d@syzkaller.appspotmail.com
First crash: 1d01h, last: 23h46m
Duplicate of
Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported
KASAN: null-ptr-deref Read in io_sqe_buffer_register io-uring 11 C 13 2h44m 1d13h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] general protection fault in unpin_user_page_range_dirty_lock 1 (2) 2025/09/05 13:27

Sample crash report:
mmap: syz.0.17 (6062) uses deprecated remap_file_pages() syscall. See Documentation/mm/remap_file_pages.rst.
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 0 UID: 0 PID: 6062 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:_compound_head include/linux/page-flags.h:284 [inline]
RIP: 0010:gup_folio_range_next mm/gup.c:241 [inline]
RIP: 0010:unpin_user_page_range_dirty_lock+0x63/0x4e0 mm/gup.c:369
Code: 45 31 ed 4c 89 74 24 18 4c 89 6c 24 10 49 c1 e5 06 4b 8d 1c 2e 48 83 c3 08 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 ff 3e 1c 00 4d 01 f5 4c 8b 23 4c 89
RSP: 0018:ffffc9000413f6d0 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000008 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffea0002d10037 R09: 1ffffd40005a2006
R10: dffffc0000000000 R11: fffff940005a2007 R12: 0000000000000002
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  0000555587af6500(0000) GS:ffff8881259fa000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000000000 CR3: 0000000074024000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 batch_unpin+0x3eb/0x560 drivers/iommu/iommufd/pages.c:691
 iopt_pages_unpin_xarray drivers/iommu/iommufd/pages.c:1711 [inline]
 iopt_pages_unfill_xarray+0x813/0xaa0 drivers/iommu/iommufd/pages.c:1747
 iopt_area_remove_access+0x2c4/0x3f0 drivers/iommu/iommufd/pages.c:2196
 iommufd_access_unpin_pages+0x33b/0x4e0 drivers/iommu/iommufd/device.c:1357
 iommufd_test_access_unmap+0x28c/0x300 drivers/iommu/iommufd/selftest.c:1448
 iommufd_test_staccess_release+0x6a/0xb0 drivers/iommu/iommufd/selftest.c:1489
 __fput+0x44c/0xa70 fs/file_table.c:468
 task_work_run+0x1d1/0x260 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop+0xec/0x130 kernel/entry/common.c:43
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
 do_syscall_64+0x2bd/0xfa0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fdd6e78ebe9
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:00007ffd897539d8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 0000000000019b27 RCX: 00007fdd6e78ebe9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000789753ccf
R10: 0000001b31420000 R11: 0000000000000246 R12: 00007fdd6e9c5fac
R13: 00007fdd6e9c5fa0 R14: ffffffffffffffff R15: 0000000000000003
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:_compound_head include/linux/page-flags.h:284 [inline]
RIP: 0010:gup_folio_range_next mm/gup.c:241 [inline]
RIP: 0010:unpin_user_page_range_dirty_lock+0x63/0x4e0 mm/gup.c:369
Code: 45 31 ed 4c 89 74 24 18 4c 89 6c 24 10 49 c1 e5 06 4b 8d 1c 2e 48 83 c3 08 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 ff 3e 1c 00 4d 01 f5 4c 8b 23 4c 89
RSP: 0018:ffffc9000413f6d0 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000008 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffea0002d10037 R09: 1ffffd40005a2006
R10: dffffc0000000000 R11: fffff940005a2007 R12: 0000000000000002
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  0000555587af6500(0000) GS:ffff8881259fa000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000000000 CR3: 0000000074024000 CR4: 00000000003526f0
----------------
Code disassembly (best guess):
   0:	45 31 ed             	xor    %r13d,%r13d
   3:	4c 89 74 24 18       	mov    %r14,0x18(%rsp)
   8:	4c 89 6c 24 10       	mov    %r13,0x10(%rsp)
   d:	49 c1 e5 06          	shl    $0x6,%r13
  11:	4b 8d 1c 2e          	lea    (%r14,%r13,1),%rbx
  15:	48 83 c3 08          	add    $0x8,%rbx
  19:	48 89 d8             	mov    %rbx,%rax
  1c:	48 c1 e8 03          	shr    $0x3,%rax
  20:	48 b9 00 00 00 00 00 	movabs $0xdffffc0000000000,%rcx
  27:	fc ff df
* 2a:	80 3c 08 00          	cmpb   $0x0,(%rax,%rcx,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 ff 3e 1c 00       	call   0x1c3f37
  38:	4d 01 f5             	add    %r14,%r13
  3b:	4c 8b 23             	mov    (%rbx),%r12
  3e:	4c                   	rex.WR
  3f:	89                   	.byte 0x89

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/05 05:50 linux-next 4ac65880ebca d291dd2d .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in unpin_user_page_range_dirty_lock
2025/09/05 04:23 linux-next 4ac65880ebca d291dd2d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in unpin_user_page_range_dirty_lock
* Struck through repros no longer work on HEAD.