Bug 1480518

Summary: Define nnp_nosuid_transition policy capability
Product: Red Hat Enterprise Linux 7 Reporter: Lukas Vrabec <lvrabec>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: high Docs Contact: Mirek Jahoda <mjahoda>
Priority: high    
Version: 7.5CC: bnocera, lvrabec, mgrepl, mjahoda, mmalik, pasik, plautrba, pvrabec, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-175.el7 Doc Type: Enhancement
Doc Text:
SELinux now supports *systemd* `No New Privileges` This update introduces the `nnp_nosuid_transition` policy capability that enables SELinux domain transitions under `No New Privileges` (NNP) or `nosuid` if `nnp_nosuid_transition` is allowed between the old and new contexts. The _selinux-policy_ packages now contain a policy for *systemd* services that use the `NNP` security feature. The following rule describes allowing this capability for a service: allow source_domain target_type:process2 { nnp_transition nosuid_transition }; For example: allow init_t fprintd_t:process2 { nnp_transition nosuid_transition }; The distribution policy now also contains the m4 macro interface, which can be used in SELinux security policies for services that use the `init_nnp_daemon_domain()` function.
Story Points: ---
Clone Of:
: 1480519 1480521 1594111 (view as bug list) Environment:
Last Closed: 2018-04-10 12:36:40 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:
Bug Depends On:    
Bug Blocks: 1480519, 1480521, 1490330, 1594111    

Description Lukas Vrabec 2017-08-11 09:57:25 UTC
Define the nnp_nosuid_transition policy capability used to enable SELinux domain transitions under NNP or nosuid if the nnp_transition permission or nosuid_transition permission is allowed between the old and new contexts. When this capability is not enabled, such transitions remain limited to bounded transitions as they were prior to the introduction of this capability.

This feature allows us to create SELinux security policy for systemd services with systemd security feature called: NoNewPrivileges. 

Affected RHEL components: kernel, libsepol, selinux-policy

Comment 2 Lukas Vrabec 2017-08-11 10:00:01 UTC
Following commits needs to be backported from Fedora Rawhide:
commit aba089a03c5bc225b4643142dbeca0fc4522c685
Author: Chris PeBenito <pebenito>
Date:   Sat Aug 5 12:22:05 2017 -0400

    init: Add NoNewPerms support for systemd.

commit ba9f3ac2bfe2e131a5bd7e8a75c0e70386cc5d43
Author: Chris PeBenito <pebenito>
Date:   Sat Aug 5 12:13:21 2017 -0400

    Add nnp_nosuid_transition policycap and related class/perm definitions.

Comment 9 errata-xmlrpc 2018-04-10 12:36:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0763