All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <pmoore@redhat.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Stephen Smalley <sds@tycho.nsa.gov>, selinux@tycho.nsa.gov
Subject: Re: [RFC PATCH] selinux: prevent setting a security label on MNT_NOSUID applications
Date: Thu, 15 May 2014 11:14:19 -0400	[thread overview]
Message-ID: <3937310.71HJKD7fOT@sifl> (raw)
In-Reply-To: <CALCETrW9WNVQoRFxy+T5Gs9Ct+1L-_bycTukWQdEgDgkZQKh1g@mail.gmail.com>

On Wednesday, May 14, 2014 02:26:59 PM Andy Lutomirski wrote:
> On Wed, May 14, 2014 at 2:00 PM, Paul Moore <pmoore@redhat.com> wrote:
> > On Wednesday, May 14, 2014 09:18:35 AM Andy Lutomirski wrote:
> >> > On Wed, May 14, 2014 at 8:58 AM, Paul Moore <pmoore@redhat.com> wrote:
> >> >> We presently prevent processes from explicitly setting an arbitrary
> >> >> security label on new processes when NO_NEW_PRIVS is enabled; in an
> >> >> attempt for more consistency, this patch extends this to prevent
> >> >> setting an arbitrary label when the new application lives on a
> >> >> filesystem mounted with MNT_NOSUID.
> >> >> 
> >> >> Signed-off-by: Paul Moore <pmoore@redhat.com>
> >> >> CC: Andy Lutomirski <luto@amacapital.net>
> >> >> CC: Stephen Smalley <sds@tycho.nsa.gov>
> >> >> ---
> >> 
> >> Acked-by: Andy Lutomirski <luto@amacapital.net>
> >> 
> >> I'm also unconvinced by the subject line -- would "selinux: return an
> >> error when rejecting settexeccon on MNT_NOSUID applications" be
> >> better?
> > 
> > ...
> > 
> > On Wednesday, May 14, 2014 12:28:24 PM Stephen Smalley wrote:
> >> On 05/14/2014 11:58 AM, Paul Moore wrote:
> >> > We presently prevent processes from explicitly setting an arbitrary
> >> > security label on new processes when NO_NEW_PRIVS is enabled; in an
> >> > attempt for more consistency, this patch extends this to prevent
> >> > setting an arbitrary label when the new application lives on a
> >> > filesystem mounted with MNT_NOSUID.
> >> 
> >> It is never arbitrary (the new value is always controlled by policy),
> >> and it isn't set on "new processes" per se but rather transitioned to
> >> upon an exec.  Anyway, the point of the change is to return an error
> >> rather than silently ignore any /proc/self/attr/exec value when
> >> executing from a nosuid mount.
> >> 
> >> Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
> > 
> > I had a feeling while writing the patch description yesterday that someone
> > was not going to be happy with the text ... does the subject/description
> > below sound better to you guys?
> > 
> > ***
> > selinux: reject setexeccon() on MNT_NOSUID applications with -EACCES
> > 
> > We presently prevent processes from using setexecon() to set the security
> > label of exec()'d processes when NO_NEW_PRIVS is enabled by returning an
> > error; however, we silently ignore setexeccon() when exec()'ing from a
> > nosuid mounted filesystem.  This patch makes things a bit more consistent
> > by returning an error in the setexeccon()/nosuid case.
> > ***
> 
> Looks good to me.

Okay, I expect if Stephen had a strong objection to the new text he would have 
commented by now.  I'm going to toss this into #next with the new text now.

-- 
paul moore
security and virtualization @ redhat

      reply	other threads:[~2014-05-15 15:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 15:58 [RFC PATCH] selinux: prevent setting a security label on MNT_NOSUID applications Paul Moore
2014-05-14 16:16 ` Andy Lutomirski
2014-05-14 16:18   ` Andy Lutomirski
2014-05-14 16:23   ` Stephen Smalley
2014-05-14 16:48     ` Andy Lutomirski
2014-05-14 16:28 ` Stephen Smalley
2014-05-14 21:00   ` Paul Moore
2014-05-14 21:26     ` Andy Lutomirski
2014-05-15 15:14       ` Paul Moore [this message]

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=3937310.71HJKD7fOT@sifl \
    --to=pmoore@redhat.com \
    --cc=luto@amacapital.net \
    --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.