From patchwork Tue Aug 30 02:15:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 9304711 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8649B6077C for ; Tue, 30 Aug 2016 02:16:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66E6020243 for ; Tue, 30 Aug 2016 02:16:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5967E28A5E; Tue, 30 Aug 2016 02:16:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A6AA020243 for ; Tue, 30 Aug 2016 02:16:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756246AbcH3CQC (ORCPT ); Mon, 29 Aug 2016 22:16:02 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:3446 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754185AbcH3CQA (ORCPT ); Mon, 29 Aug 2016 22:16:00 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="10406673" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 30 Aug 2016 10:15:56 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id C75F443464C2; Tue, 30 Aug 2016 10:15:52 +0800 (CST) Received: from localhost.localdomain (10.167.226.34) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.279.2; Tue, 30 Aug 2016 10:15:51 +0800 From: Qu Wenruo To: CC: Lukas Lueg Subject: [PATCH] btrfs-progs: fuzz-test: Add image for wrong chunk item in root tree Date: Tue, 30 Aug 2016 10:15:50 +0800 Message-ID: <20160830021550.11502-1-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-Originating-IP: [10.167.226.34] X-yoursite-MailScanner-ID: C75F443464C2.AC1B7 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: quwenruo@cn.fujitsu.com Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Lukas Lueg Reported by Lukas and the same image from him. DATA_RELOC tree's key type is modifed to CHUNK_ITEM, causing btrfsck interpret it as CHUNK_ITEM and cause 0 num_stripes. Add the image to fuzz-test. Signed-off-by: Lukas Lueg Signed-off-by: Qu Wenruo --- .../images/wrong-chunk-item-in-root-tree.raw.txt | 35 +++++++++++++++++++++ .../images/wrong-chunk-item-in-root-tree.raw.xz | Bin 0 -> 3696 bytes 2 files changed, 35 insertions(+) create mode 100644 tests/fuzz-tests/images/wrong-chunk-item-in-root-tree.raw.txt create mode 100644 tests/fuzz-tests/images/wrong-chunk-item-in-root-tree.raw.xz diff --git a/tests/fuzz-tests/images/wrong-chunk-item-in-root-tree.raw.xz b/tests/fuzz-tests/images/wrong-chunk-item-in-root-tree.raw.xz new file mode 100644 index 0000000000000000000000000000000000000000..5bc2d3b9741f79e097303f04db138fd4187c776d GIT binary patch literal 3696 zcmeH~`8(T*7KgvF7ZHjK9c!btL=#)1#9C@;YN@m|C|zu|#ySit7;0-H*3{IRs!~lw ziz>x5XgjGvi5A^d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