syzbot


kernel BUG in page_table_check_clear

Status: fixed on 2023/07/01 16:05
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+fcf1a817ceb50935ce99@syzkaller.appspotmail.com
Fix commit: 44d0fb387b53 mm: page_table_check: Ensure user pages are not slab pages 0143d148d1e8 usb: usbfs: Enforce page requirements for mmap
First crash: 304d, last: 267d
Cause bisection: failed (error log, bisect log)
  
Discussions (5)
Title Replies (including bot) Last reply
[PATCH v2 4/4] mm: page_table_check: Ensure user pages are not slab pages 6 (6) 2023/05/16 14:17
[PATCH v2 1/4] usb: usbfs: Enforce page requirements for mmap 2 (2) 2023/05/15 14:07
[PATCH 1/4] usb: usbfs: Enforce page requirements for mmap 3 (3) 2023/05/10 15:38
[syzbot] [mm?] kernel BUG in page_table_check_clear 16 (17) 2023/05/10 13:17
[PATCH 4/4] mm: page_table_check: Ensure user pages are not slab pages 1 (1) 2023/05/10 08:55

Sample crash report:
------------[ cut here ]------------
kernel BUG at mm/page_table_check.c:83!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5684 Comm: syz-executor989 Not tainted 6.3.0-syzkaller-11733-g825a0714d2b3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
RIP: 0010:page_table_check_clear.part.0+0x323/0x380 mm/page_table_check.c:83
Code: ff 89 de e8 3f 62 a2 ff 85 db 0f 89 7c fe ff ff e8 12 66 a2 ff 0f 0b e8 0b 66 a2 ff 0f 0b e8 04 66 a2 ff 0f 0b e8 fd 65 a2 ff <0f> 0b e8 f6 65 a2 ff 0f 0b 48 c7 c7 00 f7 e6 91 e8 f8 2c f5 ff e9
RSP: 0018:ffffc900044ff838 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff888013cb7010 RCX: 0000000000000000
RDX: ffff888029f25940 RSI: ffffffff81e1f843 RDI: 0000000000000005
RBP: ffff888013cb6fd0 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000001 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000040 CR3: 0000000077cb5000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 page_table_check_clear include/linux/mmzone.h:2003 [inline]
 __page_table_check_pte_clear+0x265/0x2b0 mm/page_table_check.c:155
 page_table_check_pte_clear include/linux/page_table_check.h:55 [inline]
 ptep_get_and_clear_full arch/x86/include/asm/pgtable.h:1086 [inline]
 zap_pte_range mm/memory.c:1413 [inline]
 zap_pmd_range mm/memory.c:1563 [inline]
 zap_pud_range mm/memory.c:1592 [inline]
 zap_p4d_range mm/memory.c:1613 [inline]
 unmap_page_range+0x2aa6/0x38e0 mm/memory.c:1634
 unmap_single_vma+0x19a/0x2b0 mm/memory.c:1680
 unmap_vmas+0x234/0x380 mm/memory.c:1719
 exit_mmap+0x190/0x930 mm/mmap.c:3111
 __mmput+0x128/0x4c0 kernel/fork.c:1350
 mmput+0x60/0x70 kernel/fork.c:1372
 exit_mm kernel/exit.c:564 [inline]
 do_exit+0x9d7/0x2960 kernel/exit.c:858
 do_group_exit+0xd4/0x2a0 kernel/exit.c:1021
 __do_sys_exit_group kernel/exit.c:1032 [inline]
 __se_sys_exit_group kernel/exit.c:1030 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1030
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f0c2f233679
Code: Unable to access opcode bytes at 0x7f0c2f23364f.
RSP: 002b:00007ffc87dd3aa8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f0c2f2a83f0 RCX: 00007f0c2f233679
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000000
R10: 0000000000000011 R11: 0000000000000246 R12: 00007f0c2f2a83f0
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:page_table_check_clear.part.0+0x323/0x380 mm/page_table_check.c:83
Code: ff 89 de e8 3f 62 a2 ff 85 db 0f 89 7c fe ff ff e8 12 66 a2 ff 0f 0b e8 0b 66 a2 ff 0f 0b e8 04 66 a2 ff 0f 0b e8 fd 65 a2 ff <0f> 0b e8 f6 65 a2 ff 0f 0b 48 c7 c7 00 f7 e6 91 e8 f8 2c f5 ff e9
RSP: 0018:ffffc900044ff838 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff888013cb7010 RCX: 0000000000000000
RDX: ffff888029f25940 RSI: ffffffff81e1f843 RDI: 0000000000000005
RBP: ffff888013cb6fd0 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000001 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000040 CR3: 0000000077cb5000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (17):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/01 01:28 upstream 825a0714d2b3 62df2017 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce kernel BUG in page_table_check_clear
2023/05/01 00:55 upstream 825a0714d2b3 62df2017 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in page_table_check_clear
2023/05/01 02:32 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 62df2017 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in page_table_check_clear
2023/06/04 04:40 upstream e5282a7d8f6b a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce kernel BUG in page_table_check_clear
2023/05/31 18:13 upstream 48b1320a674e e2a77acd .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in page_table_check_clear
2023/05/31 14:57 upstream 48b1320a674e e2a77acd .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in page_table_check_clear
2023/05/30 06:16 upstream 8b817fded42d cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in page_table_check_clear
2023/05/30 06:04 upstream 8b817fded42d cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in page_table_check_clear
2023/05/14 04:16 upstream d4d58949a6ea 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel BUG in page_table_check_clear
2023/05/10 14:57 upstream 16a8829130ca 0fbd49f4 .config console log report info ci-upstream-kasan-gce kernel BUG in page_table_check_clear
2023/05/04 01:57 upstream 89b7fd5d7f3c b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce kernel BUG in page_table_check_clear
2023/05/02 05:56 upstream c8c655c34e33 62df2017 .config console log report info ci-upstream-kasan-gce kernel BUG in page_table_check_clear
2023/05/01 00:40 upstream 825a0714d2b3 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in page_table_check_clear
2023/05/30 15:31 linux-next 715abedee4cd 8d5c7541 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in page_table_check_clear
2023/05/11 10:08 linux-next aabe491169be 0fbd49f4 .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in page_table_check_clear
2023/06/07 01:16 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci cd6bd67ad7ab a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in page_table_check_clear
2023/05/22 23:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f1fcbaa18b28 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in page_table_check_clear
* Struck through repros no longer work on HEAD.