From patchwork Mon Aug 19 10:34:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gao Xiang X-Patchwork-Id: 11100647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0ECAD184E for ; Mon, 19 Aug 2019 10:35:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF49B28698 for ; Mon, 19 Aug 2019 10:35:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3CC1286B3; Mon, 19 Aug 2019 10:35:46 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 968EA28698 for ; Mon, 19 Aug 2019 10:35:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727082AbfHSKfS (ORCPT ); Mon, 19 Aug 2019 06:35:18 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:55472 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726477AbfHSKfS (ORCPT ); Mon, 19 Aug 2019 06:35:18 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 51609BA7CB78A0572AFD; Mon, 19 Aug 2019 18:35:12 +0800 (CST) Received: from architecture4.huawei.com (10.140.130.215) by smtp.huawei.com (10.3.19.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 19 Aug 2019 18:35:03 +0800 From: Gao Xiang To: Chao Yu , Greg Kroah-Hartman , , CC: LKML , , "Chao Yu" , Miao Xie , , Fang Wei , Gao Xiang Subject: [PATCH 0/6] staging: erofs: first stage of corrupted compressed images Date: Mon, 19 Aug 2019 18:34:20 +0800 Message-ID: <20190819103426.87579-1-gaoxiang25@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190819080218.GA42231@138> References: <20190819080218.GA42231@138> MIME-Version: 1.0 X-Originating-IP: [10.140.130.215] X-CFilter-Loop: Reflected Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi all, I have fuzzed EROFS for about a day and observed the following issues due to corrupted compression images by my first fuzzer (It seems ok for uncompressed images for now). Now it can survive for 10+ minutes on my PC (Let me send out what I'm done and I will dig it more deeply...) All the fixes are trivial. Note that those have dependency on EFSCORRUPTED, so for-next is needed and I will manually backport them by hand due to many cleanup patches... Thanks, Gao Xiang Gao Xiang (6): staging: erofs: some compressed cluster should be submitted for corrupted images staging: erofs: cannot set EROFS_V_Z_INITED_BIT if fill_inode_lazy fails staging: erofs: add two missing erofs_workgroup_put for corrupted images staging: erofs: avoid loop in submit chains staging: erofs: detect potential multiref due to corrupted images staging: erofs: avoid endless loop of invalid lookback distance 0 drivers/staging/erofs/zdata.c | 46 ++++++++++++++++++++++++++--------- drivers/staging/erofs/zmap.c | 9 +++++-- 2 files changed, 42 insertions(+), 13 deletions(-)