syzbot


BUG: Bad page state (3)

Status: fixed on 2018/02/02 04:39
Reported-by: syzbot+b8845cd4aa5a5e2c6cdc@syzkaller.appspotmail.com
Fix commit: 46eb14a6e158 USB: fix usbmon BUG trigger
First crash: 1683d, last: 1672d
similar bugs (11):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: Bad page state (5) C 171 1257d 1270d 0/23 closed as invalid on 2019/02/27 20:53
linux-4.19 BUG: Bad page state 1 259d 259d 0/1 auto-closed as invalid on 2022/03/21 10:57
linux-4.19 BUG: Bad page state (2) 1 69d 69d 0/1 upstream: reported on 2022/05/29 19:49
upstream BUG: Bad page state (7) 3 707d 764d 0/23 auto-closed as invalid on 2020/12/28 02:44
android-49 BUG: Bad page state 3 1039d 1063d 0/3 auto-closed as invalid on 2020/01/30 18:48
android-54 BUG: Bad page state C 9 860d 891d 0/2 upstream: reported C repro on 2020/02/28 01:20
upstream BUG: Bad page state (2) 1 1714d 1710d 0/23 closed as invalid on 2017/12/06 12:57
upstream BUG: Bad page state (4) 1 1476d 1476d 0/23 closed as invalid on 2018/09/05 12:51
upstream BUG: Bad page state (6) C 2 1256d 1256d 0/23 closed as invalid on 2019/03/01 18:38
upstream BUG: Bad page state C 2 1817d 1818d 3/23 fixed on 2017/10/24 06:54
upstream BUG: Bad page state (8) 355 57d 552d 1/23 upstream: reported on 2021/02/01 10:07

Sample crash report:
BUG: Bad page state in process syzkaller246299  pfn:1c0c5f
page:000000004c4544aa count:1 mapcount:1 mapping:          (null) index:0x0
flags: 0x2fffc0000000004(referenced)
raw: 02fffc0000000004 0000000000000000 0000000000000000 0000000100000000
raw: dead000000000100 dead000000000200 0000000000000000 0000000000000000
page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
Modules linked in:
CPU: 1 PID: 3493 Comm: syzkaller246299 Not tainted 4.15.0-rc6+ #245
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:53
 bad_page+0x230/0x2b0 mm/page_alloc.c:577
 free_pages_check_bad+0x1f0/0x2e0 mm/page_alloc.c:955
 free_pages_check mm/page_alloc.c:964 [inline]
 free_pages_prepare mm/page_alloc.c:1054 [inline]
 free_pcp_prepare mm/page_alloc.c:1079 [inline]
 free_unref_page_prepare mm/page_alloc.c:2622 [inline]
 free_unref_page+0x594/0x9e0 mm/page_alloc.c:2672
 __free_pages+0x107/0x150 mm/page_alloc.c:4297
 free_pages+0x51/0x90 mm/page_alloc.c:4309
 mon_free_buff drivers/usb/mon/mon_bin.c:1331 [inline]
 mon_bin_ioctl+0x653/0xd40 drivers/usb/mon/mon_bin.c:1039
 vfs_ioctl fs/ioctl.c:46 [inline]
 do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 entry_SYSCALL_64_fastpath+0x23/0x9a
