From: Casey Schaufler <casey@schaufler-ca.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: jmorris@namei.org, linux-security-module@vger.kernel.org,
selinux@tycho.nsa.gov, john.johansen@canonical.com,
eparis@redhat.com, keescook@chromium.org,
Casey Schaufler <casey@schaufler-ca.com>
Subject: Re: [PATCH v8 1/2] LSM: Multiple concurrent LSMs
Date: Wed, 21 Nov 2012 12:30:28 -0800 [thread overview]
Message-ID: <50AD39E4.5060307@schaufler-ca.com> (raw)
In-Reply-To: <201211212258.IEI34810.FOMOOSLJQFFHVt@I-love.SAKURA.ne.jp>
On 11/21/2012 5:58 AM, Tetsuo Handa wrote:
> Casey Schaufler wrote:
>> I have not tried to
>> reintroduce LSMs as loadable modules, in spite of the
>> vigor with which it has been requested. I see that as
>> work for another day, and a seperate battle to fight.
> Please respond to
>
> Subject: [PATCH 0/5] Allow LKM-based LSM modules.
> Date: Mon, 19 Nov 2012 22:57:28 +0900
>
> posted to LSM-ML if somebody has objections. ;-)
I really have to keep focus on the stacking aspects. I still
want to get something right rather than trying to get all possible
scenarios.
>> The current implementation of reset_security_ops() is
>> not up to the rigors required of a real load/unload
>> mechanism.
> Why don't you move commoncap calls from each LSM to common path?
This could be done in general, but there are three cases where it
can't be done:
mmap_addr
AppArmor and Smack specify cap_mmap_addr as the hook.
SELinux explicitly wants its check first for audit.
capget
AppArmor replaces cap_capget with its own logic.
SELinux does its own check before the cap call.
bprm_secure_exec
AppArmor does a trivial check before the cap call
Smack does a trivial check after the cap call.
SELinux does a non-trivial check before the cap call.
How about if I change all the cases except for these three
so that they do your suggested cap_call fail-and-bail. That
will include changing the LSM hooks.
For security_mmap_addr I can do a special case of calling the cap hook
last, and only if there's no outstanding denial. AppArmor and Smack
use the cap_mmap_addr hook as their own. That could be removed.
For security_capget the existing behavior is necessary. This really
is a replacement hook. AppArmor and SELinux may conflict fatally here.
For security_bprm_secure_exec the same sort of special case used in
security_mmap_addr, with the cap call last should work.
I will look at pulling the list_empty cap_call out and fixing
the LSMs to go along with a fail-and-bail cap_call where appropriate.
Anyone want to offer suggestions on the possible conflict between
SELinux and AppArmor on the capget hooks? I mean something more
useful than disallowing the combination.
--
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:[~2012-11-21 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 20:08 [PATCH v8 1/2] LSM: Multiple concurrent LSMs Casey Schaufler
[not found] ` <201211212258.IEI34810.FOMOOSLJQFFHVt@I-love.SAKURA.ne.jp>
2012-11-21 20:30 ` Casey Schaufler [this message]
[not found] ` <201211222220.JID30761.OVJtFLOOFHFQSM@I-love.SAKURA.ne.jp>
[not found] ` <201211252210.CFJ12903.FtQHSOOFOVMJFL@I-love.SAKURA.ne.jp>
[not found] ` <201211262204.GGI04679.FtLJQFHVOOMSFO@I-love.SAKURA.ne.jp>
2012-11-26 16:33 ` 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=50AD39E4.5060307@schaufler-ca.com \
--to=casey@schaufler-ca.com \
--cc=eparis@redhat.com \
--cc=jmorris@namei.org \
--cc=john.johansen@canonical.com \
--cc=keescook@chromium.org \
--cc=linux-security-module@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--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.