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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 196FFC3A589 for ; Sun, 18 Aug 2019 08:16:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF1A42173B for ; Sun, 18 Aug 2019 08:16:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726175AbfHRIQz convert rfc822-to-8bit (ORCPT ); Sun, 18 Aug 2019 04:16:55 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:51072 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726097AbfHRIQz (ORCPT ); Sun, 18 Aug 2019 04:16:55 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 8558A608311C; Sun, 18 Aug 2019 10:16:52 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id dLQLHM2VGAbe; Sun, 18 Aug 2019 10:16:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 3071B6083139; Sun, 18 Aug 2019 10:16:52 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id HNzNTCQoIICw; Sun, 18 Aug 2019 10:16:52 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id E7E00608311C; Sun, 18 Aug 2019 10:16:50 +0200 (CEST) Date: Sun, 18 Aug 2019 10:16:50 +0200 (CEST) From: Richard Weinberger To: Gao Xiang Cc: Greg Kroah-Hartman , Al Viro , linux-fsdevel , devel , linux-erofs , linux-kernel , Andrew Morton , Stephen Rothwell , tytso , Pavel Machek , David Sterba , Amir Goldstein , Christoph Hellwig , Darrick , Dave Chinner , Jaegeuk Kim , Jan Kara , torvalds , Chao Yu , Miao Xie , Li Guifu , Fang Wei , Gao Xiang Message-ID: <1405781266.69008.1566116210649.JavaMail.zimbra@nod.at> In-Reply-To: <20190817233843.GA16991@hsiangkao-HP-ZHAN-66-Pro-G1> References: <20190817082313.21040-1-hsiangkao@aol.com> <1746679415.68815.1566076790942.JavaMail.zimbra@nod.at> <20190817220706.GA11443@hsiangkao-HP-ZHAN-66-Pro-G1> <1163995781.68824.1566084358245.JavaMail.zimbra@nod.at> <20190817233843.GA16991@hsiangkao-HP-ZHAN-66-Pro-G1> Subject: Re: [PATCH] erofs: move erofs out of staging MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF60 (Linux)/8.8.12_GA_3809) Thread-Topic: erofs: move erofs out of staging Thread-Index: ruyGuw+zrtJwjCvvrW6JXcct54lOmw== Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org ----- Ursprüngliche Mail ----- >> While digging a little into the code I noticed that you have very few >> checks of the on-disk data. >> For example ->u.i_blkaddr. I gave it a try and created a >> malformed filesystem where u.i_blkaddr is 0xdeadbeef, it causes the kernel >> to loop forever around erofs_read_raw_page(). > > I don't fuzz all the on-disk fields for EROFS, I will do later.. > You can see many in-kernel filesystems are still hardening the related > stuff. Anyway, I will dig into this field you mentioned recently, but > I think it can be fixed easily later. This is no excuse to redo all these bugs. :-) I know that many in-kernel filesystems trust the disk ultimately, this is a problem and huge attack vector. Thanks, //richard