All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Matthew Garrett <mjg59@google.com>
Cc: linux-integrity@vger.kernel.org,
	Mikhail Kurinnoi <viewizard@viewizard.com>
Subject: Re: RFC: Make it practical to ship EVM signatures
Date: Fri, 29 Sep 2017 16:01:44 -0400	[thread overview]
Message-ID: <1506715304.5691.151.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <CACdnJuvYNnePfz4H-D=DGMHbrbmZ52JWFoLqX120ALV=o4wwcw@mail.gmail.com>

On Fri, 2017-09-29 at 12:17 -0700, Matthew Garrett wrote:

> > The original understanding was that IMA/EVM would enforce integrity
> > and not enforce mandatory access control (MAC).  The LSMs (eg.
> > SELinux) would be responsible for MAC.  Separation of duties.
> 
> The kernel's security track record isn't sufficient to be able to
> assert that any kernel secrets can be kept secret, so we're left
> wanting integrity guarantees without relying on that.
> 
> > With that understanding, if the LSM allows a file to be "dropped" onto
> >  the file system of a running system, IMA/EVM will hash and hmac the
> > permitted file.
> >
> > I don't understand where you're going with this train of thought.  If
> > you're trying to make a case for EVM to run with only security.evm
> > signatures, then you wouldn't refer to the HMAC benefits.  If you're
> > trying to make a case for EVM signatures, with the inode they're not
> > portable, without the inode, they are susceptible to a cut and paste
> > attack.
> 
> I'm arguing that (for our case at least) the only way we can use IMA
> is to rely on using a digital signature - we can either have that
> digital signature be in security.ima, or we can have it in
> security.evm. Since we need that signature in any case, we derive no
> benefit from having security.evm be an hmac - our two reasonable
> choices are:
> 
> 1) security.ima as a digital signature, security.evm as an hmac
> 2) security.ima as a hash, security.evm as a digital signature

There's a major difference between security.ima containing a file hash
vs a signature.  A signature, assuming the file_check hook is in
policy, prevents the file from being modified, making the file
"immutable".

> I'm not really clear on what attacks are prevented by using the inode
> number. If I'm able to preserve all the other security metadata when
> copying a file, I can just create a hardlink to the original instead
> and have the same outcome.

The issue is the ability of having different security metadata, not
the same security metadata. (I need to refresh my memory as to hard
links, and whether they can have different security metadata.)

Originally the UUID was not included in the HMAC calculation.  Perhaps
the patch description of commit 74de668 "evm: add file system uuid to
EVM hmac" will help clarify the reasoning for including the inode and
uuid in the hmac calculation.

Mimi

  reply	other threads:[~2017-09-29 20:03 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 22:16 RFC: Make it practical to ship EVM signatures Matthew Garrett
2017-09-27 22:16 ` [PATCH 1/6] IMA: Allow EVM validation on appraisal even without a symmetric key Matthew Garrett
2017-10-01  2:08   ` Mimi Zohar
2017-10-02 17:02     ` Matthew Garrett
2017-10-02 19:41       ` Mimi Zohar
2017-09-27 22:16 ` [PATCH 2/6] EVM: Add infrastructure for making EVM fields optional Matthew Garrett
2017-09-27 22:16 ` [PATCH 3/6] EVM: Allow userland to override the default EVM attributes Matthew Garrett
2017-09-27 22:16 ` [PATCH 4/6] EVM: Add an hmac_ng xattr format Matthew Garrett
2017-09-27 22:16 ` [PATCH 5/6] EVM: Write out HMAC xattrs in the new format Matthew Garrett
2017-09-27 22:16 ` [PATCH 6/6] EVM: Add a new digital signature format Matthew Garrett
2017-09-28 20:12 ` RFC: Make it practical to ship EVM signatures Mimi Zohar
2017-09-28 21:13   ` Matthew Garrett
2017-09-29  0:53     ` Mimi Zohar
2017-09-29 18:09       ` Matthew Garrett
2017-09-29 19:02         ` Mimi Zohar
2017-09-29 19:17           ` Matthew Garrett
2017-09-29 20:01             ` Mimi Zohar [this message]
2017-09-29 20:09               ` Matthew Garrett
2017-10-01  2:36                 ` Mimi Zohar
2017-10-02 17:09                   ` Matthew Garrett
2017-10-02 19:54                     ` Mimi Zohar
     [not found]                       ` <CACdnJutYw7Pgh-EwWuwp9Wz+5KzoreZVr+c6UV30zC__8FZSVA@mail.gmail.com>
     [not found]                         ` <1506974574.5691.304.camel@linux.vnet.ibm.com>
2017-10-02 20:07                           ` Matthew Garrett
2017-10-09 17:51                 ` Mimi Zohar
2017-10-09 17:59                   ` Matthew Garrett
2017-10-09 18:15                     ` Mimi Zohar
2017-10-09 18:18                       ` Matthew Garrett
2017-10-09 18:40                         ` Mimi Zohar
     [not found]                           ` <20171009232314.545de76a@totoro>
     [not found]                             ` <1507583449.3748.46.camel@linux.vnet.ibm.com>
     [not found]                               ` <20171010003326.6409ae23@totoro>
2017-10-09 21:40                                 ` Mimi Zohar
2017-10-09 23:10                                   ` Mikhail Kurinnoi
2017-10-10 19:07                                     ` Mimi Zohar
2017-10-12 23:09                                       ` Dmitry Kasatkin
2017-10-18 19:48                                         ` Dmitry Kasatkin
2017-10-18 20:30                                           ` Mimi Zohar
2017-10-18 20:37                                             ` Dmitry Kasatkin
2017-10-18 21:02                                               ` Mikhail Kurinnoi
2017-10-18 21:07                                               ` Mimi Zohar
2017-10-19 10:14                                                 ` Dmitry Kasatkin
2017-10-19 11:43                                                   ` Mimi Zohar
2017-10-19 17:08                                                   ` Matthew Garrett
2017-10-19 18:38                                                     ` Dmitry Kasatkin
2017-10-19 10:36                                                 ` Dmitry Kasatkin
2017-10-19 11:45                                                   ` Mimi Zohar
2017-10-02 14:53           ` Roberto Sassu
2017-10-02  8:55       ` Roberto Sassu

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=1506715304.5691.151.camel@linux.vnet.ibm.com \
    --to=zohar@linux.vnet.ibm.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=mjg59@google.com \
    --cc=viewizard@viewizard.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.