Bug 1279182 - AVC: systemd hostnamed and networkd cannot talk over dbus
Summary: AVC: systemd hostnamed and networkd cannot talk over dbus
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-08 13:09 UTC by DaveG
Modified: 2016-05-10 17:57 UTC (History)
5 users (show)

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:
Clone Of:
Environment:
Last Closed: 2016-05-10 17:57:54 UTC


Attachments (Terms of Use)

Description DaveG 2015-11-08 13:09:22 UTC
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 15:38:36 UTC
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 13:56:28 UTC
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 23:23:03 UTC
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 13:21:08 UTC
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-20 03:54:09 UTC
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 17:48:09 UTC
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 06:26:54 UTC
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 12:29:14 UTC
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 18:29:46 UTC
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 17:56:32 UTC
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.