From: David Howells <dhowells@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: David Howells <dhowells@redhat.com>,
Michael LeMay <mdlemay@epoch.ncsc.mil>,
jmorris@redhat.com, selinux@tycho.nsa.gov
Subject: Re: [PATCH] selinux: Kernel access key retention support for SELinux
Date: Thu, 01 Jun 2006 13:27:40 +0100 [thread overview]
Message-ID: <14858.1149164860@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <1149161971.524.283.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley <sds@tycho.nsa.gov> wrote:
> > Why do you want unlinkable keys anyway?
>
> The concern is that any process that requires write access to the
> keyring for any reason would otherwise be able to unlink all keys from
> it, irrespective of what may have created the link in the first place.
Yes.
> The individual links in a single keyring could have been created by
> processes in different security contexts, as a single user session can
> have processes running in multiple security contexts.
Hmmm... I think it's incorrect to have an unlink permission bit on the key as
it causes too many potential problems, and would apply to all the links on a
key, irrespective of the keyrings holding them.
Perhaps what's required is to have unlink permission controlled from the
keyring's perspective. How about adding another security op that takes the
keyring, the key and the requesting process, and asks if that process may
detach that key from that keyring. Clearing a keyring would then be a filter
operation.
There are still a couple of problems to deal with:
(1) Key displacement. How do you deal with a new link that's being made
displacing an old link that would otherwise be refused unlink permission?
It might be sufficient to do the check in advance and assume that things
won't then change whilst we create a new key, except that there's a race
between two processes both trying to displace the same link in the same
keyring.
The alternative for new key addition is to do the check at the point of
link creation, and just accept that we'll not create a link if we can't
displace the old key.
It would also be possible to store a bit of information with each pointer
in the keyring if that would be useful. The problem with caching can
you/can't you data in the keyring is that it very much depends on who's
asking.
(2) Permission percolation over keyrings. What do you do about a keyring
that contains a key that you're not permitted to unlink? Does the
keyring itself become unlinkable? What about session keyrings?
> Having a per-key unlink check parallels the existing checking on the link
> side.
I'm not sure they are exactly parallel: having a link check doesn't cause all
the problems that having an unlink check does.
> And unlinking a key can lead to its destruction (if it is the last link),
> right, so it has a potentially modifying impact on the key itself?
Yes, but you have to be able to live with that, otherwise the kernel might
fill up with obsolete keys. If a filesystem or some other kernel service is
using a key, it should keep its own link to that key.
David
--
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-06-01 12:27 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-31 17:50 [PATCH] selinux: Kernel access key retention support for SELinux Michael LeMay
2006-05-31 18:29 ` Stephen Smalley
2006-06-01 10:13 ` David Howells
2006-05-31 20:42 ` James Morris
2006-06-01 9:32 ` David Howells
2006-06-01 14:26 ` James Morris
2006-06-01 14:36 ` David Howells
2006-06-01 10:09 ` David Howells
2006-06-01 11:39 ` Stephen Smalley
2006-06-01 12:27 ` David Howells [this message]
2006-06-01 14:21 ` Stephen Smalley
2006-06-01 14:52 ` Valdis.Kletnieks
[not found] ` <447F0093.3090601@lemaymd.com>
2006-06-01 15:17 ` Stephen Smalley
2006-06-01 15:25 ` Stephen Smalley
2006-06-01 14:40 ` David Howells
-- strict thread matches above, loose matches on Subject: below --
2006-06-02 17:09 Frank L. Mayer
2006-06-02 17:53 ` Casey Schaufler
2006-06-02 13:45 Michael LeMay
2006-06-02 14:10 ` David Howells
2006-06-02 13:27 Michael LeMay
2006-06-02 13:38 ` David Howells
2006-06-01 18:26 Michael LeMay
2006-06-01 23:40 ` James Morris
2006-06-02 9:21 ` David Howells
2006-06-02 12:44 ` Michael LeMay
2006-06-02 13:02 ` David Howells
2006-06-02 13:08 ` Stephen Smalley
2006-06-02 13:25 ` David Howells
2006-06-02 13:28 ` Stephen Smalley
2006-06-02 13:30 ` Stephen Smalley
2006-06-02 13:30 ` David Howells
2006-06-02 13:52 ` Stephen Smalley
2006-06-02 13:53 ` David Howells
2006-06-02 15:54 ` Casey Schaufler
2006-05-25 16:50 Michael LeMay
2006-05-26 9:37 ` David Howells
2006-05-26 13:54 ` David Howells
2006-05-26 12:30 ` Stephen Smalley
2006-05-26 12:56 ` Stephen Smalley
2006-05-26 12:31 ` Stephen Smalley
2006-05-26 13:00 ` 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=14858.1149164860@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=jmorris@redhat.com \
--cc=mdlemay@epoch.ncsc.mil \
--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.