Bug 977856
Summary: | Current selinux policy prevents the new vdsm dhcp hook from running | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Antoni Segura Puimedon <asegurap> | ||||||
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 19 | CC: | amuller, asegurap, bazulay, danken, dominick.grift, dwalsh, lpeer, mgrepl, mmalik, myakove, wudxw | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | selinux-policy-3.12.1-69.fc19 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 990509 (view as bug list) | Environment: | |||||||
Last Closed: | 2013-08-04 22:58:22 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: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 618636, 918494, 990024, 990963 | ||||||||
Attachments: |
|
Description
Antoni Segura Puimedon
2013-06-25 13:19:38 UTC
The new behavior of the libvirt detection throws a few more avc denials on bootup. I'll try to make an attachment for them in the morning. Well, I'm a bit delayed with that attachment, but in the meantime, the proper explanation for the need in policy change is: The vdsm service, vdsmd, executes in selinux context system_u:system_r:virtd_t and its supervdsmd counterpart executes in the system_u:system_r:initrc_t context. This allows them to interact with libvirt, qemu, /etc files, sockets, network interface netlink changes, etc. For the multiple gateways feature, ( https://bugzilla.redhat.com/show_bug.cgi?id=618636 ), we need to perform a reasonably sized subset of those restricted actions as part of the DHCP hook that sets up source routing rules and routes (as opposed to destination routing) when dhcp receives a lease for an interface that belongs to vdsm. However, the DHCP hook can and is run on network service start, that is much prior to libvirtd and vdsmd startup when booting up and, for this reason, it can't just call vdsmd, it must call the vdsm code to perform the actions it needs. Thus, to solve the issue the selinux-policy must give access to python executing in the dhcp_t context to perform the actions that the normal vdsmd context (system_u:system_r:virtd_t) allows. supervdsmd Should probably run as the same label vdsmd. What is its path? As far as dhcp_t having the all the rules as virtd_t, I would rather see the AVC's. I doubt dhcp_t is going to be launching virtual machines as svirt_t. We reworked the approach of what we do not to require selinux policy changes. However, on F18 and F19 versions: selinux-policy-3.11.1-98.fc18 selinux-policy-3.12.1-65.fc19 get avc denials. What we do is have dhcp_t create and write to files in /var/run/vdsm/sourceRoutes/ I attach the dhcp_t denials. Created attachment 778276 [details]
audit.log of the denials in F19
These are the denials in Fedoa 19 after running in permissive mode and then trying to make it run on enforcing mode.
Tried a policy mad of attachment 778276 [details] with audit2allow and the functionality is restored for f19.
c82f9befc26d03bc711d5d9606c7f990b1d57ca7 fixes this in git. *** Bug 990024 has been marked as a duplicate of this bug. *** selinux-policy-3.12.1-69.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-69.fc19 Package selinux-policy-3.12.1-69.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-69.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-14089/selinux-policy-3.12.1-69.fc19 then log in and leave karma (feedback). selinux-policy-3.12.1-69.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. |