All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Janne Karhunen <janne.karhunen@gmail.com>,
	Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Cc: linux-integrity@vger.kernel.org
Subject: Re: appraisal reset safety
Date: Mon, 08 Apr 2019 09:10:47 -0400	[thread overview]
Message-ID: <1554729047.17244.95.camel@linux.ibm.com> (raw)
In-Reply-To: <CAE=NcrYc3qXU2Y2BWJhbh0kTrCZN9AVmSmz6msqTKTNZR+iBPQ@mail.gmail.com>

On Mon, 2019-04-08 at 12:22 +0300, Janne Karhunen wrote:
> Hi,
> 
> Hmm, looks to me ima_update_xattr seems to be kicking in only from the
> appraisal failure when in fix mode or via fput() delayed work item.
> So, no sync() or anything like that will ever help and there is
> nothing listening on the i_version updates. Moreover, there is no
> integrity hook for write() or sync() to put such update in. Uh. I was
> under impression it would somehow see the interim file updates, but I
> guess no. Fundamental misunderstanding from my point of view how this
> thing works, duh.

The question of how much/how little to measure/appraise/audit is based
on policy and affects the integrity of the system and its performance.
 Detecting and updating the file hash each time the file changes would
have major performance repercussions.  Even that wouldn't solve the
problem, as the file change is in cache.  Writing the file hash as an
xattr and making the file change persistent needs to be coordinated,
probably at the filesystem level.

Mimi


  reply	other threads:[~2019-04-08 13:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 12:46 appraisal reset safety Janne Karhunen
2019-04-06  6:16 ` Janne Karhunen
2019-04-08  9:22   ` Janne Karhunen
2019-04-08 13:10     ` Mimi Zohar [this message]
2019-04-08 13:57       ` Janne Karhunen
2019-04-09  7:58       ` Janne Karhunen
2019-04-09 11:46         ` Janne Karhunen
2019-04-09 12:04           ` Mimi Zohar
2019-04-09 12:25             ` Janne Karhunen
2019-04-09 12:32               ` Mimi Zohar
2019-04-11  6:39                 ` Janne Karhunen

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=1554729047.17244.95.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=janne.karhunen@gmail.com \
    --cc=linux-integrity@vger.kernel.org \
    /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.