From: Joshua Brindle <method@gentoo.org>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Thomas Bleher <bleher@informatik.uni-muenchen.de>,
Karl MacMillan <kmacmillan@tresys.com>,
selinux@tycho.nsa.gov, Daniel J Walsh <dwalsh@redhat.com>,
SELinux-dev@tresys.com, James Morris <jmorris@redhat.com>,
Jeremy Katz <katzj@redhat.com>, Paul Nasrat <pnasrat@redhat.com>,
James Antill <jantill@redhat.com>
Subject: Re: [RFC][PATCH] selinux: introduce support for deferred mapping of inode security contexts
Date: Fri, 19 May 2006 09:18:31 -0400 [thread overview]
Message-ID: <446DC5A7.1030800@gentoo.org> (raw)
In-Reply-To: <1148043593.25168.71.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley wrote:
> On Thu, 2006-05-18 at 20:14 +0200, Thomas Bleher wrote:
>
>> Thank you for your explanation.
>> I see that these are very difficult issues, but I must admit that I
>> still feel very uneasy about the proposed changes.
>>
>> So let me suggest one more possibility:
>> rpm installs the package, puts the labels on disk and afterwards
>> installs the policy (like Dan proposed originally).
>> EXCEPT: Whenever rpm finds that the label it wants to put on disk is not
>> valid in the current policy, it labels the file as unlabeled_t (or some
>> other special label). After rpm has installed the policy, it relabels
>> the guilty files. This adds no overhead - rpm already knows the paths and
>> the labels, and it would have had to visit the files anyway to verify
>> their labels -, looks exactly the same from the outside, doesn't require
>> kernel changes and makes it possible to later restrict rpm.
>>
>> Now, you can't decline such an offer, can you? ;-)
>>
>> Or am I missing something fundamental here?
>>
> In the labelpriv model, rpm doesn't have to visit the individual files
> afterward in the common case; it just calls security_check_context(3) on
> each distinct context stored in the rpm header (once per context, not
> per file) after the module insertion phase, and if any of them are still
> invalid (the uncommon case), rpm then takes corrective action (whether
> that means relabeling files that had those invalid labels to truly be
> unlabeled_t, removing those files, or reverting the install altogether -
> the latter seems cleanest to me). If we can't get a guarantee that rpm
> will perform such checking and take corrective action, then I'd agree
> that the kernel change is a no-go.
>
Or just use matchpathcon() to label it. The installed file contexts are
implicitly trusted anyway, I don't see how it could hurt to revert to
defaults. Then again, an unlabeled file after the reload could indicate
an error in the package, policy, etc. On this note, how do you expect
this helper to work? I don't think that rpm maintains a list of files
per-transaction and since the post-script order can't be guaranteed you
never know when a particular policy has been reloaded (mutual dependency
problem, mta policy declares sendmail_t but sendmail package puts down
the file). There are probably other cases where this is problematic.
> With regard to restricting rpm, under both models, rpm is being allowed
> to set down unlabeled_t files and to insert policy modules. Restricting
> rpm meaningfully under either model requires fine-grained mediation of
> what those policy modules may contain, which requires the use of the
> policy management server as the libsemanage back end to enforce such
> mediation. Restricting rpm meaningfully under either model also
> requires decomposition of rpm, so that not all of rpm has to run with
> the same rights and the core rpm processing can run with different
> rights depending on the package characteristics. Given such mediation
> and decomposition, having a small rpm helper in its own domain that
> verifies that the header contexts are valid after module insertion,
> taking corrective action if necessary, would address the linkage between
> the header contexts and the module contents.
>
Right, unfortunately it looks like rpm will have this capability long
before the policy management server is ready to be dropped in. We also
haven't solved the hierarchal -policy-in-refpolicy problem which is
necessary for any meaningful policy enforcement.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2006-05-19 13:18 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-15 16:35 [RFC][PATCH] selinux: introduce support for deferred mapping of inode security contexts Stephen Smalley
2006-05-15 17:41 ` Stephen Smalley
2006-05-16 12:15 ` Stephen Smalley
2006-05-17 7:54 ` Thomas Bleher
2006-05-17 17:52 ` Karl MacMillan
2006-05-17 19:01 ` Stephen Smalley
2006-05-18 18:14 ` Thomas Bleher
2006-05-19 12:59 ` Stephen Smalley
2006-05-19 13:18 ` Joshua Brindle [this message]
2006-05-19 13:18 ` Karl MacMillan
2006-05-23 17:15 ` Stephen Smalley
2006-05-23 18:23 ` Daniel J Walsh
2006-05-23 18:50 ` Stephen Smalley
2006-05-23 20:11 ` Stephen Smalley
2006-05-24 17:24 ` Jeremy Katz
2006-05-24 17:24 ` Jeremy Katz
2006-05-24 18:01 ` Stephen Smalley
2006-05-24 17:24 ` Jeremy Katz
2006-05-24 17:48 ` Stephen Smalley
2006-05-25 15:19 ` Stephen Smalley
2006-05-25 15:28 ` Stephen Smalley
2006-05-26 18:54 ` Jeremy Katz
2006-05-26 20:13 ` Stephen Smalley
2006-05-26 20:16 ` Jeremy Katz
2006-05-17 18:26 ` Stephen Smalley
2006-05-17 18:28 ` Karl MacMillan
2006-05-17 18:43 ` Stephen Smalley
2006-05-19 13:44 ` Stephen Smalley
2006-05-19 13:59 ` Daniel J Walsh
2006-05-19 14:14 ` Stephen Smalley
2006-05-19 14:20 ` Daniel J Walsh
-- strict thread matches above, loose matches on Subject: below --
2006-05-19 14:05 Joshua Brindle
2006-05-19 14:18 ` Stephen Smalley
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=446DC5A7.1030800@gentoo.org \
--to=method@gentoo.org \
--cc=SELinux-dev@tresys.com \
--cc=bleher@informatik.uni-muenchen.de \
--cc=dwalsh@redhat.com \
--cc=jantill@redhat.com \
--cc=jmorris@redhat.com \
--cc=katzj@redhat.com \
--cc=kmacmillan@tresys.com \
--cc=pnasrat@redhat.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/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.