From: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Casey Schaufler <casey@schaufler-ca.com>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH] Smack: fix domain transfer issues
Date: Thu, 29 Sep 2011 11:26:57 +0300 (EEST) [thread overview]
Message-ID: <alpine.DEB.2.02.1109291109070.3006@jsakkine-mobl> (raw)
In-Reply-To: <1317222904.20139.20.camel@moss-pluto>
On Wed, 28 Sep 2011, Stephen Smalley wrote:
> Did I miss something or did you find a rationale for using bprm->unsafe
> in this manner? It isn't private to your security module yet you are
> claiming a bit for your own private use without reserving it in any way
> globally (consider implications for any future stacking), and setting
> new bits in it will have side effects on the capabilities logic. I
> already mentioned this on your first patch and you seemed to acknowledge
> it then. Pass it via bprm->cred->security if you need to pass it as a
> flag, or re-test the condition in the secureexec hook otherwise.
You got your point. I'll add smk_flags field to
the struct task_smack (our task security blob).
> Why not just:
> if (bprm->unsafe)
> return -EPERM;
> if you aren't going to distinguish them via permission checks or
> anything?
I guess my purpose was to leave those visible because
plan is to add permission checks at least for the
ptrace case in the future. Now that I think of it,
it does not justify their existence in the code.
I'll revise this.
Even in the current form, there should be check that
you described to protect this code against situation
where new LSM_UNSAFE flag is added and support has not
yet been implemented to Smack.
>
> I take it you've decided you don't need any of the other checks or
> sanitization applied by SELinux?
MNT_NOSUID should be checked. Also, I'll plan to
implement permission check for ptrace but in the
scope of this patch.
Thanks for informative reply!
/Jarkko
next prev parent reply other threads:[~2011-09-29 8:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 10:48 Jarkko Sakkinen
2011-09-28 15:15 ` Stephen Smalley
2011-09-29 8:26 ` Jarkko Sakkinen [this message]
2011-09-29 13:20 ` Stephen Smalley
2011-09-29 13:57 ` Jarkko Sakkinen
2011-09-29 14:44 ` 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=alpine.DEB.2.02.1109291109070.3006@jsakkine-mobl \
--to=jarkko.sakkinen@intel.com \
--cc=casey@schaufler-ca.com \
--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®