Bug 1360903

Summary: It would be really helpful for testing if runcon had a --no-new-privs flag
Product: [Fedora] Fedora Reporter: Daniel Walsh <dwalsh>
Component: coreutilsAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: admiller, jamartis, kdudka, kzak, lvrabec, mgrepl, ooprala, ovasik, p, plautrba, skisela, twaugh
Target Milestone: ---Keywords: FutureFeature, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: coreutils-8.27-10.fc27 coreutils-8.27-6.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-24 03:51:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Walsh 2016-07-27 19:09:38 UTC
Several SELinux issues come up when playing with prctl(NO_NEW_PRIVS) applications.

NO_NEW_PRIVS prevents SELinux transitions from one domain to another iff the second domain has more privs then the first.

This is difficult to test.  It would be nice to be able to use runcon to diagnose issues.

I would like to see a flag like

runcon --no-new-privs -t svirt_lxc_net_t /bin/sh

And have it tell me whether or not the transition is happening.

Comment 1 Kamil Dudka 2016-07-29 16:15:35 UTC
Sounds reasonable.  I will propose a patch upstream.  For the reference, here is some documentation of the no_new_privs bit:

https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt

Comment 2 Sebastian Kisela 2017-04-28 04:57:59 UTC
Please see http://lists.gnu.org/archive/html/coreutils/2017-04/msg00046.html

This idea is being discussed there.

Comment 3 Sebastian Kisela 2017-05-30 08:17:08 UTC
Solution for this problem was added in this upstream commit:
http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.27-37-g6ebaf81#patch1

Comment 4 Fedora Update System 2017-08-18 16:39:34 UTC
coreutils-8.27-6.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a3eac38fa8

Comment 5 Fedora Update System 2017-08-22 18:06:50 UTC
coreutils-8.27-6.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a3eac38fa8

Comment 6 Fedora Update System 2017-08-24 03:51:47 UTC
coreutils-8.27-6.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.