Skip to contentSkip to conversation

selinux-notebook: describe nosuid and NNP transitions

PATCH In review Topi Miettinen 2 participants 2 messages Jun 27, 2021 – Jul 13, 2021 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 selinux-notebook: describe nosuid and NNP transitions

Describe cases where nosuid_transition or nnp_transition are needed.

---
 src/computing_security_contexts.md | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
src/computing_security_contexts.md +12 -1
index bb946b5..ca514d7 100644
@@ -84,7 +84,18 @@ Processes inherit their security context as follows:
    *default_type* (policy version 28) or if a security-aware process,
    by calling ***setexeccon**(3)* if permitted by policy prior to
    invoking exec.
-3. At any time, a security-aware process may invoke ***setcon**(3)* to
+3. If the loaded SELinux policy has the nnp_nosuid_transition policy
+   capability enabled there are potentially two additional permissions
+   that are required to permit a domain transition: nosuid_transition
+   for nosuid mounted filesystems, and nnp_transition for for threads
+   with the no_new_privs flag. If nnp_nosuid_transition policy
+   capability is disabled, such domain transitions are denied but
+   bounded domain transitions are still allowed. In bounded
+   transitions, target domain is only allowed a subset of the
+   permissions of the source domain.  See also
+   [**Linux Security Module and SELinux**](lsm_selinux.md#linux-security-module-and-selinux)
+   section.
+4. At any time, a security-aware process may invoke ***setcon**(3)* to
    switch its security context (if permitted by policy) although this
    practice is generally discouraged - exec-based transitions are
    preferred.
Signature · 1 line
2.30.2
maintainer
#1 lore raw
Quoted 7 lines · Topi Miettinen

Describe cases where nosuid_transition or nnp_transition are needed.

---
 src/computing_security_contexts.md | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Merged with some minor typo fixes - thanks for your help and patience Topi!

Signature · 2 lines
paul moore
www.paul-moore.com