syzbot


WARNING in change_protection

Status: upstream: reported C repro on 2022/09/30 05:56
Reported-by: syzbot+2b9b4f0895be09a6dec3@syzkaller.appspotmail.com
Fix commit: 515778e2d790 mm/uffd: fix warning without PTE_MARKER_UFFD_WP compiled in
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-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak 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 ci-upstream-kmsan-gce-386 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-usb], missing on: [ci-qemu2-riscv64]
First crash: 66d, last: 61d

Cause bisection: introduced by (bisect log) [release commit]:
commit 4b0986a3613c92f4ec1bdc7f60ec66fea135991f
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun May 22 19:52:31 2022 +0000

  Linux 5.18

Crash: WARNING: ODEBUG bug in netdev_run_todo (log)
Repro: C syz .config
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
WARNING in change_pte_range C done 2 66d 66d 0/24 closed as dup on 2022/10/07 22:36

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 3605 at include/linux/swapops.h:323 make_pte_marker_entry include/linux/swapops.h:323 [inline]
WARNING: CPU: 1 PID: 3605 at include/linux/swapops.h:323 make_pte_marker include/linux/swapops.h:346 [inline]
WARNING: CPU: 1 PID: 3605 at include/linux/swapops.h:323 change_pte_range mm/mprotect.c:270 [inline]
WARNING: CPU: 1 PID: 3605 at include/linux/swapops.h:323 change_pmd_range mm/mprotect.c:409 [inline]
WARNING: CPU: 1 PID: 3605 at include/linux/swapops.h:323 change_pud_range mm/mprotect.c:438 [inline]
WARNING: CPU: 1 PID: 3605 at include/linux/swapops.h:323 change_p4d_range mm/mprotect.c:459 [inline]
WARNING: CPU: 1 PID: 3605 at include/linux/swapops.h:323 change_protection_range mm/mprotect.c:483 [inline]
WARNING: CPU: 1 PID: 3605 at include/linux/swapops.h:323 change_protection+0x16e9/0x4280 mm/mprotect.c:505
Modules linked in:
CPU: 1 PID: 3605 Comm: syz-executor307 Not tainted 6.0.0-syzkaller-00372-ga5088ee7251e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
RIP: 0010:make_pte_marker_entry include/linux/swapops.h:323 [inline]
RIP: 0010:make_pte_marker include/linux/swapops.h:346 [inline]
RIP: 0010:change_pte_range mm/mprotect.c:270 [inline]
RIP: 0010:change_pmd_range mm/mprotect.c:409 [inline]
RIP: 0010:change_pud_range mm/mprotect.c:438 [inline]
RIP: 0010:change_p4d_range mm/mprotect.c:459 [inline]
RIP: 0010:change_protection_range mm/mprotect.c:483 [inline]
RIP: 0010:change_protection+0x16e9/0x4280 mm/mprotect.c:505
Code: ff 48 8b 84 24 90 00 00 00 80 38 00 0f 85 25 29 00 00 48 8b 44 24 10 48 83 b8 90 00 00 00 00 0f 84 8f f9 ff ff e8 67 65 c3 ff <0f> 0b 48 ba 00 00 00 00 00 fc ff df 48 8b 04 24 48 c1 e8 03 80 3c
RSP: 0018:ffffc9000364f968 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000000000
RDX: ffff888024993b00 RSI: ffffffff81b8af89 RDI: 0000000000000007
RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000000 R12: 0000000000000000
R13: ffff8880000001e8 R14: 0000000000000000 R15: 000000002063e000
FS:  0000555555cc4300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005d84c8 CR3: 000000006f6ec000 CR4: 0000000000350ee0
Call Trace:
 <TASK>
 uffd_wp_range+0xf0/0x180 mm/userfaultfd.c:718
 mwriteprotect_range+0x2ea/0x420 mm/userfaultfd.c:768
 userfaultfd_writeprotect fs/userfaultfd.c:1827 [inline]
 userfaultfd_ioctl+0x438/0x43a0 fs/userfaultfd.c:1999
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fd9a0916bb9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd0cd06148 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd9a0916bb9
RDX: 00000000200000c0 RSI: 00000000c018aa06 RDI: 0000000000000003
RBP: 00007fd9a08dad60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fd9a08dadf0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (13):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/10/05 08:17 upstream a5088ee7251e eab8f949 .config log report syz C WARNING in change_protection
ci-upstream-kasan-gce-root 2022/10/05 07:56 upstream a5088ee7251e eab8f949 .config log report syz C WARNING in change_protection
ci-upstream-kasan-gce-root 2022/10/05 07:35 upstream a5088ee7251e eab8f949 .config log report syz C WARNING in change_protection
ci-upstream-kasan-gce 2022/09/30 12:34 upstream 987a926c1d8a 1d385642 .config log report syz C WARNING in change_protection
ci-upstream-kasan-gce 2022/09/30 10:52 upstream 987a926c1d8a 1d385642 .config log report syz C WARNING in change_protection
ci-upstream-kasan-gce 2022/09/30 10:32 upstream 987a926c1d8a 1d385642 .config log report syz C WARNING in change_protection
ci-upstream-kasan-gce-selinux-root 2022/09/30 05:40 upstream 511cce163b75 1d385642 .config log report syz C WARNING in change_protection
ci-upstream-kasan-gce-root 2022/09/30 05:40 upstream 987a926c1d8a 1d385642 .config log report syz C WARNING in change_protection
ci-upstream-linux-next-kasan-gce-root 2022/09/30 05:35 linux-next aaa11ce2ffc8 1d385642 .config log report syz C WARNING in change_protection
ci-upstream-kasan-gce 2022/09/30 05:27 upstream 511cce163b75 1d385642 .config log report info WARNING in change_protection
ci-upstream-kasan-gce-selinux-root 2022/09/30 05:27 upstream 511cce163b75 1d385642 .config log report info WARNING in change_protection
ci-upstream-kasan-gce-root 2022/09/30 05:26 upstream 987a926c1d8a 1d385642 .config log report info WARNING in change_protection
ci-upstream-linux-next-kasan-gce-root 2022/09/30 05:23 linux-next aaa11ce2ffc8 1d385642 .config log report info WARNING in change_protection
* Struck through repros no longer work on HEAD.