Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp470613ima; Fri, 15 Mar 2019 07:01:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAzhoqxXt98F6YllBMPXuwl+nyrZwET+G0kw++Sh12PZdXhQCBwhMrg3iOjUmUpI63tYm4 X-Received: by 2002:a17:902:b201:: with SMTP id t1mr4483462plr.55.1552658511917; Fri, 15 Mar 2019 07:01:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552658511; cv=none; d=google.com; s=arc-20160816; b=gVf7S0QUZ4dpJrlNMCi6iAOmPn/PmUaGZLqN8P6jaEfJF1P+zVOnA5iUHJvs1cQQ91 baLNwRHMIdRpCpE/UNq9+/+mbhHME4z6/x/7ByanIrCBdTp2D+t0BUve165J/vE/m6ly OaABoAKwwrP1SVcgW2rC5tYeJoSqNFnfagSEpQZYGAhmfYQqsdErgKF9+tsswp89Gxl6 epqJrZMAl8TLuJQhusGpju/+QFLgh6A/7AC4cde2kauC1ytarjEjyWR9mJ6Q676Jj+MV gIJ+eceHYqysXTderf0955krNKyYGpRvaw70BJxya6j3OJkzH/0LKDqwqQGF77uHh/dI 9tmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LNqysyTH9b0MhSD1wMM0lG8eDDNv4IQ1OaiDtdq557w=; b=pCreT4dniLeh0/BFmWQzDVUs1b0cTqCNTcDmAbywKq9WMtKvFoiO8BqMSekTEkpGqh fZB57XombCOa+fmpmv+8XR1N5M6W6kC83wssMuzDNk78Ayo2xbcazM5sEyTmeHoZ2OXb ueEjvLdyC9VAPfLf4wsgi699dUHVJUFL7UgmTlfMChdrj6P9+KA0zdZrrrAVZCw5Pw2k Va+7z0ATvwyq/7TqU50khjyyFFqoZ9x9pIIxKdyqKvHRJNHErV/pS7COE3TTeiSZ8TpJ oeUgUrrWjv2dR82w255sPwEyq2wRCgmxmbvJ68O6zKN/hsUudCfaPM5AdC1/T40Vsh5i flZA== 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 u22si1801765plq.145.2019.03.15.07.01.35; Fri, 15 Mar 2019 07:01:51 -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 S1729195AbfCON7b convert rfc822-to-8bit (ORCPT + 99 others); Fri, 15 Mar 2019 09:59:31 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:58584 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728784AbfCON7b (ORCPT ); Fri, 15 Mar 2019 09:59:31 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 4C192608A397; Fri, 15 Mar 2019 14:59:28 +0100 (CET) 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 F8QMm3UBWQjW; Fri, 15 Mar 2019 14:59:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id EECF760B62A7; Fri, 15 Mar 2019 14:59:27 +0100 (CET) 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 EhW9eD3_Ku6b; Fri, 15 Mar 2019 14:59:27 +0100 (CET) Received: from blindfold.localnet (089144193070.atnat0002.highway.a1.net [89.144.193.70]) by lithops.sigma-star.at (Postfix) with ESMTPSA id 147D6608A397; Fri, 15 Mar 2019 14:59:27 +0100 (CET) From: Richard Weinberger To: Theodore Ts'o 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 Date: Fri, 15 Mar 2019 14:59:26 +0100 Message-ID: <11194150.36rPM0hNvo@blindfold> In-Reply-To: <20190315135128.GL11334@mit.edu> References: <3651600.xvQHXhhOD0@blindfold> <20190315135128.GL11334@mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ted, Am Freitag, 15. M?rz 2019, 14:51:28 CET schrieb Theodore Ts'o: > 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. No need to worry, I'm fully aware of all this. > 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. :-) Like I said, this patch series is an RFC, the mount option was suggested by Amir and Miklos, so I assumed showing some code is a good base for further discussion. For most of *my* use-cases it works but having general support for fscrypt+overlayfs would be the ultimate goal. Thanks, //richard