From: Vivek Goyal <vgoyal@redhat.com>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: Eric Paris <eparis@parisplace.org>,
linux kernel mailing list <linux-kernel@vger.kernel.org>,
LSM List <linux-security-module@vger.kernel.org>
Subject: Re: IMA: How to manage user space signing policy with others
Date: Fri, 1 Mar 2013 13:40:27 -0500 [thread overview]
Message-ID: <20130301184027.GB3457@redhat.com> (raw)
In-Reply-To: <20130301152839.GA3457@redhat.com>
On Fri, Mar 01, 2013 at 10:28:40AM -0500, Vivek Goyal wrote:
> On Fri, Mar 01, 2013 at 07:15:07AM -0500, Mimi Zohar wrote:
> > On Thu, 2013-02-28 at 20:49 -0500, Mimi Zohar wrote:
> > > On Thu, 2013-02-28 at 17:20 -0500, Eric Paris wrote:
> >
> > > > The ima_tcb policy was meant to be larger than needed to determine a
> > > > trusted computing base, but it is clearly not a superset of what he is
> > > > hoping to accomplish.
> >
> > The builtin measurement and appraisal policies are different. In order
> > not to miss a measurement, the measurement policy measures everything
> > read/executed by root. Userspace can constrain the policy by defining
> > rules based on LSM labels. The appraisal policy measures everything
> > owned by root. Userspace might want to add rules to appraise additional
> > files.
> >
> > We can not OR the measurement builtin and userspace policies, as the
> > userspace policy constrains the builtin policy, but for appraisal we
> > could. Perhaps we should define two rule chains, one for the builtin
> > appraisal rules and another for all other rules.
>
> Ok, just to make sure that I understand it right, I will summarize above.
>
> So a user can overide/replace "measure and audit" rules but it can not
> overide replace kernel's "appraise" rules and it can only append to
> existing appraise rules.
>
> So we internally define two rule chanins. All the appraisal rules
> go in one rule chain and all other rules (measure and audit) go in
> separate chain.
>
> When user writes an "appraise" rule to "policy" file, it gets *appended*
> to internal appraise rule chain and if user writes a "measure or audit"
> rule to "policy" file, it replaces the kernel's rules with user's rules.
>
> Given the fact that policy file ABI is still in testing we should be
> able to change semantics. (As currently user's appraise rules override
> kernel's appraisal rules).
>
> >
> > When secure boot is defined, instead of having a NULL policy, the
> > default policy would be the secureboot integrity policy. These rules
> > would be added to the builtin appraisal rule chain. If the
> > 'ima_appraise_tcb' boot commandline option is specified, these rules
> > would also be added to the builtin appraisal rule chain, but at the head
> > of the chain, as they are more restrictive than the secureboot policy
> > for root owned files.
> >
> > Vivek, would this work?
>
> This should work except the result caching issue. If we are running a
> partially signed user space, then unsigned process can write to disk
> directly (of course with right permisions). So secureboot policy can not
> cache appraisal results.
>
> In fact thinking more about it, I think ima_appraise_tcb policy also
> is vulnerable. This policy will not appraise files which are not
> owned by root. And users belonging to group "disk" have write permission
> to disks.
>
> So if I create a user "foo" and add it to group "disk", it can now launch
> its own processes and write to disk. And write to root owned files and
> ima_appraise_tcb policy will not detect the change.
>
> Hence, if ima_appraise_tcb rules are put in front of secureboot rules,
> caching appraisal results opens a security hole.
To avoid clashes between multiple built-in policies can we keep it
simpler. And that is only one built-in appraisal policy can be effective
a time. So if secureboot policy is effective, one can not use
ima_appraise_tcb.
We can provide one command line option to disable secureboot policy
(which works only if platform has secureboot disabled). So if a user
wants to use ima_appraise_tcb, he needs to pass two command line options.
"ima_apprise_secureboot=disable ima_appraise_tcb".
User can still append its appraise policies using "policy" interface. These
new rules take affect only if existing kernel policy does not apply to the
hook.
Thanks
Vivek
next prev parent reply other threads:[~2013-03-01 18:40 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 15:13 IMA: How to manage user space signing policy with others Vivek Goyal
2013-02-28 18:51 ` Vivek Goyal
2013-02-28 20:30 ` Mimi Zohar
2013-02-28 20:57 ` Vivek Goyal
2013-03-01 1:42 ` Mimi Zohar
2013-02-28 19:23 ` Mimi Zohar
2013-02-28 20:08 ` Vivek Goyal
2013-03-01 1:45 ` Mimi Zohar
2013-02-28 21:35 ` Vivek Goyal
2013-02-28 22:20 ` Eric Paris
2013-03-01 1:49 ` Mimi Zohar
2013-03-01 12:15 ` Mimi Zohar
2013-03-01 15:28 ` Vivek Goyal
2013-03-01 18:40 ` Vivek Goyal [this message]
2013-03-01 19:39 ` Mimi Zohar
2013-03-01 21:33 ` Vivek Goyal
2013-03-03 21:42 ` Mimi Zohar
2013-03-04 15:29 ` Vivek Goyal
2013-03-04 17:46 ` Vivek Goyal
2013-03-04 18:59 ` Mimi Zohar
2013-03-04 19:15 ` Vivek Goyal
2013-03-05 1:21 ` Mimi Zohar
2013-03-05 15:18 ` Vivek Goyal
2013-03-05 20:40 ` Mimi Zohar
2013-03-05 21:53 ` Vivek Goyal
2013-03-06 15:42 ` Mimi Zohar
2013-03-06 23:55 ` Vivek Goyal
2013-03-07 1:39 ` Mimi Zohar
2013-03-07 14:36 ` Vivek Goyal
2013-03-07 15:40 ` Mimi Zohar
2013-03-07 15:53 ` Vivek Goyal
2013-03-07 17:53 ` Kasatkin, Dmitry
2013-03-07 21:56 ` Vivek Goyal
2013-03-08 8:09 ` Kasatkin, Dmitry
2013-03-08 15:40 ` Vivek Goyal
2013-03-06 15:54 ` Vivek Goyal
2013-03-06 22:48 ` Mimi Zohar
2013-03-06 23:38 ` Vivek Goyal
2013-03-07 13:38 ` Mimi Zohar
2013-03-07 14:57 ` Vivek Goyal
2013-03-04 19:19 ` Eric Paris
2013-03-04 21:47 ` Vivek Goyal
2013-03-01 2:17 ` Mimi Zohar
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=20130301184027.GB3457@redhat.com \
--to=vgoyal@redhat.com \
--cc=eparis@parisplace.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=zohar@linux.vnet.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