Bug 1955547
| Summary: | Allow nnp_transition for init_t -> install_t | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Timothée Ravier <travier> |
| Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.5 | CC: | dwalsh, extras-qa, grepl.miroslav, lvrabec, mmalik, omosnace, plautrba, ssekidde, travier, vmojzis, walters, zpytela |
| Target Milestone: | beta | Keywords: | AutoVerified, Triaged |
| Target Release: | 8.5 | Flags: | pm-rhel:
mirror+
|
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | selinux-policy-3.14.3-70.el8 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1937404 | Environment: | |
| Last Closed: | 2021-11-09 19:43:05 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: | 1937404 | ||
| Bug Blocks: | |||
|
Description
Timothée Ravier
2021-04-30 11:07:14 UTC
This is a request to backport or make sure that the policy already includes the following change in 8.5: https://github.com/fedora-selinux/selinux-policy/pull/642 Thanks! Needs to be backported:
Author: Timothée Ravier <travier>
Date: Thu Mar 11 16:53:29 2021 +0100
install_t: Allow NoNewPriv transition from systemd
When old selinux-policy is installed, following SELinux denials appear in enforcing mode:
----
type=PROCTITLE msg=audit(06/10/2021 11:53:31.621:320) : proctitle=/usr/bin/rpm-ostree countme
type=PATH msg=audit(06/10/2021 11:53:31.621:320) : item=0 name=/lib64/ld-linux-x86-64.so.2 inode=9890 dev=fd:01 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ld_so_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(06/10/2021 11:53:31.621:320) : cwd=/
type=EXECVE msg=audit(06/10/2021 11:53:31.621:320) : argc=2 a0=/usr/bin/rpm-ostree a1=countme
type=SYSCALL msg=audit(06/10/2021 11:53:31.621:320) : arch=x86_64 syscall=execve success=yes exit=0 a0=0x55aa84bfea20 a1=0x55aa84bfea00 a2=0x55aa84c6bde0 a3=0x0 items=1 ppid=1 pid=6525 auid=unset uid=rpm-ostree gid=rpm-ostree euid=rpm-ostree suid=rpm-ostree fsuid=rpm-ostree egid=rpm-ostree sgid=rpm-ostree fsgid=rpm-ostree tty=(none) ses=unset comm=rpm-ostree exe=/usr/bin/rpm-ostree subj=system_u:system_r:init_t:s0 key=(null)
type=SELINUX_ERR msg=audit(06/10/2021 11:53:31.621:320) : op=security_bounded_transition seresult=denied oldcontext=system_u:system_r:init_t:s0 newcontext=system_u:system_r:install_t:s0
type=AVC msg=audit(06/10/2021 11:53:31.621:320) : avc: denied { nnp_transition } for pid=6525 comm=(m-ostree) scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:install_t:s0 tclass=process2 permissive=0
----
type=PROCTITLE msg=audit(06/10/2021 11:53:31.660:321) : proctitle=/usr/bin/rpm-ostree countme
type=SYSCALL msg=audit(06/10/2021 11:53:31.660:321) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=0xffffff9c a1=0x5645b8ef03d0 a2=O_RDONLY|O_CLOEXEC|O_PATH a3=0x0 items=0 ppid=1 pid=6525 auid=unset uid=rpm-ostree gid=rpm-ostree euid=rpm-ostree suid=rpm-ostree fsuid=rpm-ostree egid=rpm-ostree sgid=rpm-ostree fsgid=rpm-ostree tty=(none) ses=unset comm=rpm-ostree exe=/usr/bin/rpm-ostree subj=system_u:system_r:init_t:s0 key=(null)
type=AVC msg=audit(06/10/2021 11:53:31.660:321) : avc: denied { read } for pid=6525 comm=rpm-ostree name=rpm-ostree-countme dev="vda1" ino=6970988 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=lnk_file permissive=0
----
Tested in 1minutetip with selinux-policy = 3.14.3-68.el8.
When old selinux-policy is installed, the same SELinux denials appear in permissive mode:
----
type=PROCTITLE msg=audit(06/10/2021 13:46:35.690:329) : proctitle=(m-ostree)
type=SYSCALL msg=audit(06/10/2021 13:46:35.690:329) : arch=x86_64 syscall=readlinkat success=yes exit=26 a0=0xffffff9c a1=0x55aa84b5d220 a2=0x55aa84be2930 a3=0x63 items=0 ppid=1 pid=6931 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=(m-ostree) exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=(null)
type=AVC msg=audit(06/10/2021 13:46:35.690:329) : avc: denied { read } for pid=6931 comm=(m-ostree) name=rpm-ostree-countme dev="vda1" ino=6970988 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=lnk_file permissive=1
----
type=PROCTITLE msg=audit(06/10/2021 13:46:35.913:330) : proctitle=(m-ostree)
type=PATH msg=audit(06/10/2021 13:46:35.913:330) : item=0 name=/lib64/ld-linux-x86-64.so.2 inode=9890 dev=fd:01 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ld_so_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(06/10/2021 13:46:35.913:330) : cwd=/
type=EXECVE msg=audit(06/10/2021 13:46:35.913:330) : argc=2 a0=/usr/bin/rpm-ostree a1=countme
type=SYSCALL msg=audit(06/10/2021 13:46:35.913:330) : arch=x86_64 syscall=execve success=yes exit=0 a0=0x55aa84bfea20 a1=0x55aa84be2930 a2=0x55aa84b35c20 a3=0x0 items=1 ppid=1 pid=6931 auid=unset uid=rpm-ostree gid=rpm-ostree euid=rpm-ostree suid=rpm-ostree fsuid=rpm-ostree egid=rpm-ostree sgid=rpm-ostree fsgid=rpm-ostree tty=(none) ses=unset comm=rpm-ostree exe=/usr/bin/rpm-ostree subj=system_u:system_r:install_t:s0 key=(null)
type=AVC msg=audit(06/10/2021 13:46:35.913:330) : avc: denied { nnp_transition } for pid=6931 comm=(m-ostree) scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:install_t:s0 tclass=process2 permissive=1
----
# ls -lZ /var/lib/rpm-ostree-countme
lrwxrwxrwx. 1 root root system_u:object_r:var_lib_t:s0 26 Jun 10 11:53 /var/lib/rpm-ostree-countme -> private/rpm-ostree-countme
#
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 (selinux-policy bug fix and enhancement update), 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-2021:4420 |