RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1360195 - docker module at lower priority 100 with module at priority 400 when update and downgrade
Summary: docker module at lower priority 100 with module at priority 400 when update a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-26 08:25 UTC by Luwen Su
Modified: 2019-03-06 02:06 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-17 20:43:18 UTC
Target Upstream Version:
Embargoed:
jhonce: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0116 0 normal SHIPPED_LIVE Moderate: docker security, bug fix, and enhancement update 2017-01-18 01:39:43 UTC

Description Luwen Su 2016-07-26 08:25:27 UTC
Description of problem:
Updating or downgrade docker-selinux triggers an error 
"libsemanage.semanage_direct_install_info: Overriding docker module at lower priority 100 with module at priority 400." which will provent oci-register-machine to start the container.

Only occurs in my local vm even though i update all packages to latest,
i don't see this in remote errata machine, like this one
stable-rhos9-server-rhel7-01.lab.eng.rdu2.redhat.com

Version-Release number of selected component (if applicable):
docker-1.10.3-46.el7.8.x86_64
systemd-219-24.el7.x86_64
selinux-policy-3.13.1-91.el7.noarch
libsemanage-2.5-3.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1.
Updating / installing...
   1:docker-selinux-1.10.3-46.el7.8   ################################# [  6%]
libsemanage.semanage_direct_install_info: Overriding docker module at lower priority 100 with module at priority 400.


2.
#docker run -it rhel7 /bin/bash
docker: Error response from daemon: Cannot start container 5fe1d473fe12f85c9af786facd491909d27542dcd87af621b5839bafd4ff9326: [9] System error: exit status 1.


3.
 Register machine: poststop c1903ed20786ff3a77e25d59d407b643aec078da87593c13402e591bfed70077 0 /var/lib/docker/devicemapper/mnt/b319ae79a3a34bb262ccffe9b4bf49b81be4cc4613067143890f50b03006bc80/rootfs
Jul 26 16:13:46 localhost oci-register-machine[2865]: 2016/07/26 16:13:46 TerminateMachine failed: No machine 'c1903ed20786ff3a77e25d59d407b643aec078da87593c13402e591bfed70077' known


4:
#sealert -l a421ae03-4965-4caf-8ce8-24269ce6d9b8
SELinux is preventing /usr/lib/systemd/systemd-machined from search access on the directory 2852.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that systemd-machined should be allowed search access on the 2852 directory 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:
# grep systemd-machine /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


Additional Information:
Source Context                system_u:system_r:systemd_machined_t:s0
Target Context                system_u:system_r:unconfined_service_t:s0
Target Objects                2852 [ dir ]
Source                        systemd-machine
Source Path                   /usr/lib/systemd/systemd-machined
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           systemd-219-24.el7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-91.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     dhcp-3-108.nay.redhat.com
Platform                      Linux dhcp-3-108.nay.redhat.com
                              3.10.0-478.el7.x86_64 #1 SMP Sat Jul 23 10:11:44
                              EDT 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-07-26 16:13:46 CST
Last Seen                     2016-07-26 16:13:46 CST
Local ID                      a421ae03-4965-4caf-8ce8-24269ce6d9b8

Raw Audit Messages
type=AVC msg=audit(1469520826.568:392): avc:  denied  { search } for  pid=2859 comm="systemd-machine" name="2852" dev="proc" ino=21992 scontext=system_u:system_r:systemd_machined_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=dir


type=SYSCALL msg=audit(1469520826.568:392): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff4c015800 a1=80000 a2=1b6 a3=24 items=0 ppid=1 pid=2859 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-machine exe=/usr/lib/systemd/systemd-machined subj=system_u:system_r:systemd_machined_t:s0 key=(null)

Hash: systemd-machine,systemd_machined_t,unconfined_service_t,dir,search


Additional info:

Comment 3 Daniel Walsh 2016-07-26 18:59:34 UTC
The 100 docker package should have been removed from the update to selinux-policy.

Comment 4 Daniel Walsh 2016-07-26 19:01:12 UTC
This looks like docker is running with the incorrect label.  ls -lZ /usr/bin/docker.

Comment 5 Luwen Su 2016-07-27 09:44:18 UTC
(In reply to Daniel Walsh from comment #4)
> This looks like docker is running with the incorrect label.  ls -lZ
> /usr/bin/docker.

#ls -lZ /usr/bin/docker
-rwxr-xr-x. root root system_u:object_r:docker_exec_t:s0 /usr/bin/docker

In another host, after updating policycoreutils and selinux-policy-targeted, met the same error.

And i see this bug https://bugzilla.redhat.com/show_bug.cgi?id=1339947, then i don't find the fixed patch https://github.com/fedora-selinux/selinux-policy/pull/127 in selinux-policy-3.13.1-91.el7.src.rpm (the latest rhel version),
is it related?

Comment 11 Miroslav Grepl 2016-08-22 08:52:19 UTC
Updating / installing...
   1:docker-selinux-1.10.3-46.el7.8   ################################# [  6%]
libsemanage.semanage_direct_install_info: Overriding docker module at lower priority 100 with module at priority 400.


It is OK and it is expected.

It looks like there was a problem with labeling. Could you just try to restart docker service? I see you have correct labeling.

Comment 13 Miroslav Grepl 2016-08-22 09:00:20 UTC
(In reply to Miroslav Grepl from comment #11)
> Updating / installing...
>    1:docker-selinux-1.10.3-46.el7.8   ################################# [ 
> 6%]
> libsemanage.semanage_direct_install_info: Overriding docker module at lower
> priority 100 with module at priority 400.
> 
> 
> It is OK and it is expected.
> 
> It looks like there was a problem with labeling. Could you just try to
> restart docker service? I see you have correct labeling.

Could you also add your output of 

# ps -efZ | grep unconfined_service

if you can still reproduce it.

Thank you.

Comment 14 Daniel Walsh 2016-08-22 11:14:02 UTC
We have an upgrade problem.  if we switch to installing at -X 200, then we will need to install -X 200 and remove -X 400, in order to get the correct version of docker.pp to be used.

I guess we could do this as a trigger, since we only want to do it once.

Comment 15 Miroslav Grepl 2016-08-23 08:05:16 UTC
(In reply to Daniel Walsh from comment #14)
> We have an upgrade problem.  if we switch to installing at -X 200, then we
> will need to install -X 200 and remove -X 400, in order to get the correct
> version of docker.pp to be used.

Previously, we would have a problem with that because we would end up with unlabeled_t for running docker. It is a problem no longer because we have the docker policy in our distribution policy so we still define docker_t.

> 
> I guess we could do this as a trigger, since we only want to do it once.

I don't see a better way now how to do it without a trigger.

Comment 16 Daniel Walsh 2016-08-23 10:36:29 UTC
Lokesh do you have enough information to make the changes?

Comment 19 Daniel Walsh 2016-09-28 11:30:27 UTC
The version with the support for rhel7.3 is

docker-1.10.3-55.el7
selinux-policy-3.13.1-102.el7

Comment 21 Luwen Su 2016-11-10 09:12:09 UTC
Works fine for me with docker-1.12.3-4.el7.x86_64, move to verified

Comment 23 errata-xmlrpc 2017-01-17 20:43:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0116.html


Note You need to log in before you can comment on or make changes to this bug.