Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp464164ima; Fri, 15 Mar 2019 06:52:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzT3k5rXEf+a0pSo7icDj7IsPM2yfgbV4FVtMHtd5sGows3ZBiyRipLc1+/S52Ur/XXHZhP X-Received: by 2002:a63:4f43:: with SMTP id p3mr3578341pgl.207.1552657975883; Fri, 15 Mar 2019 06:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552657975; cv=none; d=google.com; s=arc-20160816; b=AH7s11mtk3cY/1kPfTEii5/czRCOYuBpr7ensDmgoNI0pcMmIaKpr3Bjus0vXx8PN/ yXO0g7CFq+56y2fTMhnZ1JUe3lfS02ThAlMVMy8GWNnypglHH5h66jUCHaYXiJw/agmO iZJX2ONyXzidzY28tvIRaOyNhTL/4P96t3fyXJWe1/ZAXrhEvkcYCCEGXh536HTH07dQ ooskI030Go7OjwPoW7niGljQ0jVuFlnQGT8jb3tlKOpHUnh86srvyVnMWm05aByO2lUE HVg26WyK7/7MAyM0+2P4XNagQ5+mU+EvrHUGa1VyfO+vPO38g+uhgNWijfwKgM1x+gDz X/MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=xMYaq2zUAdhyEEhGPxq28JT9VqtFQ++sgSlBCcWF1t0=; b=HBJEMESmnxE/3ybYpY0CuQys38nJP1zKZz1E0D71pVF+JCXJcILrTJa4BOREb/RohX /2+HhZrjjy7G4qlQ48p3LDpQx22KhnPqs3ytRT07S54HQb0w/fF2HYOB7zC39okvWIBr jV+NP5vsPulb0J7uhW+1NlxFidAIJRec+0R6zG3kx3bTJjgDAlcCsi2iusNsUvQYx87h TwltOKKZ/L46F/1brqTx3gyLJU2lLWwj749o3jjIYwmk5mN4+MWI5D9b3VWGXHtWIczv +75uv2eJTEHX15u1iKtGR6Hxg/7yGQ8ZyX/gLKTR0VzJ0pAKuv1auMENF8EL/06QLkBI yoeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s139si1955472pfs.56.2019.03.15.06.52.40; Fri, 15 Mar 2019 06:52:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729182AbfCONvq (ORCPT + 99 others); Fri, 15 Mar 2019 09:51:46 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:37707 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727705AbfCONvp (ORCPT ); Fri, 15 Mar 2019 09:51:45 -0400 Received: from callcc.thunk.org ([66.31.38.53]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x2FDpSFM032094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Mar 2019 09:51:29 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 26C51420AA8; Fri, 15 Mar 2019 09:51:28 -0400 (EDT) Date: Fri, 15 Mar 2019 09:51:28 -0400 From: "Theodore Ts'o" To: Richard Weinberger Cc: Eric Biggers , linux-mtd@lists.infradead.org, linux-fscrypt@vger.kernel.org, jaegeuk@kernel.org, linux-unionfs@vger.kernel.org, miklos@szeredi.hu, amir73il@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, paullawrence@google.com, James.Bottomley@HansenPartnership.com Subject: Re: [PATCH 4/4] ubifs: Implement new mount option, fscrypt_key_required Message-ID: <20190315135128.GL11334@mit.edu> Mail-Followup-To: Theodore Ts'o , Richard Weinberger , Eric Biggers , linux-mtd@lists.infradead.org, linux-fscrypt@vger.kernel.org, jaegeuk@kernel.org, linux-unionfs@vger.kernel.org, miklos@szeredi.hu, amir73il@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, paullawrence@google.com, James.Bottomley@HansenPartnership.com References: <1957441.Hty6t2mpXG@blindfold> <20190314230702.GE6482@mit.edu> <3651600.xvQHXhhOD0@blindfold> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3651600.xvQHXhhOD0@blindfold> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 15, 2019 at 08:48:10AM +0100, Richard Weinberger wrote: > Ted, > > Am Freitag, 15. M?rz 2019, 00:07:02 CET schrieb Theodore Ts'o: > > Richard --- stepping back for a moment, in your use case, are you > > assuming that the encryption key is always going to be present while > > the system is running? > > it is not a hard requirement, it is something what is common on embedded > systems that utilize UBIFS and fscrypt. > > Well, fscrypt was chosen as UBIFS encryption backend because per-file encryption > with derived keys makes a lot of sense. > Also the implementation was not super hard, David and I weren't keen to reinvent > dm-crypt f?r UBI/MTD. > > That said, I'm happy with fscrypt, it works well in production. OK, but please note that fscrypt leaks i_size and timestamp information; dm-crypt doesn't. An enterprising attacker could very easily be able to do something interesting with that information, so be sure you've thought through what the threat model for users of ubifs is going to be. If you need per-user keying, and you need to be able to mount the file system and access some of the files without having any keys, and if it's useful for an admin to be able to delete files without having the key, then fscrypt is a great fit. You are proposing changes that (optionally) eliminate that last advantage of fscrypt. So I just wanted to sanity check whether or not the other advantages are useful to you, and worth the security tradeoffs that are inherent in such a choice. If it's worth it, then great. But if it isn't, I'd much rather that you appropriately protect your users and your customers rather than be an additional user of fscrypt. :-) Cheers, - Ted