RIP: 0033:0x449229
RSP: 002b:00007f0ec9ebdda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006dac3c RCX: 0000000000449229
RDX: 000000000000f0b1 RSI: 0000000000009204 RDI: 0000000000000025
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac38
R13: 6273752f7665642f R14: 00007f0ec9ebe9c0 R15: 0000000000000005
BUG: Bad page map in process syzkaller246299  pte:1c0c5f025 pmd:1c06e8067
page:000000004c4544aa count:1 mapcount:-1 mapping:          (null) index:0x0
flags: 0x2fffc0000000000()
raw: 02fffc0000000000 0000000000000000 0000000000000000 00000001fffffffe
raw: dead000000000100 dead000000000200 0000000000000000 0000000000000000
page dumped because: bad pte
addr:0000000087d85e42 vm_flags:040400d4 anon_vma:          (null) mapping:000000002c816cf1 index:2
file:usbmon0 fault:mon_bin_vma_fault mmap:mon_bin_mmap readpage:          (null)
CPU: 0 PID: 3492 Comm: syzkaller246299 Tainted: G    B            4.15.0-rc6+ #245
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:53
 print_bad_pte+0x681/0x8f0 mm/memory.c:771
 zap_pte_range mm/memory.c:1336 [inline]
 zap_pmd_range mm/memory.c:1438 [inline]
 zap_pud_range mm/memory.c:1467 [inline]
 zap_p4d_range mm/memory.c:1488 [inline]
 unmap_page_range+0x19fd/0x22e0 mm/memory.c:1509
 unmap_single_vma+0x15f/0x2d0 mm/memory.c:1554
 unmap_vmas+0xf1/0x1b0 mm/memory.c:1584
 unmap_region+0x2b9/0x4f0 mm/mmap.c:2511
 do_munmap+0x726/0xdf0 mm/mmap.c:2726
 mmap_region+0x59e/0x15a0 mm/mmap.c:1646
 do_mmap+0x6c0/0xe00 mm/mmap.c:1483
 do_mmap_pgoff include/linux/mm.h:2217 [inline]
 vm_mmap_pgoff+0x1de/0x280 mm/util.c:333
 SYSC_mmap_pgoff mm/mmap.c:1533 [inline]
 SyS_mmap_pgoff+0x23b/0x5f0 mm/mmap.c:1491
 SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
 SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91
 entry_SYSCALL_64_fastpath+0x23/0x9a
RIP: 0033:0x449229
RSP: 002b:00007f0ec9eded98 EFLAGS: 00000212 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00000000006dac24 RCX: 0000000000449229
RDX: 0000000000000003 RSI: 0000000000fff000 RDI: 0000000020000000
RBP: 0000000000000000 R08: 00000000ffffffff R09: 0000000000000000
R10: 0000000000000032 R11: 0000000000000212 R12: 00000000006dac20
R13: 6273752f7665642f R14: 00007f0ec9edf9c0 R15: 0000000000000005
BUG: Bad page state in process syzkaller246299  pfn:1c0c5f
page:000000004c4544aa count:0 mapcount:-1 mapping:          (null) index:0x0
flags: 0x2fffc0000000000()
raw: 02fffc0000000000 0000000000000000 0000000000000000 00000000fffffffe
raw: ffffea0007051720 ffffea00070084e0 0000000000000000 0000000000000000
page dumped because: nonzero mapcount
Modules linked in:
CPU: 0 PID: 3492 Comm: syzkaller246299 Tainted: G    B            4.15.0-rc6+ #245
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:53
 bad_page+0x230/0x2b0 mm/page_alloc.c:577
 free_pages_check_bad+0x1f0/0x2e0 mm/page_alloc.c:955
 free_pages_check mm/page_alloc.c:964 [inline]
 free_pages_prepare mm/page_alloc.c:1054 [inline]
 free_pcp_prepare mm/page_alloc.c:1079 [inline]
 free_unref_page_prepare mm/page_alloc.c:2622 [inline]
 free_unref_page_list+0x4ba/0x1380 mm/page_alloc.c:2692
 release_pages+0xbd1/0x1230 mm/swap.c:820
 free_pages_and_swap_cache+0x2ad/0x400 mm/swap_state.c:322
 tlb_flush_mmu_free+0xb4/0x160 mm/memory.c:260
 tlb_flush_mmu mm/memory.c:269 [inline]
 arch_tlb_finish_mmu+0x9d/0x130 mm/memory.c:284
 tlb_finish_mmu+0x10f/0x190 mm/memory.c:427
 unmap_region+0x35c/0x4f0 mm/mmap.c:2514
 do_munmap+0x726/0xdf0 mm/mmap.c:2726
 mmap_region+0x59e/0x15a0 mm/mmap.c:1646
 do_mmap+0x6c0/0xe00 mm/mmap.c:1483
 do_mmap_pgoff include/linux/mm.h:2217 [inline]
 vm_mmap_pgoff+0x1de/0x280 mm/util.c:333
 SYSC_mmap_pgoff mm/mmap.c:1533 [inline]
 SyS_mmap_pgoff+0x23b/0x5f0 mm/mmap.c:1491
 SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
 SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91
 entry_SYSCALL_64_fastpath+0x23/0x9a
