syzbot


BUG: Bad page map (3)

Status: premoderation: reported on 2024/07/12 00:18
Reported-by: syzbot+a17eb6fa0d100f35b5a7@syzkaller.appspotmail.com
First crash: 211d, last: 65d
Similar bugs (18)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 BUG: Bad page map 1 703d 703d 0/2 auto-obsoleted due to no activity on 2023/06/05 15:46
linux-4.19 BUG: Bad page map (3) 1 935d 935d 0/1 auto-obsoleted due to no activity on 2022/11/15 21:40
upstream BUG: Bad page map (5) mm io-uring C 35 755d 1013d 22/28 fixed on 2023/02/24 13:50
android-5-15 BUG: Bad page map 1 217d 217d 0/2 auto-obsoleted due to no activity on 2024/10/03 11:06
linux-4.19 BUG: Bad page map (2) 10 1121d 1301d 0/1 auto-closed as invalid on 2022/05/13 11:22
android-54 BUG: Bad page map (3) 10 246d 363d 0/2 auto-obsoleted due to no activity on 2024/09/04 10:38
upstream BUG: Bad page map (2) mm syz 127 2347d 2403d 0/28 closed as invalid on 2018/09/05 12:51
upstream BUG: Bad page map (8) mm C done done 10 21d 204d 0/28 upstream: reported C repro on 2024/07/18 22:51
android-5-10 BUG: Bad page map (2) 1 484d 484d 0/2 auto-obsoleted due to no activity on 2024/01/10 02:50
upstream BUG: Bad page map mm 1 2406d 2406d 0/28 closed as invalid on 2018/07/08 13:28
upstream BUG: Bad page map (3) kernel 4 2217d 2342d 0/28 auto-closed as invalid on 2019/07/13 00:02
linux-4.19 BUG: Bad page map 2 1618d 1677d 0/1 auto-closed as invalid on 2021/01/01 08:20
upstream BUG: Bad page map (7) mm C done 19 495d 517d 25/28 fixed on 2023/12/21 03:45
android-54 BUG: Bad page map (2) 7 484d 602d 0/2 auto-obsoleted due to no activity on 2024/01/10 18:32
upstream BUG: Bad page map (4) mm 39 1162d 1799d 0/28 auto-closed as invalid on 2022/04/02 04:25
linux-4.14 BUG: Bad page map 1 1664d 1664d 0/1 auto-closed as invalid on 2020/11/16 16:05
upstream BUG: Bad page map (6) mm 1 669d 665d 0/28 auto-obsoleted due to no activity on 2023/07/09 13:20
android-54 BUG: Bad page map 1 897d 897d 0/2 auto-obsoleted due to no activity on 2022/12/23 04:05

Sample crash report:
BUG: Bad page map in process syz.4.9342  pte:100000000 pmd:1313ed067
addr:0000000020201000 vm_flags:000000fe anon_vma:0000000000000000 mapping:ffff888116815410 index:201
file:dev/zero fault:shmem_fault mmap:shmem_mmap readpage:0x0
CPU: 1 PID: 31939 Comm: syz.4.9342 Not tainted 5.10.226-syzkaller-00326-gab7c0abef9cf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
 dump_stack+0x15/0x17 lib/dump_stack.c:135
 print_bad_pte+0x543/0x560 mm/memory.c:568
 zap_pte_range mm/memory.c:1365 [inline]
 zap_pmd_range mm/memory.c:1435 [inline]
 zap_pud_range mm/memory.c:1464 [inline]
 zap_p4d_range mm/memory.c:1485 [inline]
 unmap_page_range+0x17f2/0x23b0 mm/memory.c:1506
 unmap_single_vma mm/memory.c:1551 [inline]
 unmap_vmas+0x37f/0x4f0 mm/memory.c:1583
 exit_mmap+0x2f2/0x5c0 mm/mmap.c:3355
 __mmput+0x95/0x2d0 kernel/fork.c:1153
 mmput+0x59/0x170 kernel/fork.c:1176
 exit_mm kernel/exit.c:539 [inline]
 do_exit+0xbda/0x2a50 kernel/exit.c:850
 do_group_exit+0x141/0x310 kernel/exit.c:985
 get_signal+0x10a0/0x1410 kernel/signal.c:2790
 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805
 handle_signal_work kernel/entry/common.c:145 [inline]
 exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline]
 syscall_exit_to_user_mode+0xa2/0x1a0 kernel/entry/common.c:274
 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f1c06c8bf19
