Bug 1279182 - AVC: systemd hostnamed and networkd cannot talk over dbus
AVC: systemd hostnamed and networkd cannot talk over dbus
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
22
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-08 08:09 EST by DaveG
Modified: 2016-05-10 13:57 EDT (History)
5 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-128.22.fc22 selinux-policy-3.13.1-128.28.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-10 13:57:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description DaveG 2015-11-08 08:09:22 EST
Description of problem:

Hosts using systemd-networkd cannot set the host name from DHCP information due to AVC denial on dbus send_msg.

Version-Release number of selected component (if applicable):

kernel-4.2.5-201.fc22.x86_64
selinux-policy-3.13.1-128.18.fc22.noarch
systemd-219-25.fc22.x86_64


How reproducible:

Configure a host to set host name from systemd-networkd DHCP and boot.


Steps to Reproduce:


Actual results:

journal...

... audit[790]: <audit-1107> pid=790 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.hostname1 member=SetHostname dest=org.freedesktop.hostname1 spid=955 tpid=990 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:system_r:systemd_hostnamed_t:s0 tclass=dbus

... audit[790]: <audit-1107> pid=790 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_return dest=:1.7 spid=990 tpid=955 scontext=system_u:system_r:systemd_hostnamed_t:s0 tcontext=system_u:system_r:systemd_networkd_t:s0 tclass=dbus


Expected results:

No AVC denials.


Additional info:

fgrep 'send_msg' /var/log/audit/audit.log | audit2allow -r

require {
	type systemd_networkd_t;
	type systemd_hostnamed_t;
	class dbus send_msg;
}

#============= systemd_hostnamed_t ==============
allow systemd_hostnamed_t systemd_networkd_t:dbus send_msg;

#============= systemd_networkd_t ==============
allow systemd_networkd_t systemd_hostnamed_t:dbus send_msg;
Comment 1 Lukas Vrabec 2015-12-02 10:38:36 EST
commit a71f15f874f9fa82c9970283815e409c0734ba90
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Wed Dec 2 16:35:59 2015 +0100

    Adding support for dbus communication between systemd-networkd and systemd-hostnamed. BZ(1279182)
Comment 2 Fedora Update System 2015-12-09 08:56:28 EST
selinux-policy-3.13.1-128.22.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-8083abc683
Comment 3 Fedora Update System 2015-12-09 18:23:03 EST
selinux-policy-3.13.1-128.22.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update selinux-policy'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-8083abc683
Comment 4 Fedora Update System 2016-01-18 08:21:08 EST
selinux-policy-3.13.1-128.25.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-825869e1a4
Comment 5 Fedora Update System 2016-01-19 22:54:09 EST
selinux-policy-3.13.1-128.25.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-825869e1a4
Comment 6 Fedora Update System 2016-02-15 12:48:09 EST
selinux-policy-3.13.1-128.27.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab
Comment 7 Fedora Update System 2016-02-17 01:26:54 EST
selinux-policy-3.13.1-128.27.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab
Comment 8 Fedora Update System 2016-02-18 07:29:14 EST
selinux-policy-3.13.1-128.28.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab
Comment 9 Fedora Update System 2016-02-21 13:29:46 EST
selinux-policy-3.13.1-128.28.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ce419c9cab
Comment 10 Fedora Update System 2016-05-10 13:56:32 EDT
selinux-policy-3.13.1-128.28.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.