Bug 1280092

Summary: AVC: systemd-networkd DHCP server
Product: [Fedora] Fedora Reporter: Sylvain Pasche <sylvain.pasche>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: 23CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-155.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-26 20:58:08 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 Sylvain Pasche 2015-11-10 22:45:06 UTC
Description of problem:

This looks similar to bug 1227128, but this is on Fedora 23.

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

Fedora Cloud 23.

How reproducible:

Use systemd-nspawn with the --network-veth option.

This will create a veth interface using a network configuration that runs a DHCP server.

/usr/lib/systemd/network/80-container-ve.network:
[...]
[Network]
# Default to using a /28 prefix, giving up to 13 addresses per container.
Address=0.0.0.0/28
LinkLocalAddressing=yes
DHCPServer=yes
IPMasquerade=yes

When it tries to do so, I'm getting an AVC:

Nov 10 23:01:20 fed audit[26433]: AVC avc:  denied  { name_bind } for  pid=26433 comm="systemd-network" src=67 scontext=system_u:system_r:systemd_networkd_t:s0 tcontext=system_u:object_r:dhcpd_port_t:s0 tclass=udp_socket permissive=0
Nov 10 23:01:20 fed systemd-networkd[26433]: ve-fedora: Could not start DHCPv4 server instance: Permission denied

Comment 2 Fedora Update System 2015-11-20 13:15:56 UTC
selinux-policy-3.13.1-155.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-0d84d6c75f

Comment 3 Fedora Update System 2015-11-22 14:26:06 UTC
selinux-policy-3.13.1-155.fc23 has been pushed to the Fedora 23 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-0d84d6c75f

Comment 4 Fedora Update System 2015-11-26 20:57:24 UTC
selinux-policy-3.13.1-155.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.