Description of problem: Starting docker daemon SELinux is preventing dockerd-current from using the 'net_broadcast' capabilities. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that dockerd-current should have the net_broadcast capability by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # ausearch -c 'dockerd-current' --raw | audit2allow -M my-dockerdcurrent # semodule -X 300 -i my-dockerdcurrent.pp Additional Information: Source Context system_u:system_r:openvswitch_t:s0 Target Context system_u:system_r:openvswitch_t:s0 Target Objects Unknown [ capability ] Source dockerd-current Source Path dockerd-current Port <Ukendt> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.14.3-37.fc30.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Permissive Host Name (removed) Platform Linux (removed) 5.0.17-300.fc30.x86_64 #1 SMP Mon May 20 15:36:26 UTC 2019 x86_64 x86_64 Alert Count 13 First Seen 2019-05-30 22:06:01 CEST Last Seen 2019-05-31 21:20:25 CEST Local ID 0bc57d27-4910-441b-a328-dcea3b06d490 Raw Audit Messages type=AVC msg=audit(1559330425.422:144): avc: denied { net_broadcast } for pid=1849 comm="ovs-vswitchd" capability=11 scontext=system_u:system_r:openvswitch_t:s0 tcontext=system_u:system_r:openvswitch_t:s0 tclass=capability permissive=1 Hash: dockerd-current,openvswitch_t,openvswitch_t,capability,net_broadcast Version-Release number of selected component: selinux-policy-3.14.3-37.fc30.noarch Additional info: component: selinux-policy reporter: libreport-2.10.0 hashmarkername: setroubleshoot kernel: 5.0.17-300.fc30.x86_64 type: libreport
Description of problem: Trying to start a docker container with an openvswitch instance active simultaneously Version-Release number of selected component: selinux-policy-3.14.3-37.fc30.noarch Additional info: reporter: libreport-2.10.0 hashmarkername: setroubleshoot kernel: 5.1.5-300.fc30.x86_64 type: libreport
This AVC looks like openvswitch was not run as a container, it was direcly launched or docker daemon is not running as contianer_runtime_t. openvswitch_t is not a container label. You would need to run the container with --security-opt label=disable and the process should be running as spc_t. BTW Have you looked into Podman for running containers?
In any case, running just dnf install -y /usr/lib/systemd/system/ovs-vswitchd.service systemctl start ovs-vswitchd.service on Fedora 29 yields the same AVC denial. Is Open vSwitch really only supported in containers and not on Fedora host? This is a regression against Fedora 28. Package versions are openvswitch-2.10.0-3.fc29.x86_64 selinux-policy-3.14.2-59.fc29.noarch
Hi All, I'm not aware that openvswitch is supported only in containers, but it sound very unlikely to me. The reason why openvswitch has net_broadcast capability in container is because of this boolean: virt_sandbox_use_all_caps turned on by default. On the other hand, I'm not sure if this is regression against Fedora 28, because this capability was not allowed on F28. Jan, Do we know which feature in openvswitch require net_broadcast capability? THanks, Lukas.
I have no idea. I merely install the package and start the service. This likely needs to be brought to the Open vSwitch's maintainers attention.
Hi Openvswich folks, Is net_broadcast capability used by openvswitch in Fedora 29+ ? Feel free to move it back to selinux-policy component, after we find out if it make sense to allow in selinux-policy. Thanks, Lukas.
It's needed - OvS needs to listen for certain multicast sockets that need this capability.
commit 3b7467adffac219eb8ab24cabb0bfcbc61c566da (HEAD -> rawhide) Author: Lukas Vrabec <lvrabec> Date: Wed Oct 2 12:46:39 2019 +0200 Add net_broadcast capability to openvswitch_t domain BZ(1716044)
FEDORA-2019-6bbf3d600d has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6bbf3d600d
*** Bug 1758633 has been marked as a duplicate of this bug. ***
selinux-policy-3.14.3-48.fc30 has been pushed to the Fedora 30 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-2019-6bbf3d600d
selinux-policy-3.14.3-49.fc30 has been pushed to the Fedora 30 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-2019-6bbf3d600d
FEDORA-2019-d68c9e27f8 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-d68c9e27f8
selinux-policy-3.14.3-50.fc30 has been pushed to the Fedora 30 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-2019-d68c9e27f8
FEDORA-2019-f83217e2bf has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-f83217e2bf
selinux-policy-3.14.3-51.fc30 has been pushed to the Fedora 30 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-2019-f83217e2bf
FEDORA-2019-70d80ad4bc has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-70d80ad4bc
selinux-policy-3.14.3-52.fc30 has been pushed to the Fedora 30 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-2019-70d80ad4bc
selinux-policy-3.14.3-52.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.