syzbot


WARNING in pagemap_scan_pmd_entry

Status: fixed on 2024/01/20 21:18
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+e94c5aaf7890901ebf9b@syzkaller.appspotmail.com
Fix commit: 0dff1b407def mm/pagemap: fix ioctl(PAGEMAP_SCAN) on vma check
First crash: 250d, last: 223d
Cause bisection: the cause commit could be any of (bisect log):
  d61ea1cb0095 userfaultfd: UFFD_FEATURE_WP_ASYNC
  52526ca7fdb9 fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH 1/3] mm/pagemap: Fix ioctl(PAGEMAP_SCAN) on vma check 4 (4) 2023/11/19 15:54
[syzbot] [fs?] WARNING in pagemap_scan_pmd_entry 4 (5) 2023/11/16 16:49
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in pagemap_scan_pmd_entry (2) fs C done error 5 97d 159d 0/27 upstream: reported C repro on 2024/02/09 18:51

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5071 at arch/x86/include/asm/pgtable.h:403 pte_uffd_wp arch/x86/include/asm/pgtable.h:403 [inline]
WARNING: CPU: 1 PID: 5071 at arch/x86/include/asm/pgtable.h:403 pagemap_scan_pmd_entry+0x1d27/0x23f0 fs/proc/task_mmu.c:2146
Modules linked in:
CPU: 1 PID: 5071 Comm: syz-executor182 Not tainted 6.7.0-rc1-syzkaller-00019-gc42d9eeef8e5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:pte_uffd_wp arch/x86/include/asm/pgtable.h:403 [inline]
RIP: 0010:pagemap_scan_pmd_entry+0x1d27/0x23f0 fs/proc/task_mmu.c:2146
Code: ff ff e8 5c 23 76 ff 48 89 e8 31 ff 83 e0 02 48 89 c6 48 89 04 24 e8 d8 1e 76 ff 48 8b 04 24 48 85 c0 74 25 e8 3a 23 76 ff 90 <0f> 0b 90 e9 71 ff ff ff 4c 89 74 24 68 4c 8b 74 24 10 c7 44 24 28
RSP: 0018:ffffc9000392f870 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000020001000 RCX: ffffffff82116da8
RDX: ffff88801aae8000 RSI: ffffffff82116db6 RDI: 0000000000000007
RBP: 0000000012c7ac67 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000002 R12: dffffc0000000000
R13: 0000000000000400 R14: 0000000000000000 R15: ffff8880745f4000
FS:  00005555557a8380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000d60 CR3: 0000000074627000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 walk_pmd_range mm/pagewalk.c:143 [inline]
 walk_pud_range mm/pagewalk.c:221 [inline]
 walk_p4d_range mm/pagewalk.c:256 [inline]
 walk_pgd_range+0xa48/0x1870 mm/pagewalk.c:293
 __walk_page_range+0x630/0x770 mm/pagewalk.c:395
 walk_page_range+0x626/0xa80 mm/pagewalk.c:521
 do_pagemap_scan+0x40d/0xcd0 fs/proc/task_mmu.c:2437
 do_pagemap_cmd+0x5e/0x80 fs/proc/task_mmu.c:2478
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f9c3ea93669
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:00007ffe1d95e918 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffe1d95e920 RCX: 00007f9c3ea93669
RDX: 0000000020000d40 RSI: 00000000c0606610 RDI: 0000000000000003
RBP: 00007f9c3eb06610 R08: 65732f636f72702f R09: 65732f636f72702f
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe1d95eb58 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (48):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/15 14:40 upstream c42d9eeef8e5 cb976f63 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/12/07 15:36 upstream bee0e7762ad2 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/12/07 15:31 upstream bee0e7762ad2 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/12/07 15:30 upstream bee0e7762ad2 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/12/05 23:34 upstream bee0e7762ad2 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/12/04 22:24 upstream 33cc938e65a9 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/12/04 16:47 upstream 33cc938e65a9 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in pagemap_scan_pmd_entry
2023/12/03 20:21 upstream 33cc938e65a9 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/12/03 18:48 upstream 33cc938e65a9 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/12/02 11:48 upstream 815fb87b7530 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/28 21:35 upstream df60cee26a2e 1adfb6f6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/25 05:51 upstream fa2b906f5148 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/23 12:33 upstream 9b6de136b5f0 03e12510 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/22 13:10 upstream c2d5304e6c64 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/22 07:37 upstream c2d5304e6c64 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/22 02:52 upstream c2d5304e6c64 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/22 02:49 upstream c2d5304e6c64 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/21 22:10 upstream 98b1cc82c4af cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/21 05:10 upstream 98b1cc82c4af cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/21 01:58 upstream 98b1cc82c4af cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/19 06:35 upstream 05aa69b096a0 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/19 04:56 upstream 05aa69b096a0 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in pagemap_scan_pmd_entry
2023/11/19 03:47 upstream 05aa69b096a0 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/18 11:38 upstream 791c8ab095f7 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/15 14:11 upstream c42d9eeef8e5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/11/11 14:06 upstream ac347a0655db 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in pagemap_scan_pmd_entry
2023/11/11 14:05 upstream ac347a0655db 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in pagemap_scan_pmd_entry
2023/11/11 14:04 upstream ac347a0655db 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in pagemap_scan_pmd_entry
2023/11/11 13:59 upstream ac347a0655db 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in pagemap_scan_pmd_entry
2023/12/07 15:36 upstream bee0e7762ad2 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in pagemap_scan_pmd_entry
2023/12/07 15:36 upstream bee0e7762ad2 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in pagemap_scan_pmd_entry
2023/12/07 15:33 upstream bee0e7762ad2 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in pagemap_scan_pmd_entry
2023/12/07 15:33 upstream bee0e7762ad2 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in pagemap_scan_pmd_entry
2023/12/07 05:53 upstream bee0e7762ad2 e3299f55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in pagemap_scan_pmd_entry
2023/11/29 23:50 upstream 3b47bc037bd4 6e78f9ce .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in pagemap_scan_pmd_entry
2023/11/19 17:44 upstream 037266a5f723 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 WARNING in pagemap_scan_pmd_entry
2023/12/07 20:49 upstream bee0e7762ad2 28b24332 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in pagemap_scan_pmd_entry
2023/12/07 15:28 upstream bee0e7762ad2 28b24332 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in pagemap_scan_pmd_entry
2023/12/04 16:09 upstream 33cc938e65a9 f819d6f7 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in pagemap_scan_pmd_entry
2023/11/20 09:57 upstream eb3479bc23fa cb976f63 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in pagemap_scan_pmd_entry
2023/11/19 13:10 linux-next eff99d8edbed cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in pagemap_scan_pmd_entry
2023/11/11 13:59 linux-next e27090b1413f 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in pagemap_scan_pmd_entry
* Struck through repros no longer work on HEAD.