Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1360903 - It would be really helpful for testing if runcon had a --no-new-privs flag
Summary: It would be really helpful for testing if runcon had a --no-new-privs flag
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-27 19:09 UTC by Daniel Walsh
Modified: 2017-08-24 03:51 UTC (History)
12 users (show)

Fixed In Version: coreutils-8.27-10.fc27 coreutils-8.27-6.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-24 03:51:47 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.