RIP: 0033:0x449229
RSP: 002b:00007f0ec9eded98 EFLAGS: 00000212 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00000000006dac24 RCX: 0000000000449229
RDX: 0000000000000003 RSI: 0000000000fff000 RDI: 0000000020000000
RBP: 0000000000000000 R08: 00000000ffffffff R09: 0000000000000000
R10: 0000000000000032 R11: 0000000000000212 R12: 00000000006dac20
R13: 6273752f7665642f R14: 00007f0ec9edf9c0 R15: 0000000000000005
page:000000006359eadf count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x2fffc0000000000()
raw: 02fffc0000000000 0000000000000000 0000000000000000 00000000ffffffff
raw: ffffea000702dae0 ffffea0007000a20 ffff8801d9842980 0000000000000000
page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) <= 0)
------------[ cut here ]------------
kernel BUG at ./include/linux/mm.h:844!
invalid opcode: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 3492 Comm: syzkaller246299 Tainted: G    B            4.15.0-rc6+ #245
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:get_page include/linux/mm.h:844 [inline]
RIP: 0010:mon_bin_vma_fault+0x2f4/0x400 drivers/usb/mon/mon_bin.c:1239
RSP: 0018:ffff8801bfcc7510 EFLAGS: 00010203
RAX: 0000000000000000 RBX: 1ffff10037f98ea4 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 1ffff10037f98dee RDI: ffffed0037f98e90
RBP: ffff8801bfcc75e8 R08: 0000000000000000 R09: 1ffff10037f98dc0
R10: dffffc0000000000 R11: ffffffff86937c98 R12: 1ffff10037f98ea8
R13: dffffc0000000000 R14: ffff8801bfcc7840 R15: ffffea0007031b80
FS:  00007f0ec9edf700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000208be000 CR3: 00000001c1328003 CR4: 00000000001606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __do_fault+0xeb/0x30f mm/memory.c:3196
 do_read_fault mm/memory.c:3606 [inline]
 do_fault mm/memory.c:3706 [inline]
 handle_pte_fault mm/memory.c:3937 [inline]
 __handle_mm_fault+0x1d8f/0x3ce0 mm/memory.c:4061
 handle_mm_fault+0x334/0x8d0 mm/memory.c:4098
 faultin_page mm/gup.c:502 [inline]
 __get_user_pages+0x50c/0x15f0 mm/gup.c:699
 populate_vma_page_range+0x20e/0x2f0 mm/gup.c:1216
 __mm_populate+0x23a/0x450 mm/gup.c:1266
 mm_populate include/linux/mm.h:2226 [inline]
 vm_mmap_pgoff+0x241/0x280 mm/util.c:338
 SYSC_mmap_pgoff mm/mmap.c:1533 [inline]
 SyS_mmap_pgoff+0x462/0x5f0 mm/mmap.c:1491
 SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
 SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91
 entry_SYSCALL_64_fastpath+0x23/0x9a
RIP: 0033:0x449229
RSP: 002b:00007f0ec9eded98 EFLAGS: 00000212 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00000000006dac24 RCX: 0000000000449229
RDX: 0000000001000004 RSI: 0000000000004000 RDI: 0000000020ac6000
RBP: 0000000000000000 R08: 0000000000000028 R09: 0000000000000000
R10: 0000000000008011 R11: 0000000000000212 R12: 00000000006dac20
R13: 6273752f7665642f R14: 00007f0ec9edf9c0 R15: 0000000000000005
Code: 00 44 89 e0 5b 41 5c 41 5d 41 5e 41 5f 5d c3 41 bc 02 00 00 00 eb bb e8 2b b0 94 fd 48 c7 c6 20 b1 12 86 4c 89 ff e8 bc 98 bd fd <0f> 0b 48 89 95 28 ff ff ff 48 89 85 30 ff ff ff e8 07 b0 94 fd 
RIP: get_page include/linux/mm.h:844 [inline] RSP: ffff8801bfcc7510
RIP: mon_bin_vma_fault+0x2f4/0x400 drivers/usb/mon/mon_bin.c:1239 RSP: ffff8801bfcc7510
---[ end trace eab452fee2528eee ]---

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2018/01/01 07:02 upstream 30a7acd57389 00193447 .config log report syz C
ci-upstream-kasan-gce 2018/01/08 05:19 upstream b84449dc14d2 19c05fff .config log report
ci-upstream-kasan-gce-386 2017/12/28 05:57 upstream 5f520fc31876 7d240098 .config log report