Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1227128 - SELinux is preventing /usr/lib/systemd/systemd-networkd from name_bind access on the udp_socket port 68
Summary: SELinux is preventing /usr/lib/systemd/systemd-networkd from name_bind access...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-02 00:39 UTC by jjq
Modified: 2015-06-11 18:38 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-128.1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-11 18:38:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description jjq 2015-06-02 00:39:50 UTC
Description of problem:
Using systemd-networkd to configure a network interface using dhcp and get this message when dhcp client attempts to get an ip address

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-126.fc22.noarch

How reproducible:
Very

Steps to Reproduce:
1.Start or re-awaken computer from suspend
2.
3.

Actual results:


Expected results:
SELinux should allow this

Additional info:

Additional Information:
Source Context                system_u:system_r:systemd_networkd_t:s0
Target Context                system_u:object_r:dhcpc_port_t:s0
Target Objects                port 68 [ udp_socket ]
Source                        systemd-network
Source Path                   /usr/lib/systemd/systemd-networkd
Port                          68
Host                          plato.bluerun.us
Source RPM Packages           systemd-219-15.fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-126.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.0.4-301.fc22.x86_64 #1
                              SMP Thu May 21 13:10:33 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-06-01 19:18:08 EDT
Last Seen                     2015-06-01 19:18:08 EDT
Local ID                      940713c6-1982-4ef4-800e-371f55b22fe6

Raw Audit Messages
type=AVC msg=audit(1433200688.250:249): avc:  denied  { name_bind } for  pid=877 comm="systemd-network" src=68 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:dhcpc_port_t:s0 tclass=udp_socket permissive=1


type=AVC msg=audit(1433200688.250:249): avc:  denied  { node_bind } for  pid=877 comm="systemd-network" saddr=192.168.201.2 src=68 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:node_t:s0 tclass=udp_socket permissive=1


type=AVC msg=audit(1433200688.250:249): avc:  denied  { net_bind_service } for  pid=877 comm="systemd-network" capability=10  scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:system_r:systemd_networkd_t:s0 tclass=capability permissive=1


type=SYSCALL msg=audit(1433200688.250:249): arch=x86_64 syscall=bind success=yes exit=0 a0=b a1=7ffe83bb68f0 a2=10 a3=7ffe83bb68ec items=0 ppid=1 pid=877 auid=4294967295 uid=481 gid=480 euid=481 suid=481 fsuid=481 egid=480 sgid=480 fsgid=480 tty=(none) ses=4294967295 comm=systemd-network exe=/usr/lib/systemd/systemd-networkd subj=system_u:system_r:systemd_networkd_t:s0 key=(null)

Hash: systemd-network,systemd_networkd_t,dhcpc_port_t,udp_socket,name_bind

Comment 1 Miroslav Grepl 2015-06-02 14:54:04 UTC
commit 31befb6e5f507b6d9d1a42f142ad4f630518c482
Author: Miroslav Grepl <mgrepl>
Date:   Mon Jun 1 15:13:41 2015 +0200

    Allow systemd-networkd to bind dhcpc ports if DHCP=yes in *.network conf file.

Comment 2 Fedora Update System 2015-06-09 14:39:34 UTC
selinux-policy-3.13.1-128.1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-128.1.fc22

Comment 3 Fedora Update System 2015-06-10 19:11:19 UTC
Package selinux-policy-3.13.1-128.1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.13.1-128.1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-9714/selinux-policy-3.13.1-128.1.fc22
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2015-06-11 18:38:04 UTC
selinux-policy-3.13.1-128.1.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.