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 1423502
Summary: | Update of oci-systemd-hook leads to AVC denied messages | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Robert Scheck <redhat-bugzilla> |
Component: | oci-systemd-hook | Assignee: | David Darrah/Red Hat QE <ddarrah> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Jenner <mjenner> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | ajia, dornelas, dwalsh, lvrabec, mgrepl, mmalik, plautrba, pvrabec, robert.scheck, srandhaw, ssekidde |
Target Milestone: | rc | Keywords: | Extras |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | oci-systemd-hook-0.1.6-1.gitfe22236.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-11-22 15:24:25 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: | 1419040 | ||
Bug Blocks: | 1186913, 1420851 |
Description
Robert Scheck
2017-02-17 13:17:28 UTC
Cross-filed case 01794554 on the Red Hat customer portal. These are systemd doing things that we are attempting to get oci-systemd-hook to do for it. Basically we are not going to allow file systems to be mounted within the container. Not sure if I get you, Daniel. These mounting attempts should be either allow'ed or dontaudit'ed. They result from updated oci-systemd-hook. In the end, https://github.com/projectatomic/oci-systemd-hook/pull/42 is the cause. oci-systemd-hook should not be running as container_t, (svirt_lxc_net_t), These avc's are caused by systemd inside of the container attempting to mount file systems which we want to prevent. So we don't want SELinux to allow or cover this up. We want to fix oci-systemd-hook to setup the environment in such a way that systemd will not attempt to mount. Tom could you check to see if this is fixed with the lates oci-systemd-hook (In reply to Daniel Walsh from comment #6) > Tom could you check to see if this is fixed with the lates oci-systemd-hook Seems to be fixed oci-systemd-hook-0.1.6-1.gitfe22236.el7. Test results follow. Dan I'll touch base Monday with you to close. [root@rhel73bz ~]# cat > Dockerfile.mariadb << EOF > FROM centos:latest > STOPSIGNAL SIGRTMIN+3 > > RUN yum -y install mariadb-server && yum clean all > > RUN systemctl enable mariadb > > VOLUME /var/lib/mysql > > CMD ["/sbin/init"] > EOF [root@rhel73bz ~]# [root@rhel73bz ~]# docker volume create --name localtest-mdb localtest-mdb [root@rhel73bz ~]# docker build -f Dockerfile.mariadb -t localtest-mdb . Sending build context to Docker daemon 14.85 kB Step 1 : FROM centos:latest ---> 98d35105a391 Step 2 : STOPSIGNAL SIGRTMIN+3 ---> Using cache ---> d21037da37ed Step 3 : RUN yum -y install mariadb-server && yum clean all ---> Using cache ---> 4440f237aa2b Step 4 : RUN systemctl enable mariadb ---> Using cache ---> 007cbeb7dcff Step 5 : VOLUME /var/lib/mysql ---> Using cache ---> dc7109037dbf Step 6 : CMD /sbin/init ---> Using cache ---> 53e981575dd6 Successfully built 53e981575dd6 [root@rhel73bz ~]# docker run -dt -v localtest-mdb:/var/lib/mysql --name localtest-mdb localtest-mdb 8f5f9735e44d3b517c009d7ee7e6a234ea701da21b70b1308756df38cdbfb53e [root@rhel73bz ~]# docker exec -t localtest-mdb /bin/bash -c 'for i in {1..30}; do if systemctl is-active mariadb ; then break ; else sleep 1 ; fi done;' inactive inactive activating activating activating activating active [root@rhel73bz ~]# docker exec -t localtest-mdb mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'testuser'@'%' IDENTIFIED BY 'testpassword' WITH GRANT OPTION;" [root@rhel73bz ~]# docker stop localtest-mdb localtest-mdb [root@rhel73bz ~]# docker rm localtest-mdb localtest-mdb [root@rhel73bz ~]# uname -a Linux rhel73bz.localdomain 3.10.0-625.el7.x86_64 #1 SMP Thu Mar 23 11:04:30 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux [root@rhel73bz ~]# cat /proc/version Linux version 3.10.0-625.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Thu Mar 23 11:04:30 EDT 2017 [root@rhel73bz ~]# rpm -qa | grep oci-systemd-hook oci-systemd-hook-0.1.6-1.gitfe22236.el7.x86_64 I've tested with the latest patch (see previous comment) and the problem has been resolved. I've changed the status to ON_QA pending any approval they may need to do. Verified on RHEL with latest build as above. |