linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Janne Karhunen <janne.karhunen@gmail.com>,
	linux-integrity@vger.kernel.org,
	linux-security-module <linux-security-module@vger.kernel.org>
Cc: kgold@linux.ibm.com, david.safford@gmail.com, monty.wiseman@ge.com
Subject: Re: [PATCH v1 - RFC] ima: export the measurement list when needed
Date: Fri, 20 Dec 2019 09:04:25 -0500	[thread overview]
Message-ID: <1576850665.5241.52.camel@linux.ibm.com> (raw)
In-Reply-To: <20191220074929.8191-1-janne.karhunen@gmail.com>

[Cc'ing LSM mailing list for a wider audience]

On Fri, 2019-12-20 at 09:49 +0200, Janne Karhunen wrote:
> Some systems can end up carrying lots of entries in the ima
> measurement list. Since every entry is using a bit of kernel
> memory, add a new Kconfig variable to allow the sysadmin to
> define the maximum measurement list size and the location
> of the exported list.
> 
> The list is written out in append mode, so the system will
> keep writing new entries as long as it stays running or runs
> out of space. File is also automatically truncated on startup.
> 
> Signed-off-by: Janne Karhunen <janne.karhunen@gmail.com>

Continually adding new measurements, without limiting or removing the
measurement list seems to becoming more of an issue.

From Dave Safford's TLV patch description[1]:
    A second goal of the [TLV] patch set is to test the more radical
    idea of being able to copy the measurement list data out of the
    kernel. The data is verifiable with the TPM PCR value, and need not
    be kept in kernel memory. In some cases, this "memory leak" can
    grow large enough to cause issues, and this is a test of a
    potential way to solve that problem.

The TLV version automatically removed the measurement list the first
time the measurement list was read, which sounded very odd to me.  In
an offline discussion, Dave further clarified that reading the
measurement list should be similar to how a trusted userspace
application reads kernel messages.  The difference being kernel
messages are stored in a circular buffer and may be dropped.  In the
IMA measurement list case, the measurement list would grow until the
trusted userspace application gets around to reading the measurement
list. 

Should the kernel be involved in writing the IMA measurement list to a
file or, as Dave suggested, this should be delegated to a userspace
application?
 
Mimi

[1] https://lore.kernel.org/linux-integrity/BCA04D5D9A3B764C9B7405BBA4
D4A3C002569222@ALPMBAPA12.e2k.ad.ge.com/


       reply	other threads:[~2019-12-20 14:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191220074929.8191-1-janne.karhunen@gmail.com>
2019-12-20 14:04 ` Mimi Zohar [this message]
2019-12-21 10:41   ` [PATCH v1 - RFC] ima: export the measurement list when needed Janne Karhunen
2019-12-21 11:03     ` Janne Karhunen
2019-12-24 15:35     ` david.safford
2020-01-01  6:49       ` 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=1576850665.5241.52.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=david.safford@gmail.com \
    --cc=janne.karhunen@gmail.com \
    --cc=kgold@linux.ibm.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=monty.wiseman@ge.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).