From: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
To: Petr Vorel <pvorel@suse.cz>, Mimi Zohar <zohar@linux.ibm.com>
Cc: tusharsu@linux.microsoft.com, ltp@lists.linux.it,
linux-integrity@vger.kernel.org
Subject: Re: [PATCH v2] IMA: Allow only ima-buf template for key measurement
Date: Tue, 16 Mar 2021 09:23:57 -0700 [thread overview]
Message-ID: <deeb4320-a064-fd0f-bc1e-8e52be079ff9@linux.microsoft.com> (raw)
In-Reply-To: <YFC7j4+wA8xorNgu@pevik>
On 3/16/21 7:07 AM, Petr Vorel wrote:
> Hi Lakshmi, Mimi,
>
>> ima-buf is the default IMA template used for all buffer measurements.
>> Therefore, IMA policy rule for measuring keys need not specify
>> an IMA template. But if a template is specified for key measurement
>> rule then it must be only ima-buf.
>
>> Update keys tests to not require a template to be specified for
>> key measurement rule, but if a template is specified verify it is
>> only ima-buf.
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
Thanks Petr.
>
> Just a double check does it always work without template=ima-buf for all kernel versions?
> Or only for kernels with dea87d0889dd ("ima: select ima-buf template for buffer measurement")
> i.e. v5.11-rc1 or backport?
The above change is required. Prior to this change, template has to be
specified in the policy, otherwise the default template would be used.
>
> Also, don't we want to change also keycheck.policy?
> Currently it contains:
> measure func=KEY_CHECK keyrings=.ima|.evm|.builtin_trusted_keys|.blacklist|key_import_test template=ima-buf
> Do we want to drop template=ima-buf to test the default value? Or have two rules
> (one with template=ima-buf, other w/a?)
Good point.
I will send you the v3 patch - with two rules: one with template=buf and
other without a template, like the following example:
measure func=KEY_CHECK
keyrings=.builtin_trusted_keys|.blacklist|key_import_test template=ima-buf
measure func=KEY_CHECK keyrings=.ima|.evm
-lakshmi
>
> Mimi, any comment on this?
>
> Kind regards,
> Petr
>
next prev parent reply other threads:[~2021-03-16 16:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 23:36 [PATCH v2] IMA: Allow only ima-buf template for key measurement Lakshmi Ramasubramanian
2021-03-16 14:07 ` Petr Vorel
2021-03-16 16:23 ` Lakshmi Ramasubramanian [this message]
2021-03-16 17:21 ` Petr Vorel
2021-03-16 18:50 ` Lakshmi Ramasubramanian
2021-03-17 20:37 ` Petr Vorel
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=deeb4320-a064-fd0f-bc1e-8e52be079ff9@linux.microsoft.com \
--to=nramas@linux.microsoft.com \
--cc=linux-integrity@vger.kernel.org \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
--cc=tusharsu@linux.microsoft.com \
--cc=zohar@linux.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).