From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94C74C3A589 for ; Wed, 21 Aug 2019 02:20:10 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B5C3722DD3 for ; Wed, 21 Aug 2019 02:20:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ru6a2+QA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5C3722DD3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46CrwK3TcszDrN7 for ; Wed, 21 Aug 2019 12:20:01 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linuxfoundation.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=gregkh@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Ru6a2+QA"; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46Crw52lQrzDrL7 for ; Wed, 21 Aug 2019 12:19:49 +1000 (AEST) Received: from localhost (li1825-44.members.linode.com [172.104.248.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C84EE22DA7; Wed, 21 Aug 2019 02:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566353986; bh=99ObL1cP+jG7BwJuhGr2xRiHMfm0AyVNnY16uyz8mng=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ru6a2+QADULs0wwoFX4YQsebNK/5qd6Kk+kCW16FnuAC9nOB84MNYRAHcouXWGbFA jxDDlseEOkfLWKdjTvog2K/cs7Lp3dY0OF8fKx5O3Mim0AfBj86ctChYFeQLuM/7Lu fYDzulv0SOkwznjOgALPI+7qG9dTtb1IsoG+OBUU= Date: Tue, 20 Aug 2019 19:19:42 -0700 From: Greg Kroah-Hartman To: Chao Yu Subject: Re: [PATCH 5/6] staging: erofs: detect potential multiref due to corrupted images Message-ID: <20190821021942.GA14087@kroah.com> References: <20190819080218.GA42231@138> <20190819103426.87579-1-gaoxiang25@huawei.com> <20190819103426.87579-6-gaoxiang25@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Miao Xie , LKML , stable@vger.kernel.org, weidu.du@huawei.com, linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On Mon, Aug 19, 2019 at 10:57:42PM +0800, Chao Yu wrote: > On 2019-8-19 18:34, Gao Xiang wrote: > > As reported by erofs-utils fuzzer, currently, multiref > > (ondisk deduplication) hasn't been supported for now, > > we should forbid it properly. > > > > Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") > > Cc: # 4.19+ > > Signed-off-by: Gao Xiang > > --- > > drivers/staging/erofs/zdata.c | 16 ++++++++++++++-- > > 1 file changed, 14 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/staging/erofs/zdata.c b/drivers/staging/erofs/zdata.c > > index aae2f2b8353f..5b6fef5181af 100644 > > --- a/drivers/staging/erofs/zdata.c > > +++ b/drivers/staging/erofs/zdata.c > > @@ -816,8 +816,16 @@ static int z_erofs_decompress_pcluster(struct super_block *sb, > > pagenr = z_erofs_onlinepage_index(page); > > > > DBG_BUGON(pagenr >= nr_pages); > > - DBG_BUGON(pages[pagenr]); > > > > + /* > > + * currently EROFS doesn't support multiref(dedup), > > + * so here erroring out one multiref page. > > + */ > > + if (unlikely(pages[pagenr])) { > > + DBG_BUGON(1); > > + SetPageError(pages[pagenr]); > > + z_erofs_onlinepage_endio(pages[pagenr]); > > Should set err meanwhile? I've skipped this patch in this series for now, and applied the rest. thanks, greg k-h