syzbot


WARNING in __page_table_check_ptes_set

Status: upstream: reported C repro on 2024/04/21 20:16
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+d8426b591c36b21c750e@syzkaller.appspotmail.com
Fix commit: c88033efe9a3 mm/userfaultfd: reset ptes when close() for wr-protected ones
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce 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-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-net-next-test-gce], missing on: [ci-qemu2-riscv64 ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci2-upstream-usb]
First crash: 30d, last: 30d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] mm/userfaultfd: Reset ptes when close() for wr-protected ones 4 (4) 2024/04/22 21:08
[syzbot] [mm?] WARNING in __page_table_check_ptes_set 5 (6) 2024/04/22 15:10

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5084 at mm/page_table_check.c:199 __page_table_check_pte mm/page_table_check.c:199 [inline]
WARNING: CPU: 0 PID: 5084 at mm/page_table_check.c:199 __page_table_check_ptes_set+0x1db/0x420 mm/page_table_check.c:213
Modules linked in:
CPU: 0 PID: 5084 Comm: syz-executor382 Not tainted 6.9.0-rc4-next-20240417-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:__page_table_check_pte mm/page_table_check.c:199 [inline]
RIP: 0010:__page_table_check_ptes_set+0x1db/0x420 mm/page_table_check.c:213
Code: 48 8b 7c 24 40 48 c7 c6 80 19 46 8e e8 ee df 8e ff 41 83 fc 1d 74 18 41 83 fc 1a 75 1d e8 5d da 8e ff eb 10 e8 56 da 8e ff 90 <0f> 0b 90 eb 10 e8 4b da 8e ff 90 0f 0b 90 eb 05 e8 40 da 8e ff 48
RSP: 0018:ffffc9000366f740 EFLAGS: 00010293
RAX: ffffffff8207833a RBX: ffffc9000366f7c0 RCX: ffff888022af3c00
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000000
RBP: ffffc9000366f830 R08: ffffffff820782af R09: 1ffffd40000a6a10
R10: dffffc0000000000 R11: fffff940000a6a11 R12: 0000000000000000
R13: 0000000014d42c67 R14: 0000000000000001 R15: 0000000000000000
FS:  0000555567f79380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000066c7e0 CR3: 0000000078cb0000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 page_table_check_ptes_set include/linux/page_table_check.h:74 [inline]
 set_ptes include/linux/pgtable.h:267 [inline]
 __ptep_modify_prot_commit include/linux/pgtable.h:1269 [inline]
 ptep_modify_prot_commit include/linux/pgtable.h:1302 [inline]
 change_pte_range mm/mprotect.c:194 [inline]
 change_pmd_range mm/mprotect.c:424 [inline]
 change_pud_range mm/mprotect.c:457 [inline]
 change_p4d_range mm/mprotect.c:480 [inline]
 change_protection_range mm/mprotect.c:508 [inline]
 change_protection+0x2770/0x3cc0 mm/mprotect.c:542
 mprotect_fixup+0x740/0xa90 mm/mprotect.c:655
 do_mprotect_pkey+0x90d/0xe00 mm/mprotect.c:820
 __do_sys_mprotect mm/mprotect.c:841 [inline]
 __se_sys_mprotect mm/mprotect.c:838 [inline]
 __x64_sys_mprotect+0x80/0x90 mm/mprotect.c:838
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f45514bf429
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe52191598 EFLAGS: 00000246 ORIG_RAX: 000000000000000a
RAX: ffffffffffffffda RBX: 00007ffe52191768 RCX: 00007f45514bf429
RDX: 000000000000000f RSI: 0000000000004000 RDI: 0000000020ffc000
RBP: 00007f4551532610 R08: 00007ffe52191768 R09: 00007ffe52191768
R10: 00007ffe52191768 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe52191758 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/17 20:48 linux-next 4eab35893071 bd38b692 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __page_table_check_ptes_set
2024/04/17 20:11 linux-next 4eab35893071 bd38b692 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __page_table_check_ptes_set
* Struck through repros no longer work on HEAD.