From: David Howells <dhowells@redhat.com>
To: Michael LeMay <mdlemay@epoch.ncsc.mil>
Cc: jmorris@redhat.com, selinux@tycho.nsa.gov, sds@tycho.nsa.gov,
dhowells@redhat.com
Subject: Re: [PATCH] selinux: Kernel access key retention support for SELinux
Date: Fri, 26 May 2006 10:37:27 +0100 [thread overview]
Message-ID: <18216.1148636247@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <1148575812.3304.45.camel@moss-tarheels.epoch.ncsc.mil>
Michael LeMay <mdlemay@epoch.ncsc.mil> wrote:
> This revision incorporates the changes previously suggested on this
> list, and also includes an extension to the key_alloc security hook,
> to allow its callers to pass in a task representing the proper context
> for the key being allocated (previously, the "current" pointer was
> used). This is important in a number of functions where the key
> framework is generating keypairs for specific threads and processes,
> primarily in process_keys.c.
Looks okay.
> Actually, I was a bit concerned that no locking is performed on those task
> structures while the keyring is being allocated. David, are you confident
> that no locking is required, and that those task structures will persist
> across the calls to keyring_alloc?
The task struct should be pinned by the caller of key_alloc(), either by the
context being the current process, or by the caller of request_key() being
asleep until the requested key is instantiated.
However, I've now a horrible feeling that I can see a race between two
processes both trying to instantiate the same key: what if one checks the
authorisation key preparatory to searching it, then the second instantiates
and revokes the authorisation key, and then the first searches the context
process's keyrings?
I've a feeling there's a race there; and I've a feeling that I need to make a
revocation key op so that the any ref on the task struct can be discarded
properly when the key is revoked:-/
Anyway, that's the subject for a separate patch. I don't think it would
change yours:
---<snip>---
From: Michael LeMay <mdlemay@epoch.ncsc.mil>
Introduce SELinux hooks to support the access key retention subsystem
within the kernel. Incorporate new flask headers from a modified
version of the SELinux reference policy, with support for the new
security class representing retained keys. Extend the "key_alloc"
security hook with a task parameter representing the intended
ownership context for the key being allocated. Attach security
information to root's default keyrings within the SELinux
initialization routine.
Signed-off-by: Michael LeMay <mdlemay@epoch.ncsc.mil>
Signed-Off-By: David Howells <dhowells@redhat.com>
--
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-26 13:29 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-25 16:50 [PATCH] selinux: Kernel access key retention support for SELinux Michael LeMay
2006-05-26 9:37 ` David Howells [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2006-05-31 17:50 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
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
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-06-02 13:27 Michael LeMay
2006-06-02 13:38 ` David Howells
2006-06-02 13:45 Michael LeMay
2006-06-02 14:10 ` David Howells
2006-06-02 17:09 Frank L. Mayer
2006-06-02 17:53 ` Casey Schaufler
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=18216.1148636247@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.