Bug 1486567
Summary: | SElinux systemd-resolved wrong label on /run/systemd/resolve/resolv.conf | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Thilo Bangert <thilo.bangert> |
Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> |
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 27 | CC: | bugzilla.redhat.com, dwalsh, lsm5, lvrabec, mathieu-acct, mgrepl, plautrba, prd-fedora |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-11-30 22:36:56 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: |
Description
Thilo Bangert
2017-08-30 07:47:54 UTC
This issue continues to occur in F27: selinux-policy-3.13.1-283.17.fc27.noarch Can you update the version? Hi, I enabled: systemctl status systemd-networkd ● systemd-networkd.service - Network Service Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2017-12-19 00:15:23 CET; 3min 8s ago Docs: man:systemd-networkd.service(8) Main PID: 564 (systemd-network) Status: "Processing requests..." Tasks: 1 (limit: 4915) CGroup: /system.slice/systemd-networkd.service └─564 /usr/lib/systemd/systemd-networkd Dec 19 00:15:22 virt-fedora-rawhide systemd[1]: Starting Network Service... Dec 19 00:15:23 virt-fedora-rawhide systemd-networkd[564]: Enumeration completed Dec 19 00:15:23 virt-fedora-rawhide systemd[1]: Started Network Service. Dec 19 00:15:29 virt-fedora-rawhide systemd-networkd[564]: ens3: Gained carrier Dec 19 00:15:30 virt-fedora-rawhide systemd-networkd[564]: ens3: Gained IPv6LL Dec 19 00:15:31 virt-fedora-rawhide systemd-networkd[564]: virbr0-nic: Gained carrier Dec 19 00:15:32 virt-fedora-rawhide systemd-networkd[564]: virbr0-nic: Lost carrier systemctl status systemd-resolved ● systemd-resolved.service - Network Name Resolution Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2017-12-19 00:15:29 CET; 3min 19s ago Docs: man:systemd-resolved.service(8) https://www.freedesktop.org/wiki/Software/systemd/resolved https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients Main PID: 803 (systemd-resolve) Status: "Processing requests..." Tasks: 1 (limit: 4915) CGroup: /system.slice/systemd-resolved.service └─803 /usr/lib/systemd/systemd-resolved Dec 19 00:15:28 virt-fedora-rawhide systemd[1]: Starting Network Name Resolution... Dec 19 00:15:28 virt-fedora-rawhide systemd-resolved[803]: Positive Trust Anchors: Dec 19 00:15:28 virt-fedora-rawhide systemd-resolved[803]: . IN DS 19036 8 2 49aac11d7b6f6446702e54a16073 Dec 19 00:15:28 virt-fedora-rawhide systemd-resolved[803]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65 Dec 19 00:15:28 virt-fedora-rawhide systemd-resolved[803]: Negative trust anchors: 10.in-addr.arpa 16.172 Dec 19 00:15:29 virt-fedora-rawhide systemd-resolved[803]: Using system hostname 'virt-fedora-rawhide'. Dec 19 00:15:29 virt-fedora-rawhide systemd[1]: Started Network Name Resolution. then rebooted the machine and I have no issue with labels: #ls -Z /run/systemd/resolve system_u:object_r:net_conf_t:s0 resolv.conf system_u:object_r:systemd_resolved_var_run_t:s0 stub-resolv.conf Could you attach working reproduced please? Thanks, Lukas. This happend to me too in F27. I all I did was enable networkd and resolved, disable NetworkManager, and link /etc/resolv.conf to /run/systemd/resolve/resolv.conf, as directed in the man page for systemd-resolved. Did you so that last part? (Although, I'm still not sure I understand the three modes, so maybe I'm not doing what I mean to do. In any case, this is a supported mode, and it's broken.) When you say "no issues," are you running services like sshd, chronyd, cupsd? What's worse is that something is relabeling /run/systemd/resolve/resolve.conf. I ran restorecon on it last night, and when I woke up, it was wrong again and I had to run restorecon again. He following list of AVCs is from *after* I "fixed" the context of this file. So, something broke it again. That makes no sense at all since networkd is static config, so, who is rewriting resolved.conf Jan 16 08:39:36 hostname audit[1796]: AVC avc: denied { getattr } for pid=1796 comm="tor" path="/run/systemd/resolve/resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:tor_t:s0 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:39:39 hostname audit[7383]: AVC avc: denied { read } for pid=7383 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:39:39 hostname audit[7384]: AVC avc: denied { read } for pid=7384 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:39:39 hostname audit[7387]: AVC avc: denied { read } for pid=7387 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:39:54 hostname audit[7430]: AVC avc: denied { getattr } for pid=7430 comm="sshd" path="/run/systemd/resolve/resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:39:54 hostname audit[7430]: AVC avc: denied { read } for pid=7430 comm="sshd" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:39:57 hostname audit[7439]: AVC avc: denied { read } for pid=7439 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:39:57 hostname audit[7441]: AVC avc: denied { read } for pid=7441 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:39:58 hostname audit[7442]: AVC avc: denied { read } for pid=7442 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:39:58 hostname audit[7443]: AVC avc: denied { read } for pid=7443 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:39:58 hostname audit[7444]: AVC avc: denied { read } for pid=7444 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:40:36 hostname audit[1796]: AVC avc: denied { getattr } for pid=1796 comm="tor" path="/run/systemd/resolve/resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:tor_t:s0 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:40:39 hostname audit[7628]: AVC avc: denied { read } for pid=7628 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:40:39 hostname audit[7629]: AVC avc: denied { read } for pid=7629 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 Jan 16 08:40:39 hostname audit[7630]: AVC avc: denied { read } for pid=7630 comm="rpm" name="resolv.conf" dev="tmpfs" ino=209309 scontext=system_u:system_r:setroubleshootd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_resolved_var_run_t:s0 tclass=file permissive=0 The fact that the file doesn't have the correct context is the first problem. So, even if you aren't experiencing any consequences, you should see that. If not, then that's important information, because I am and I'm Fedora policy. If restorecon thinks it is being created wrong, then that is a bug that needs to be fixed. This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. As reported in comment #1, this issue is also a problem in Fedora 27. Thanks Thilo. I'm on Fedora28, now, and I *think* it might be fixed there. Check when you can. Yup, seems to be working for me as well in F28. Resolved in F28. This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |