All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: James Morris <jmorris@namei.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	LSM List <linux-security-module@vger.kernel.org>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [GIT PULL] Security subsystem updates for 4.14
Date: Sun, 10 Sep 2017 08:17:19 -0400	[thread overview]
Message-ID: <20170910121719.lurdadausg5bbqkd@thunk.org> (raw)
In-Reply-To: <1505027603.3224.56.camel@linux.vnet.ibm.com>

On Sun, Sep 10, 2017 at 03:13:23AM -0400, Mimi Zohar wrote:
> 
> From a file integrity perspective this would be interesting, but that
> only addresses IMA-appraisal, not IMA-integrity or IMA-audit.  We
> would still need to calculate the file hash to be included in the
> measurement list and used for auditing.
> 
> Have you done any work on protecting the directory information itself
> (eg. file names) using Merkle trees?

I have not, because the problem that I was trying to address was
primarily concerned with immutable files.  I did do some brainstorming
about adding the filename into the data integrity header to prevent
someone who had direct access to the flash exchanging the inode
numbers for "rm" and "ls", such that if you had a policy which
required that all ELF executables be signed, that a trickster couldn't
cause the user to run "rm" when they meant to run, say, "ls", just for
the lulz.  :-)

But that would break various symlink or hardlinks that are
legitimately present (e.g., /sbin/mkfs.ext[234] being a link to
/sbin/mke2fs), and if the adversary can carry out a chip-off attack
against your root file system, (a) it's not clear how much this would
help, and (b) this is really what dm-verity is for.

The main security problem I was looking at is one where the system
image is already protected using dm-verity, but you might have (for
example) some APK files which are downloaded once and stored in some
shared-user directory hierarchy (so file-based encryption can't even
provide pretend integrity protection), integrity checked at download
time, and never checked again.  Adding some kind of per-file Merkle
tree might be useful in that particular use case.

Cheers,

						- Ted

WARNING: multiple messages have this Message-ID (diff)
From: tytso@mit.edu (Theodore Ts'o)
To: linux-security-module@vger.kernel.org
Subject: [GIT PULL] Security subsystem updates for 4.14
Date: Sun, 10 Sep 2017 08:17:19 -0400	[thread overview]
Message-ID: <20170910121719.lurdadausg5bbqkd@thunk.org> (raw)
In-Reply-To: <1505027603.3224.56.camel@linux.vnet.ibm.com>

On Sun, Sep 10, 2017 at 03:13:23AM -0400, Mimi Zohar wrote:
> 
> From a file integrity perspective this would be interesting, but that
> only addresses IMA-appraisal, not IMA-integrity or IMA-audit. ?We
> would still need to calculate the file hash to be included in the
> measurement list and used for auditing.
> 
> Have you done any work on protecting the directory information itself
> (eg. file names) using Merkle trees?

I have not, because the problem that I was trying to address was
primarily concerned with immutable files.  I did do some brainstorming
about adding the filename into the data integrity header to prevent
someone who had direct access to the flash exchanging the inode
numbers for "rm" and "ls", such that if you had a policy which
required that all ELF executables be signed, that a trickster couldn't
cause the user to run "rm" when they meant to run, say, "ls", just for
the lulz.  :-)

But that would break various symlink or hardlinks that are
legitimately present (e.g., /sbin/mkfs.ext[234] being a link to
/sbin/mke2fs), and if the adversary can carry out a chip-off attack
against your root file system, (a) it's not clear how much this would
help, and (b) this is really what dm-verity is for.

The main security problem I was looking at is one where the system
image is already protected using dm-verity, but you might have (for
example) some APK files which are downloaded once and stored in some
shared-user directory hierarchy (so file-based encryption can't even
provide pretend integrity protection), integrity checked at download
time, and never checked again.  Adding some kind of per-file Merkle
tree might be useful in that particular use case.

Cheers,

						- Ted

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-09-10 12:17 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04 10:29 [GIT PULL] Security subsystem updates for 4.14 James Morris
2017-09-04 10:29 ` James Morris
2017-09-07 18:19 ` Linus Torvalds
2017-09-07 18:19   ` Linus Torvalds
2017-09-08  4:48   ` James Morris
2017-09-08  4:48     ` James Morris
2017-09-08  7:09     ` Christoph Hellwig
2017-09-08  7:09       ` Christoph Hellwig
2017-09-08 17:25       ` Linus Torvalds
2017-09-08 17:25         ` Linus Torvalds
2017-09-08 17:36         ` Paul Moore
2017-09-08 17:36           ` Paul Moore
2017-09-10  4:32           ` James Morris
2017-09-10  4:32             ` James Morris
2017-09-10  4:53             ` James Morris
2017-09-10  4:53               ` James Morris
2017-09-11 22:30             ` Paul Moore
2017-09-11 22:30               ` Paul Moore
2017-09-14 21:09             ` Kees Cook
2017-09-14 21:09               ` Kees Cook
2017-09-14 21:13               ` James Morris
2017-09-14 21:13                 ` James Morris
2017-09-14 21:25                 ` Kees Cook
2017-09-14 21:25                   ` Kees Cook
2017-09-08 19:57         ` James Morris
2017-09-08 19:57           ` James Morris
2017-09-17  7:36           ` Mimi Zohar
2017-09-17  7:36             ` Mimi Zohar
2017-09-10  8:10         ` Christoph Hellwig
2017-09-10  8:10           ` Christoph Hellwig
2017-09-10 14:02           ` Mimi Zohar
2017-09-10 14:02             ` Mimi Zohar
2017-09-11  6:38             ` Christoph Hellwig
2017-09-11  6:38               ` Christoph Hellwig
2017-09-11 21:34               ` Mimi Zohar
2017-09-11 21:34                 ` Mimi Zohar
2017-09-08 22:38     ` Theodore Ts'o
2017-09-08 22:38       ` Theodore Ts'o
2017-09-10  2:08       ` James Morris
2017-09-10  2:08         ` James Morris
2017-09-10  7:13       ` Mimi Zohar
2017-09-10  7:13         ` Mimi Zohar
2017-09-10 12:17         ` Theodore Ts'o [this message]
2017-09-10 12:17           ` Theodore Ts'o
2017-09-10  6:46   ` Mimi Zohar
2017-09-10  6:46     ` Mimi Zohar

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=20170910121719.lurdadausg5bbqkd@thunk.org \
    --to=tytso@mit.edu \
    --cc=hch@infradead.org \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=torvalds@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.