linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>,
	Andreas Dilger <adilger@dilger.ca>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	lsf-pc@lists.linux-foundation.org
Subject: Re: [Lsf-pc] [LSF/MM TOPIC] fs-verity: file system-level integrity protection
Date: Wed, 31 Jan 2018 13:46:47 -0500	[thread overview]
Message-ID: <20180131184647.GA29819@thunk.org> (raw)
In-Reply-To: <1517418768.3937.59.camel@HansenPartnership.com>

On Wed, Jan 31, 2018 at 09:12:48AM -0800, James Bottomley wrote:
> 
> This is all sounding appallingly ext4/f2fs specific. �What about other
> filesystems that might want this feature, how would they play?

Like fscrypto, where most of the code is in fs/crypto, most of the
fs-verity will be in fs/verity.  There will be minimal hooks in a
particular file system, so if another file system wants to play, then
can do so relatively easily.

> I assume also that a write of the magic file updates the key and
> signature in the inode metadata? �I suppose this also avoids the
> original IMA locking problem by sorting it out below the VFS, but it
> also means you have to invent mechanisms to query the key (user space
> might want to know for audit purposes) and to update the key (in case
> the original is compromised).

Like dm-verity, fs-verity only supports the read-only case.  So we
don't need to worry about write updates.

> Also when you say "key" presumably you mean pointer to x509 public
> certificate in a keyring somewhere, say by DN and Version or SKID?

Yes.  The cert might be hard-coded public key in the kernel sources;
or there might be a hard-coded CA public key, and userspace is allowed
to add new certs to the keyring so long as they are signed by a CA
cert in the system keyring.  Again, I refer you to how how signed
kernel modules are managed.

It would be possible to add something more complicated, involving
SELinux policies, or IMA policies --- but that's not something that I
need, so I view that as something that can be added later, by those
who need it.

> I really think some time needs to be spent figuring out how it should
> be supported in a fs generic way (at least for the user visible API)
> otherwise every fs will grow its own version and we'll have a user
> tooling nightmare on our hands.

Like with fscrypt, there will be a standard set of user interfaces,
most of which will be implemented in file sytem generic code.  In the
case of fscrypt, the same userspace is used for ext4 and f2fs in AOSP.

For the generic desktop case, there is a generic userspace tooling[1]
which we are hoping will be picked up by Ubuntu as a replacement for
ecryptfs in the next year or so.  (Discussions are in process; it is
not plan of record yet as far as I know.)

[1] https://github.com/google/fscrypt

The goal for fs-verity to keep the userspace interface as simple as
possible, and of *course* it will be file system generic (it will work
for ext4 and f2fs, and it will be set up to be easy for other
interested file systems to add support for it).

There are admittedly tradeoffs from the model model used by IMA/EVM
where the security feature is imposed on the file system code without
its knowledge or consent, and that is some minor changes are needed in
the file system code.  But there are some efficiencies and some
approaches that it allows that aren't possible with one where new file
system functionality is shoehorned into an LSM.

Cheers,

					- Ted

  reply	other threads:[~2018-01-31 18:46 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 19:11 [LSF/MM TOPIC] fs-verity: file system-level integrity protection Theodore Ts'o
2018-01-25 21:49 ` Chuck Lever
2018-01-25 23:39   ` Theodore Ts'o
2018-01-26  0:47 ` James Bottomley
2018-01-26  2:30   ` Theodore Ts'o
2018-01-26  4:50     ` James Bottomley
2018-01-26 14:58       ` Theodore Ts'o
2018-01-26 16:44         ` [Lsf-pc] " James Bottomley
2018-01-26 21:55           ` Theodore Ts'o
2018-01-27  7:58             ` Andreas Dilger
2018-01-27 16:19               ` James Bottomley
2018-01-27 17:08                 ` James Bottomley
2018-01-28  2:46                 ` Theodore Ts'o
2018-01-28 17:19                   ` James Bottomley
2018-01-28 18:03                   ` James Bottomley
2018-01-28 18:19                     ` Chuck Lever
2018-01-29  6:39                       ` James Bottomley
2018-01-29 15:22                         ` Chuck Lever
2018-01-30  6:47                           ` James Bottomley
2018-01-28 21:49                     ` Theodore Ts'o
2018-01-28 22:49                       ` Theodore Ts'o
2018-01-28 23:04                       ` Mimi Zohar
2018-01-29  0:38                         ` Theodore Ts'o
2018-01-29  1:53                           ` Mimi Zohar
2018-01-29  2:38                             ` Theodore Ts'o
2018-01-29  3:39                               ` Mimi Zohar
2018-01-29  4:40                                 ` Theodore Ts'o
2018-01-29  4:50                                 ` Theodore Ts'o
2018-01-29 12:09                                   ` Mimi Zohar
2018-01-29 13:58                                     ` Mimi Zohar
2018-01-29 23:02                                     ` Theodore Ts'o
2018-01-30 23:25                                       ` Mimi Zohar
2018-01-31 16:05                                         ` Theodore Ts'o
2018-01-31 17:12                                           ` James Bottomley
2018-01-31 18:46                                             ` Theodore Ts'o [this message]
2018-01-31 20:41                                               ` James Bottomley
2018-02-01  0:03                                                 ` Theodore Ts'o
2018-02-01 23:04                                                   ` Dave Chinner
2018-02-01 23:43                                                     ` Andreas Dilger
2018-02-02  0:13                                                       ` Dave Chinner
2018-02-02  5:34                                                       ` James Bottomley
2018-02-02  2:40                                                     ` Theodore Ts'o
2018-02-02  9:05                                                       ` Dave Chinner
2018-01-31 20:40                                           ` Mimi Zohar
2018-01-31 22:00                                             ` Theodore Ts'o
2018-02-01 15:17                                               ` Mimi Zohar
2018-01-29  0:21                       ` James Bottomley
2018-01-29  1:03                         ` Theodore Ts'o
2018-01-29 21:21                           ` Andreas Dilger
2018-01-26 18:13         ` Mimi Zohar
2018-01-29 18:54   ` Michael Halcrow
2018-01-26  7:58 ` Colin Walters
2018-01-26 15:29   ` Theodore Ts'o
2018-01-26 16:40     ` Colin Walters
2018-01-26 16:49       ` [Lsf-pc] " James Bottomley
2018-01-26 17:05         ` Colin Walters
2018-01-26 17:54 ` Mimi Zohar
2018-02-02  0:02 ` Steve French
2018-02-07 13:04 ` David Gstir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180131184647.GA29819@thunk.org \
    --to=tytso@mit.edu \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=adilger@dilger.ca \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=zohar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).