From: Stephen Smalley <sds@tycho.nsa.gov>
To: Andy Lutomirski <luto@amacapital.net>, Paul Moore <pmoore@redhat.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: [RFC PATCH] selinux: prevent setting a security label on MNT_NOSUID applications
Date: Wed, 14 May 2014 12:23:28 -0400 [thread overview]
Message-ID: <53739880.6070006@tycho.nsa.gov> (raw)
In-Reply-To: <CALCETrW7eED6sXcGOreRdTowSPWFAw3X2i0yz+uCkqoMH_rk3g@mail.gmail.com>
On 05/14/2014 12:16 PM, 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>
>
> However: would it pay to move the check above this:
>
> /* Reset exec SID on execve. */
> new_tsec->exec_sid = 0;
>
> I suppose that this shouldn't matter: any correct application already
> needs to redo setexeccon if it gets an error from execve. Fixing this
> for real would probably involve moving that line of code into
> selinux_bprm_committed_creds.
Shouldn't matter as that is a change to new_tsec (i.e.
bprm->cred->security), which will only be applied to the process if we
reach install_exec_creds(); otherwise it will just be discarded.
next prev parent reply other threads:[~2014-05-14 16:23 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 [this message]
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
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=53739880.6070006@tycho.nsa.gov \
--to=sds@tycho.nsa.gov \
--cc=luto@amacapital.net \
--cc=pmoore@redhat.com \
--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.