Code: Unable to access opcode bytes at RIP 0x7f1c06c8beef.
RSP: 002b:00007f1c052c10e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f1c06e52168 RCX: 00007f1c06c8bf19
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f1c06e52168
RBP: 00007f1c06e52160 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1c06e5216c
R13: 0000000000000000 R14: 00007ffd8031d9e0 R15: 00007ffd8031dac8
BUG: Bad page cache in process syz.4.9342  pfn:140dd6
page:ffffea0005037580 refcount:3 mapcount:1 mapping:ffff888116815410 index:0x201 pfn:0x140dd6
aops:shmem_aops ino:15e1
flags: 0x4000000000080017(locked|referenced|uptodate|lru|swapbacked)
raw: 4000000000080017 ffffea0005266488 ffff88810f48e000 ffff888116815410
raw: 0000000000000201 0000000000000000 0000000300000000 ffff88810f4b0000
page dumped because: still mapped when deleted
page->mem_cgroup:ffff88810f4b0000
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Movable, gfp_mask 0x100cca(GFP_HIGHUSER_MOVABLE), pid 31935, ts 1789331802953, free_ts 1789029721501
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x166/0x180 mm/page_alloc.c:2462
 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348
 __alloc_pages include/linux/gfp.h:544 [inline]
 __alloc_pages_node include/linux/gfp.h:557 [inline]
 alloc_pages_node include/linux/gfp.h:571 [inline]
 alloc_pages include/linux/gfp.h:590 [inline]
 shmem_alloc_page+0x257/0x420 mm/shmem.c:1580
 shmem_alloc_and_acct_page+0x395/0x8e0 mm/shmem.c:1605
 shmem_getpage_gfp+0x891/0x2480 mm/shmem.c:1918
 shmem_fault+0x2d4/0x7b0 mm/shmem.c:2139
 __do_fault mm/memory.c:4036 [inline]
 do_read_fault mm/memory.c:4371 [inline]
 do_fault mm/memory.c:4499 [inline]
 handle_pte_fault+0x237f/0x3e10 mm/memory.c:4763
 __handle_mm_fault mm/memory.c:4916 [inline]
 handle_mm_fault+0x11d6/0x1a10 mm/memory.c:5330
 faultin_page mm/gup.c:902 [inline]
 __get_user_pages+0xb31/0x11b0 mm/gup.c:1121
 populate_vma_page_range mm/gup.c:1454 [inline]
 __mm_populate+0x363/0x520 mm/gup.c:1502
 mm_populate include/linux/mm.h:2782 [inline]
 vm_mmap_pgoff+0x264/0x390 mm/util.c:548
 ksys_mmap_pgoff+0xf8/0x1f0 mm/mmap.c:1701
 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:95 [inline]
 __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
 __x64_sys_mmap+0x103/0x120 arch/x86/kernel/sys_x86_64.c:86
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:28 [inline]
 free_pages_prepare mm/page_alloc.c:1349 [inline]
 free_pcp_prepare mm/page_alloc.c:1421 [inline]
 free_unref_page_prepare+0x2ae/0x2d0 mm/page_alloc.c:3336
 free_unref_page_list+0x122/0xb20 mm/page_alloc.c:3443
 release_pages+0xea0/0xef0 mm/swap.c:1103
 free_pages_and_swap_cache+0x8a/0xa0 mm/swap_state.c:356
 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
 tlb_flush_mmu+0xd0/0x180 mm/mmu_gather.c:247
 zap_pte_range mm/memory.c:1385 [inline]
 zap_pmd_range mm/memory.c:1435 [inline]
 zap_pud_range mm/memory.c:1464 [inline]
 zap_p4d_range mm/memory.c:1485 [inline]
 unmap_page_range+0x1f34/0x23b0 mm/memory.c:1506
 unmap_single_vma mm/memory.c:1551 [inline]
 unmap_vmas+0x37f/0x4f0 mm/memory.c:1583
 exit_mmap+0x2f2/0x5c0 mm/mmap.c:3355
 __mmput+0x95/0x2d0 kernel/fork.c:1153
 mmput+0x59/0x170 kernel/fork.c:1176
 exit_mm kernel/exit.c:539 [inline]
 do_exit+0xbda/0x2a50 kernel/exit.c:850
 do_group_exit+0x141/0x310 kernel/exit.c:985
 get_signal+0x10a0/0x1410 kernel/signal.c:2790
 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805
 handle_signal_work kernel/entry/common.c:145 [inline]
 exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline]
 syscall_exit_to_user_mode+0xa2/0x1a0 kernel/entry/common.c:274
