Bug 1806894
Summary: | AVC for nm-cloud-setup.service | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Vladimir Benes <vbenes> |
Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 8.2 | CC: | lmiksik, lvrabec, mmalik, plautrba, ssekidde, thaller, zpytela |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-04-28 16:41:41 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: | 1642461, 1823315 |
Description
Vladimir Benes
2020-02-25 09:47:05 UTC
Where can I find the NM test suite? I would like to see why systemctl is running under NetworkManager_t context. Caught in enforcing mode: ---- type=PROCTITLE msg=audit(02/25/2020 09:12:34.608:661) : proctitle=systemctl -q is-enabled nm-cloud-setup.service type=PATH msg=audit(02/25/2020 09:12:34.608:661) : item=0 name=/usr/lib/systemd/system/nm-cloud-setup.service inode=34294278 dev=fd:00 mode=file,644 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:systemd_unit_file_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 type=CWD msg=audit(02/25/2020 09:12:34.608:661) : cwd=/ type=SYSCALL msg=audit(02/25/2020 09:12:34.608:661) : arch=x86_64 syscall=lstat success=no exit=EACCES(Permission denied) a0=0x55f599d0b130 a1=0x7ffd2d4ca470 a2=0x7ffd2d4ca470 a3=0x0 items=1 ppid=29372 pid=29373 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemctl exe=/usr/bin/systemctl subj=system_u:system_r:NetworkManager_t:s0 key=(null) type=AVC msg=audit(02/25/2020 09:12:34.608:661) : avc: denied { getattr } for pid=29373 comm=systemctl path=/usr/lib/systemd/system/nm-cloud-setup.service dev="dm-0" ino=34294278 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file permissive=0 ---- Caught in permissive mode: ---- type=PROCTITLE msg=audit(02/25/2020 09:13:27.154:670) : proctitle=systemctl -q is-enabled nm-cloud-setup.service type=PATH msg=audit(02/25/2020 09:13:27.154:670) : item=0 name=/usr/lib/systemd/system/nm-cloud-setup.service inode=34294278 dev=fd:00 mode=file,644 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:systemd_unit_file_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 type=CWD msg=audit(02/25/2020 09:13:27.154:670) : cwd=/ type=SYSCALL msg=audit(02/25/2020 09:13:27.154:670) : arch=x86_64 syscall=lstat success=yes exit=0 a0=0x558601234130 a1=0x7ffdbd397c50 a2=0x7ffdbd397c50 a3=0x0 items=1 ppid=29560 pid=29561 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=systemctl exe=/usr/bin/systemctl subj=system_u:system_r:NetworkManager_t:s0 key=(null) type=AVC msg=audit(02/25/2020 09:13:27.154:670) : avc: denied { getattr } for pid=29561 comm=systemctl path=/usr/lib/systemd/system/nm-cloud-setup.service dev="dm-0" ino=34294278 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file permissive=1 ---- I think it's done by /usr/lib/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh (which does [1]). Note that /usr/lib/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh is a symlink to "no-wait.d/90-nm-cloud-setup.sh". These scripts in dispatcher.d are executed by NetworkManager-dispatcher service. They probably should not be labelled as NetworkManager_t. See related issues bug 1781806 and bug 1777506. [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/9add51ef16356da81a0fd5a8f3f0ddebeb093636/clients/cloud-setup/90-nm-cloud-setup.sh Hi Milos, can this be fixed in time for rhel-8.2? The SELinux denial in this case seems rather sever as it spams the logs and prevents the package from working. Arguably, nm-cloud-setup is still somewhat experimental and not installed by default. However, I would appreciate if we could solve the trivial(??) issues like this. > Hi Milos,
Ups, I meant Zdenek. Sorry.
Thomas, Given the current RHEL 8.2 state, exception flag is required to move forward. Granting devel_ack. It is considered as important based on the justification. I've submitted a Fedora PR to address the issue: https://github.com/fedora-selinux/selinux-policy-contrib/pull/213 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-2020:1773 |