syzbot
WARNING in __page_table_check_ptes_set (3)
Status:
upstream: reported C repro on 2025/11/13 16:44
Subsystems:
mm
Labels:
prio:low
[Documentation on labels]
Reported-by: syzbot+18d274a59b87cf80e86d@syzkaller.appspotmail.com
Fix commit:
mm/userfaultfd: clear uffd-wp PTE state when re-registering without WP
Patched on: [ci-upstream-linux-next-kasan-gce-root ci-upstream-rust-kasan-gce], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 261d, last: 26d
▶
▼
Last patch testing requests (1)
Sample crash report:
------------[ cut here ]------------
pte_uffd_wp(pte) && pte_write(pte)
WARNING: mm/page_table_check.c:191 at page_table_check_pte_flags mm/page_table_check.c:191 [inline], CPU#2: syz.0.17/5933
WARNING: mm/page_table_check.c:191 at __page_table_check_ptes_set+0x233/0x4e0 mm/page_table_check.c:207, CPU#2: syz.0.17/5933
Modules linked in:
CPU: 2 UID: 0 PID: 5933 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:page_table_check_pte_flags mm/page_table_check.c:191 [inline]
RIP: 0010:__page_table_check_ptes_set+0x233/0x4e0 mm/page_table_check.c:207
Code: 84 e5 fe ff ff e8 dd 57 83 ff 48 8b 2c 24 31 ff 83 e5 02 48 89 ee e8 6c 52 83 ff 48 85 ed 0f 84 2d 02 00 00 e8 be 57 83 ff 90 <0f> 0b 90 e9 b8 fe ff ff e8 b0 57 83 ff 48 8b 2c 24 31 ff bb 01 00
RSP: 0018:ffffc90003b37628 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff888025f89ff0 RCX: ffffffff82862854
RDX: ffff8880242e2540 RSI: ffffffff82862862 RDI: ffff8880242e2540
RBP: 0000000000000002 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000001 R14: 1ffff92000766eda R15: 1ffff92000766ec7
FS: 00005555805e9500(0000) GS:ffff8880d62e0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000000040 CR3: 000000003cf5c000 CR4: 0000000000352ef0
Call Trace:
<TASK>
page_table_check_ptes_set include/linux/page_table_check.h:83 [inline]
set_ptes+0x199/0x1d0 include/linux/pgtable.h:447
do_swap_page+0x2740/0x5780 mm/memory.c:5089
handle_pte_fault mm/memory.c:6382 [inline]
__handle_mm_fault+0x192f/0x2a00 mm/memory.c:6517
handle_mm_fault+0x37b/0xa30 mm/memory.c:6686
faultin_page mm/gup.c:1126 [inline]
__get_user_pages+0x1178/0x32a0 mm/gup.c:1428
populate_vma_page_range+0x267/0x3f0 mm/gup.c:1860
__mm_populate+0x107/0x3a0 mm/gup.c:1963
do_mlock+0x3f0/0x7f0 mm/mlock.c:659
__do_sys_mlock mm/mlock.c:667 [inline]
__se_sys_mlock mm/mlock.c:665 [inline]
__x64_sys_mlock+0x59/0x80 mm/mlock.c:665
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f230919de59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe25fffef8 EFLAGS: 00000246 ORIG_RAX: 0000000000000095
RAX: ffffffffffffffda RBX: 00007f2309425fa0 RCX: 00007f230919de59
RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000200000ffd000
RBP: 00007f2309233e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f2309425fac R14: 00007f2309425fa0 R15: 00007f2309425fa0
</TASK>
* Struck through repros no longer work on HEAD.