syzbot


BUG: Bad page state

Status: auto-closed as invalid on 2020/01/30 18:48
Reported-by: syzbot+071242116c4f7068cdbb@syzkaller.appspotmail.com
First crash: 1900d, last: 1876d
Similar bugs (15)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: Bad page state (3) usb C 3 2509d 2516d 4/28 fixed on 2018/02/02 04:39
linux-4.14 BUG: Bad page state C 9 638d 780d 0/1 upstream: reported C repro on 2022/10/03 07:33
upstream BUG: Bad page state (5) mm C 171 2094d 2107d 0/28 closed as invalid on 2019/02/27 20:53
linux-4.19 BUG: Bad page state 1 1096d 1096d 0/1 auto-closed as invalid on 2022/03/21 10:57
linux-4.19 BUG: Bad page state (2) 1 906d 906d 0/1 auto-obsoleted due to no activity on 2022/09/26 19:49
upstream BUG: Bad page state (7) mm 3 1544d 1601d 0/28 auto-closed as invalid on 2020/12/28 02:44
linux-6.1 BUG: Bad page state origin:upstream missing-backport C done 704 29d 544d 0/3 upstream: reported C repro on 2023/05/27 10:10
linux-4.19 BUG: Bad page state (3) C error 1 780d 780d 0/1 upstream: reported C repro on 2022/10/02 20:53
android-54 BUG: Bad page state C 9 1697d 1728d 0/2 auto-obsoleted due to no activity on 2022/08/26 22:10
upstream BUG: Bad page state (2) crypto 1 2551d 2547d 0/28 closed as invalid on 2017/12/06 12:57
upstream BUG: Bad page state (4) sound 1 2313d 2313d 0/28 closed as invalid on 2018/09/05 12:51
upstream BUG: Bad page state (6) mm C 2 2093d 2093d 0/28 closed as invalid on 2019/03/01 18:38
upstream BUG: Bad page state C 2 2654d 2655d 3/28 fixed on 2017/10/24 06:54
linux-5.15 BUG: Bad page state origin:upstream missing-backport C error 977 29d 585d 0/3 upstream: reported C repro on 2023/04/16 11:16
upstream BUG: Bad page state (8) jfs mm C 12982 31d 1389d 1/28 closed as invalid on 2024/10/28 14:11

Sample crash report:
input: syz1 as /devices/virtual/input/input98
BUG: Bad page state in process syz-executor.4  pfn:9f7f1
page:ffffea00027dfc40 count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x80(slab)
page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
bad because of flags: 0x80(slab)
Modules linked in:
CPU: 1 PID: 32583 Comm: syz-executor.4 Not tainted 4.9.141+ #1
 ffff88009924f208 ffffffff81b42e79 1ffff10013249e43 ffffea00027dfc40
 1ffffffff0601200 ffff88009924f278 ffffffff82a96a20 ffff88009924f2a0
 ffffffff814fc6eb 0000000041b58ab3 ffffffff82e358ba ffffffff8141d2e0
