Bug 1565752

Summary: docker + devmapper: wrong selinux labels
Product: Red Hat Enterprise Linux 7 Reporter: Ed Santiago <santiago>
Component: container-selinuxAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED CURRENTRELEASE QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: dwalsh, pthomas
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: container-selinux-2.56-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-05 14:36:40 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:

Description Ed Santiago 2018-04-10 16:47:54 UTC
Setup: docker-1.13 configured to use device mapper. Problem does not happen on overlay2 configurations.

Symptom:

  # docker run --rm --security-opt label:disable rhel7 cat /proc/self/attr/current
  system_u:system_r:container_runtime_t:s0
                    ^^^^^^^^^^^^^^^^^^^ -- expected spc_t

  # docker run --rm --privileged --userns=host rhel7 cat /proc/self/attr/current
  system_u:system_r:container_runtime_t:s0
                    ^^^^^^^^^^^^^^^^^^^ -- ditto


Seeing this on RHEL 7.4 and 7.5 with:

  container-selinux-2.55-1.el7.noarch
  docker-1.13.1-58.git87f2fab.el7.x86_64
  docker-1.13.1-61.git87f2fab.el7.x86_64

This is a regression since container-selinux-2.41-1.git126c1c0.el7 and docker-1.13.1-53.git774336d.el7

Comment 2 Daniel Walsh 2018-04-11 05:45:33 UTC
Works with Overlay2 Back end?

I think the problem is we might have dropped the transition from unlabeled_t.

Comment 3 Daniel Walsh 2018-04-11 05:51:47 UTC
Should be fixed in container-selinux-2.56-1.el7

Comment 4 Ed Santiago 2018-04-11 11:49:21 UTC
Confirmed.