From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Petr Vorel <pvorel@suse.cz>, Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it, linux-integrity@vger.kernel.org,
Dmitry Kasatkin <dmitry.kasatkin@huawei.com>
Subject: Re: [LTP] [RFC PATCH 2/2] security/ima: Run measurements after policy
Date: Sat, 27 Jan 2018 19:57:11 -0500 [thread overview]
Message-ID: <1517101031.29187.128.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180126180321.7k644bvf64nv4uqr@dell5510>
On Fri, 2018-01-26 at 19:03 +0100, Petr Vorel wrote:
> Hi,
> > > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > > ---
> > > runtest/ima | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> > > diff --git a/runtest/ima b/runtest/ima
> > > index 20d2e0810..3462d12b1 100644
> > > --- a/runtest/ima
> > > +++ b/runtest/ima
> > > @@ -1,5 +1,5 @@
> > > #DESCRIPTION:Integrity Measurement Architecture (IMA)
> > > -ima01 ima_measurements.sh
> > > -ima02 ima_policy.sh
> > > +ima01 ima_policy.sh
> > > +ima02 ima_measurements.sh
> > > ima03 ima_tpm.sh
> > > ima04 ima_violations.sh
>
> > Uh, depending on order of testcases in runtest file is broken anyways,
> > what is the real problem here?
> If system is configured with no policy, ima_measurements.sh fails. ima_policy.sh loads
> some policy (if none loaded) / adds to policy (if policy already loaded and it's allowed
> by kernel). So, the first case prevents failing ima_measurements.sh.
> One problem with IMA testing I see is that IMHO it's not possible to revert policy.
> That's why I added warnings that reboot is required. I know that this is against LTP
> principle.
> Mimi, Dmitry, am I right?
The current ordering of the tests assume that the system was booted
with the builtin "ima_tcb" policy enabled on the boot command line.
Assuming that the kernel doesn't require policies to be signed,
changing the order of the tests is fine. Or simply test whether the
system was booted with either "ima_tcb" or "ima_policy=tcb" boot
command line options.
Mimi
> > Also I suppose that we may as well rename the test ids (e.g. ima01) to
> > match the shell script name, since I find it more descriptive.
> Sure!
>
>
> Kind regards,
> Petr
>
next prev parent reply other threads:[~2018-01-28 0:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 20:28 [RFC PATCH 0/2] IMA: Rewrite tests into new API + fixes Petr Vorel
2018-01-11 20:28 ` [RFC PATCH 1/2] security/ima: " Petr Vorel
2018-01-26 13:09 ` [LTP] " Cyril Hrubis
2018-01-11 20:28 ` [RFC PATCH 2/2] security/ima: Run measurements after policy Petr Vorel
2018-01-26 13:11 ` [LTP] " Cyril Hrubis
2018-01-26 18:03 ` Petr Vorel
2018-01-28 0:57 ` Mimi Zohar [this message]
2018-01-24 17:36 ` [RFC PATCH 0/2] IMA: Rewrite tests into new API + fixes Mimi Zohar
2018-01-25 20:30 ` Petr Vorel
2018-01-25 20:40 ` [LTP] " Petr Vorel
2018-01-25 22:29 ` Mimi Zohar
2018-01-26 17:51 ` Petr Vorel
2018-01-28 0:47 ` Mimi Zohar
2018-01-29 19:58 ` Mimi Zohar
2018-01-31 15:01 ` Nayna Jain
2018-01-26 13:16 ` [LTP] " Cyril Hrubis
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=1517101031.29187.128.camel@linux.vnet.ibm.com \
--to=zohar@linux.vnet.ibm.com \
--cc=chrubis@suse.cz \
--cc=dmitry.kasatkin@huawei.com \
--cc=linux-integrity@vger.kernel.org \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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).