From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>,
lkml <linux-kernel@vger.kernel.org>,
linux-security-module@vger.kernel.org,
David Howells <dhowells@redhat.com>
Subject: Re: [PATCH] split security_key_alloc into two functions
Date: Tue, 28 Mar 2006 07:53:39 -0600 [thread overview]
Message-ID: <20060328135339.GE19243@sergelap.austin.ibm.com> (raw)
In-Reply-To: <1143553407.3037.8.camel@moss-spartans.epoch.ncsc.mil>
Quoting Stephen Smalley (sds@tycho.nsa.gov):
> On Tue, 2006-03-28 at 07:05 -0600, Serge E. Hallyn wrote:
> > The security_key_alloc() function acted as both an authorizer and
> > security structure allocation function. These roles should be
> > separated. There are two reasons for this.
> >
> > First, if two modules are stacked, the first module might grant
> > permission and allocate security data, after which the second
> > module refuses permission.
> >
> > Second, by adding a security_post_alloc() function after the
> > serial number has been assigned, security modules can append
> > useful info.
>
> Are you sure that the key cannot be accessed (looked up) by another
> process as soon as it is assigned a serial number? If it can be, then
> you risk having it accessed before its security structure is set up.
Ah, that makes sense, and even rings a bell.
So if we were to add a post_alloc() hook, it should likely go into
key_alloc_serial() under the key_serial_lock?
Still assuming that storing the serial number is desirable...
thanks,
-serge
next prev parent reply other threads:[~2006-03-28 13:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-28 13:05 Serge E. Hallyn
2006-03-28 13:43 ` Stephen Smalley
2006-03-28 13:53 ` Serge E. Hallyn [this message]
2006-03-28 14:18 ` Stephen Smalley
2006-03-28 13:50 ` David Howells
2006-03-28 14:07 ` Serge E. Hallyn
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=20060328135339.GE19243@sergelap.austin.ibm.com \
--to=serue@us.ibm.com \
--cc=dhowells@redhat.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sds@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®