Call Trace:
 [<ffffffff81b42e79>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81b42e79>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff814fc6eb>] bad_page.cold.29+0xc6/0x107 mm/page_alloc.c:582
 [<ffffffff8141d52e>] free_pages_check_bad+0xfe/0x150 mm/page_alloc.c:962
 [<ffffffff81424956>] free_pages_check mm/page_alloc.c:971 [inline]
 [<ffffffff81424956>] free_pages_prepare mm/page_alloc.c:1062 [inline]
 [<ffffffff81424956>] free_pcp_prepare mm/page_alloc.c:1087 [inline]
 [<ffffffff81424956>] free_hot_cold_page+0x6a6/0x9d0 mm/page_alloc.c:2473
 [<ffffffff8143b98b>] __put_single_page mm/swap.c:78 [inline]
 [<ffffffff8143b98b>] __put_page+0x6b/0xa0 mm/swap.c:102
 [<ffffffff815cf793>] put_page include/linux/mm.h:785 [inline]
 [<ffffffff815cf793>] dio_cleanup fs/direct-io.c:433 [inline]
 [<ffffffff815cf793>] do_blockdev_direct_IO fs/direct-io.c:1276 [inline]
 [<ffffffff815cf793>] __blockdev_direct_IO+0x1b03/0xbd10 fs/direct-io.c:1360
 [<ffffffff816de318>] ext4_direct_IO_write fs/ext4/inode.c:3507 [inline]
 [<ffffffff816de318>] ext4_direct_IO+0x978/0x29c0 fs/ext4/inode.c:3663
 [<ffffffff81411f64>] generic_file_direct_write+0x284/0x510 mm/filemap.c:2655
 [<ffffffff8141240f>] __generic_file_write_iter+0x21f/0x540 mm/filemap.c:2835
 [<ffffffff816b328d>] ext4_file_write_iter+0x63d/0xd70 fs/ext4/file.c:165
 [<ffffffff815071c7>] vfs_iter_write+0x2d7/0x450 fs/read_write.c:390
 [<ffffffff815ae4fb>] iter_file_splice_write+0x5fb/0xb30 fs/splice.c:768
 [<ffffffff815b066d>] do_splice_from fs/splice.c:870 [inline]
 [<ffffffff815b066d>] do_splice fs/splice.c:1166 [inline]
 [<ffffffff815b066d>] SYSC_splice fs/splice.c:1416 [inline]
 [<ffffffff815b066d>] SyS_splice+0xe4d/0x14d0 fs/splice.c:1399
 [<ffffffff810056ef>] do_syscall_64+0x19f/0x550 arch/x86/entry/common.c:285
 [<ffffffff82817893>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb
BUG: Bad page state in process syz-executor.4  pfn:9f008
page:ffffea00027c0200 count:0 mapcount:0 mapping:          (null) index:0x0 compound_mapcount: 1
flags: 0x4080(slab|head)
page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
bad because of flags: 0x80(slab)
Modules linked in:
CPU: 1 PID: 32583 Comm: syz-executor.4 Tainted: G    B           4.9.141+ #1
 ffff88009924f168 ffffffff81b42e79 1ffff10013249e2f ffffea00027c0200
 ffffea00027c0218 ffff88009924f1d8 ffffffff82a96a20 ffff88009924f200
 ffffffff814fc6eb 0000000041b58ab3 ffffffff82e358ba ffffffff8141d2e0
Call Trace:
 [<ffffffff81b42e79>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81b42e79>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff814fc6eb>] bad_page.cold.29+0xc6/0x107 mm/page_alloc.c:582
 [<ffffffff8141d52e>] free_pages_check_bad+0xfe/0x150 mm/page_alloc.c:962
 [<ffffffff8141dee0>] free_pages_check mm/page_alloc.c:971 [inline]
 [<ffffffff8141dee0>] free_pages_prepare mm/page_alloc.c:1062 [inline]
 [<ffffffff8141dee0>] __free_pages_ok+0x810/0x1880 mm/page_alloc.c:1275
 [<ffffffff8141efae>] free_compound_page+0x5e/0x70 mm/page_alloc.c:606
 [<ffffffff8143b8f7>] __put_compound_page+0x77/0xa0 mm/swap.c:94
 [<ffffffff8143b9a0>] __put_page+0x80/0xa0 mm/swap.c:100
 [<ffffffff815cf793>] put_page include/linux/mm.h:785 [inline]
 [<ffffffff815cf793>] dio_cleanup fs/direct-io.c:433 [inline]
 [<ffffffff815cf793>] do_blockdev_direct_IO fs/direct-io.c:1276 [inline]
 [<ffffffff815cf793>] __blockdev_direct_IO+0x1b03/0xbd10 fs/direct-io.c:1360
 [<ffffffff816de318>] ext4_direct_IO_write fs/ext4/inode.c:3507 [inline]
 [<ffffffff816de318>] ext4_direct_IO+0x978/0x29c0 fs/ext4/inode.c:3663
 [<ffffffff81411f64>] generic_file_direct_write+0x284/0x510 mm/filemap.c:2655
 [<ffffffff8141240f>] __generic_file_write_iter+0x21f/0x540 mm/filemap.c:2835
 [<ffffffff816b328d>] ext4_file_write_iter+0x63d/0xd70 fs/ext4/file.c:165
 [<ffffffff815071c7>] vfs_iter_write+0x2d7/0x450 fs/read_write.c:390
 [<ffffffff815ae4fb>] iter_file_splice_write+0x5fb/0xb30 fs/splice.c:768
 [<ffffffff815b066d>] do_splice_from fs/splice.c:870 [inline]
 [<ffffffff815b066d>] do_splice fs/splice.c:1166 [inline]
 [<ffffffff815b066d>] SYSC_splice fs/splice.c:1416 [inline]
 [<ffffffff815b066d>] SyS_splice+0xe4d/0x14d0 fs/splice.c:1399
 [<ffffffff810056ef>] do_syscall_64+0x19f/0x550 arch/x86/entry/common.c:285
 [<ffffffff82817893>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb
page:ffffea00027c0580 count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x0()
page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0)
------------[ cut here ]------------
kernel BUG at ./include/linux/mm.h:450!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 32583 Comm: syz-executor.4 Tainted: G    B           4.9.141+ #1
task: ffff88017b69af80 task.stack: ffff880099248000
RIP: 0010:[<ffffffff815d52ac>]  [<ffffffff815d52ac>] put_page_testzero include/linux/mm.h:450 [inline]
RIP: 0010:[<ffffffff815d52ac>]  [<ffffffff815d52ac>] put_page include/linux/mm.h:784 [inline]
RIP: 0010:[<ffffffff815d52ac>]  [<ffffffff815d52ac>] dio_cleanup fs/direct-io.c:433 [inline]
RIP: 0010:[<ffffffff815d52ac>]  [<ffffffff815d52ac>] do_blockdev_direct_IO fs/direct-io.c:1309 [inline]
RIP: 0010:[<ffffffff815d52ac>]  [<ffffffff815d52ac>] __blockdev_direct_IO+0x761c/0xbd10 fs/direct-io.c:1360
RSP: 0018:ffff88009924f340  EFLAGS: 00010246
RAX: 000000009924f2f8 RBX: dffffc0000000000 RCX: ffffc90003565000
RDX: 0000000000040000 RSI: ffffffff814fe94c RDI: ffff88017b69b82c
RBP: ffff88009924f660 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffea00027c059c
R13: ffffea00027c0580 R14: 0000000000000000 R15: ffff88019fbe96c0
FS:  00007f1856db2700(0000) GS:ffff8801db700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000262e978 CR3: 00000001d752c000 CR4: 00000000001606b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
 1ffff10013249e74 fffffbfff0604a02 ffff88009924f450 ffff88019fbe9758
 ffff8800b16d0000 0000000000001000 ffffffff83c78930 ffff88019fbe9739
 ffff88009924f550 0c3fe07c48df8c80 ffff88009924f4b0 0000000000000fff
Call Trace:
 [<ffffffff816de318>] ext4_direct_IO_write fs/ext4/inode.c:3507 [inline]
 [<ffffffff816de318>] ext4_direct_IO+0x978/0x29c0 fs/ext4/inode.c:3663
 [<ffffffff81411f64>] generic_file_direct_write+0x284/0x510 mm/filemap.c:2655
 [<ffffffff8141240f>] __generic_file_write_iter+0x21f/0x540 mm/filemap.c:2835
 [<ffffffff816b328d>] ext4_file_write_iter+0x63d/0xd70 fs/ext4/file.c:165
 [<ffffffff815071c7>] vfs_iter_write+0x2d7/0x450 fs/read_write.c:390
 [<ffffffff815ae4fb>] iter_file_splice_write+0x5fb/0xb30 fs/splice.c:768
 [<ffffffff815b066d>] do_splice_from fs/splice.c:870 [inline]
 [<ffffffff815b066d>] do_splice fs/splice.c:1166 [inline]
 [<ffffffff815b066d>] SYSC_splice fs/splice.c:1416 [inline]
 [<ffffffff815b066d>] SyS_splice+0xe4d/0x14d0 fs/splice.c:1399
 [<ffffffff810056ef>] do_syscall_64+0x19f/0x550 arch/x86/entry/common.c:285
 [<ffffffff82817893>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb
Code: ff ff e8 d8 67 d4 ff 4c 89 ef e8 90 66 e6 ff e9 3d ff ff ff 4d 89 f5 e8 c3 67 d4 ff 48 c7 c6 60 8a ab 82 4c 89 ef e8 d4 9a eb ff <0f> 0b e8 ad 67 d4 ff 4c 89 e7 e8 b5 fe 4f 00 49 8d 7f 0c 48 89 
RIP  [<ffffffff815d52ac>] put_page_testzero include/linux/mm.h:450 [inline]
RIP  [<ffffffff815d52ac>] put_page include/linux/mm.h:784 [inline]
RIP  [<ffffffff815d52ac>] dio_cleanup fs/direct-io.c:433 [inline]
RIP  [<ffffffff815d52ac>] do_blockdev_direct_IO fs/direct-io.c:1309 [inline]
RIP  [<ffffffff815d52ac>] __blockdev_direct_IO+0x761c/0xbd10 fs/direct-io.c:1360
 RSP <ffff88009924f340>
---[ end trace 6d1904ac69df016c ]---

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/02 18:47 https://android.googlesource.com/kernel/common android-4.9 8fe428403e30 2e29b534 .config console log report ci-android-49-kasan-gce
2019/09/27 07:51 https://android.googlesource.com/kernel/common android-4.9 8fe428403e30 2f1548bc .config console log report ci-android-49-kasan-gce
2019/09/09 03:06 https://android.googlesource.com/kernel/common android-4.9 8fe428403e30 a60cb4cd .config console log report ci-android-49-kasan-gce
* Struck through repros no longer work on HEAD.