Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: I would like to provision a tap device at boot. I have configured /etc/sysconfig/network-scripts/ifcfg-tap0 like this: DEVICE="tap0" TYPE=Tap BRIDGE=br0 NM_CONTROLLED="no" BOOTPROTO="none" ONBOOT="yes" OWNER=openvpn With selinux in enforcing mode this does not come at boot, and the following AVC is logged: type=AVC msg=audit(1376408921.417:1199): avc: denied { relabelfrom } for pid=1912 comm="ip" scontext=system_u:system_r:ifconfig_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tun_socket type=AVC msg=audit(1376408963.758:9): avc: denied { create } for pid=368 comm="ip" scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:system_r:ifconfig_t:s0 tclass=tun_socket type=AVC msg=audit(1376409394.827:7): avc: denied { create } for pid=367 comm="ip" scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:system_r:ifconfig_t:s0 tclass=tun_socket type=AVC msg=audit(1376409530.983:605): avc: denied { relabelfrom } for pid=1421 comm="ip" scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:system_r:ifconfig_t:s0 tclass=tun_socket type=AVC msg=audit(1376409530.983:605): avc: denied { relabelto } for pid=1421 comm="ip" scontext=system_u:system_r:ifconfig_t:s0 tcontext=system_u:system_r:ifconfig_t:s0 tclass=tun_socket Version-Release number of selected component (if applicable): Fedora 19, selinux-policy-targeted-3.12.1-69.fc19.noarch I've corrected this locally by loading in the following selinux policy module, generated with audit2allow: module tuntap 1.0; require { type ifconfig_t; type unconfined_t; class tun_socket { relabelfrom relabelto create }; } #============= ifconfig_t ============== allow ifconfig_t self:tun_socket { relabelfrom relabelto create }; allow ifconfig_t unconfined_t:tun_socket relabelfrom; But it seems as if this should work out of the box.
At boot where does the unconfined_t come from?
b0a11fb4f15e9c11774e4a205331bd5f37dad75d allows ifconfig_t to manage and relabel sockets in git.
Dan: I'm not sure where the unconfined_t comes from. I guess that's part of the question. How would I figure this out? I'm assuming that it's something ultimately descended from /etc/init.d/network via network.service. What repository is that commit from? I assumed git://pkgs.fedoraproject.org/selinux-policy.git but the object doesn't exist there.
I would figure at some time you ran some scripts that did not transition, or this could have happened from an install or something. I pushed it to ssh://git.fedorahosted.org/git/selinux-policy.git Do you get the unconfined_t on every boot?
You're right; the unconfined_t looks anomalous. I only get the the AVC for ifconfig_t on every boot. I'll try out the updated policy this afternoon.
Miroslav will probably push early next week.
selinux-policy-3.12.1-71.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-71.fc19
Package selinux-policy-3.12.1-71.fc19: * should fix your issue, * was pushed to the Fedora 19 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.12.1-71.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-15088/selinux-policy-3.12.1-71.fc19 then log in and leave karma (feedback).
selinux-policy-3.12.1-71.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.