From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Andrew Morton <akpm@osdl.org>,
lkml <linux-kernel@vger.kernel.org>,
Chris Wright <chrisw@osdl.org>
Subject: Re: [RFC] [PATCH] [2/6] LSM Stacking: Add stacker LSM
Date: Wed, 10 Nov 2004 13:32:29 -0600 [thread overview]
Message-ID: <20041110193229.GA3480@IBM-BWN8ZTBWA01.austin.ibm.com> (raw)
In-Reply-To: <20041110174358.32392.qmail@lwn.net>
> Unless I've missed it, you never check num_stacked_modules against
> CONFIG_NUM_LSMS. If somebody loads too many modules, they risk
> overflowing all of those void * security arrays you've added to so many
> kernel data structures, and thus corrupting those structures. That, in
> technical terms, would be a bummer.
>
> In stacker_unregister(), you do:
>
> > + num_stacked_modules--;
>
> What happens if you unload anything other than the last module, then
> load something else? When you return num_stacked_modules-1 to the new
> module, you'll point it to a slot in those security arrays which is
> already used by another module. The result seems unlikely to improve
> security.
>
> Unless I'm simply confused? It's happened before...
No, you're not. While I sent out all the patches to make the first
patch useful, the stacker patch was the same one I've been using with
several other approaches to sharing the void * security arrays. If
the first patch turned out to be acceptable, the stacker patch would
have been tweaked quite a bit. As Chris Wright pointed out, the list
of stacked modules would no longer need to be a linked list, and so
the semaphore guarding that list could be dropped. And of course
your points are valid.
I am working on a new implementation, which I will send first to the
lsm list and lsm and selinux maintainers. Lmbench numbers from this
morning show that with this approach, a kernel with selinux +
capabilities shows no performance degradation.
thanks,
-serge
next prev parent reply other threads:[~2004-11-10 19:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-04 23:04 [RFC] [PATCH] [0/6] LSM Stacking Serge Hallyn
2004-11-04 22:52 ` Chris Wright
2004-11-05 1:01 ` Serge E. Hallyn
2004-11-05 1:05 ` Chris Wright
2004-11-05 2:16 ` James Morris
2004-11-04 23:06 ` [RFC] [PATCH] [1/6] LSM Stacking: Replace LSM void* with arrays Serge Hallyn
2004-11-04 22:34 ` Chris Wright
2004-11-04 23:08 ` [RFC] [PATCH] [2/6] LSM Stacking: Add stacker LSM Serge Hallyn
2004-11-04 22:42 ` Chris Wright
2004-11-10 17:43 ` Jonathan Corbet
2004-11-10 19:32 ` Serge E. Hallyn [this message]
2004-11-04 23:08 ` [RFC] [PATCH] [3/6] LSM Stacking: capability LSM stacking support Serge Hallyn
2004-11-04 23:09 ` [RFC] [PATCH] [4/6] LSM Stacking: seclvl " Serge Hallyn
2004-11-04 23:11 ` [RFC] [PATCH] [5/6] LSM Stacking: SELinux " Serge Hallyn
2004-11-04 22:45 ` Chris Wright
2004-11-04 23:12 ` [RFC] [PATCH] [6/6] LSM Stacking: temporary setprocattr hack Serge Hallyn
2004-11-04 22:48 ` Chris Wright
2004-11-05 0:52 ` Serge E. Hallyn
2004-11-05 0:56 ` Chris Wright
2004-11-04 23:14 ` [RFC] [PATCH] [1/3] LSM Stacking: stackable bsdjail (tasklookup) Serge Hallyn
2004-11-04 23:15 ` [RFC] [PATCH] [2/3] LSM Stacking: stackable bsdjail (bsdjail lsm) Serge Hallyn
2004-11-04 23:16 ` [RFC] [PATCH] [3/3] LSM Stacking: stackable bsdjail (Documentation) Serge Hallyn
2004-11-04 23:51 ` [RFC] [PATCH] [0/6] LSM Stacking James Morris
2004-11-05 7:23 ` Valdis.Kletnieks
2004-11-05 16:32 ` Serge E. Hallyn
2004-11-05 16:51 ` 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=20041110193229.GA3480@IBM-BWN8ZTBWA01.austin.ibm.com \
--to=serue@us.ibm.com \
--cc=akpm@osdl.org \
--cc=chrisw@osdl.org \
--cc=corbet@lwn.net \
--cc=linux-kernel@vger.kernel.org \
/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®