CPU: 1 PID: 31939 Comm: syz.4.9342 Tainted: G    B             5.10.226-syzkaller-00326-gab7c0abef9cf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
 dump_stack+0x15/0x17 lib/dump_stack.c:135
 unaccount_page_cache_page+0x752/0xa80 mm/filemap.c:185
 __delete_from_page_cache+0xd0/0x5d0 mm/filemap.c:243
 delete_from_page_cache+0xb6/0xf0 mm/filemap.c:279
 truncate_inode_page+0x5d/0x70 mm/truncate.c:225
 shmem_undo_range+0x696/0x1a60 mm/shmem.c:960
 shmem_truncate_range mm/shmem.c:1069 [inline]
 shmem_evict_inode+0x215/0x9d0 mm/shmem.c:1169
 evict+0x526/0x9c0 fs/inode.c:612
 iput_final fs/inode.c:1736 [inline]
 iput+0x632/0x7e0 fs/inode.c:1762
 dentry_unlink_inode+0x2ea/0x3d0 fs/dcache.c:378
 __dentry_kill+0x447/0x650 fs/dcache.c:583
 dentry_kill+0xc0/0x2a0
 dput+0x40/0x80 fs/dcache.c:883
 __fput+0x52e/0x7b0 fs/file_table.c:294
 ____fput+0x15/0x20 fs/file_table.c:314
 task_work_run+0x129/0x190 kernel/task_work.c:189
 exit_task_work include/linux/task_work.h:33 [inline]
 do_exit+0xc83/0x2a50 kernel/exit.c:863
 do_group_exit+0x141/0x310 kernel/exit.c:985
 get_signal+0x10a0/0x1410 kernel/signal.c:2790
 arch_do_signal_or_restart+0xbd/0x17c0 arch/x86/kernel/signal.c:805
 handle_signal_work kernel/entry/common.c:145 [inline]
 exit_to_user_mode_loop+0x9b/0xd0 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline]
 syscall_exit_to_user_mode+0xa2/0x1a0 kernel/entry/common.c:274
 do_syscall_64+0x40/0x70 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f1c06c8bf19
Code: Unable to access opcode bytes at RIP 0x7f1c06c8beef.
RSP: 002b:00007f1c052c10e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f1c06e52168 RCX: 00007f1c06c8bf19
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f1c06e52168
RBP: 00007f1c06e52160 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1c06e5216c
R13: 0000000000000000 R14: 00007ffd8031d9e0 R15: 00007ffd8031dac8

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/04 10:22 android13-5.10-lts ab7c0abef9cf b50eb251 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 BUG: Bad page map
2024/09/20 00:59 android13-5.10-lts 8d23314f588a 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 BUG: Bad page map
2024/07/12 00:17 android13-5.10-lts 3feee789f446 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 BUG: Bad page map
* Struck through repros no longer work on HEAD.