BUG: Bad page state

12 views
Skip to first unread message

syzbot

unread,
Sep 9, 2019, 12:07:08 AM9/9/19
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 8fe42840 Merge 4.9.141 into android-4.9
git tree: android-4.9
console output: https://syzkaller.appspot.com/x/log.txt?x=1484fc3a600000
kernel config: https://syzkaller.appspot.com/x/.config?x=22a5ba9f73b6da1d
dashboard link: https://syzkaller.appspot.com/bug?extid=071242116c4f7068cdbb
compiler: gcc (GCC) 8.0.1 20180413 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+071242...@syzkaller.appspotmail.com

BUG: Bad page state in process syz-executor.2 pfn:1d85d5
page:ffffea0007617540 count:0 mapcount:0 mapping: (null) index:0x0
flags: 0x4000000000000080(slab)
page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
bad because of flags: 0x80(slab)
Modules linked in:
CPU: 1 PID: 11132 Comm: syz-executor.2 Not tainted 4.9.141+ #1
ffff8801cc3bf208 ffffffff81b42e79 1ffff10039877e43 ffffea0007617540
1ffffffff0601200 ffff8801cc3bf278 ffffffff82a96a20 ffff8801cc3bf2a0
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.2 pfn:1d83c5
page:ffffea000760f140 count:0 mapcount:0 mapping: (null) index:0x0
flags: 0x4000000000000080(slab)
page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
bad because of flags: 0x80(slab)
Modules linked in:
CPU: 1 PID: 11132 Comm: syz-executor.2 Tainted: G B 4.9.141+ #1
ffff8801cc3bf208 ffffffff81b42e79 1ffff10039877e43 ffffea000760f140
ffffea000760f140 ffff8801cc3bf278 ffffffff82a96a20 ffff8801cc3bf2a0
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
page:ffffea000727b6c0 count:0 mapcount:-127 mapping: (null)
index:0x0
flags: 0x4000000000000000()
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: 11132 Comm: syz-executor.2 Tainted: G B 4.9.141+ #1
task: ffff8801d25f2f80 task.stack: ffff8801cc3b8000
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:ffff8801cc3bf340 EFLAGS: 00010246
RAX: ffffff8100000246 RBX: dffffc0000000000 RCX: ffffc900001d3000
RDX: 0000000000040000 RSI: ffffffff814fe94c RDI: ffff8801d25f382c
RBP: ffff8801cc3bf660 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffea000727b6dc
R13: ffffea000727b6c0 R14: 0000000000000000 R15: ffff8801c7e40340
FS: 00007f0123d0f700(0000) GS:ffff8801db700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fab526bc518 CR3: 00000001d281c000 CR4: 00000000001606b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
e34f25ae00000001 fffffbfff0604a02 ffff8801cc3bf450 ffff8801c7e403d8
ffff8801a7d28000 0000000000001000 ffffffff83c78930 ffff8801c7e403b9
ffff8801cc3bf550 dd612aea60da70d7 ffff8801cc3bf4b0 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 <ffff8801cc3bf340>
---[ end trace be54cd4d698482e3 ]---


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jan 30, 2020, 1:48:06 PM1/30/20
to syzkaller-a...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages