Bug 1439587 - AVC denial prevents write to filesystem under --userns-remap=default
Summary: AVC denial prevents write to filesystem under --userns-remap=default
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: docker
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-06 09:43 UTC by Jan Pazdziora
Modified: 2017-11-29 15:38 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-29 15:38:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora 2017-04-06 09:43:16 UTC
Description of problem:

I configure docker with --userns-remap=default. When container is then run, it's filesystem is effectively read-only due to dac_override AVC denial.

Version-Release number of selected component (if applicable):

docker-1.12.6-6.gitae7d637.fc25.x86_64
selinux-policy-3.13.1-225.11.fc25.noarch
container-selinux-2.10-1.fc25.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. dnf install -y docker
2. vi /etc/sysconfig/docker and append --userns-remap=default to the OPTIONS line
3. systemctl start docker
4. docker run --rm -ti fedora:25 touch /usr/bin/jezek

Actual results:

Unable to find image 'fedora:25' locally
Trying to pull repository docker.io/library/fedora ... 
sha256:b44cdaee0feafc85cab454e2023807f66725c727655b6bef260aa6d21dd2b068: Pulling from docker.io/library/fedora
bc5187a39b05: Pull complete 
Digest: sha256:b44cdaee0feafc85cab454e2023807f66725c727655b6bef260aa6d21dd2b068
Status: Downloaded newer image for docker.io/fedora:25
touch: cannot touch '/usr/bin/jezek': Permission denied

and audit.log has

type=AVC msg=audit(1491471759.509:237): avc:  denied  { dac_override } for  pid=3513 comm="touch" capability=1  scontext=system_u:system_r:container_t:s0:c553,c643 tcontext=system_u:system_r:container_t:s0:c553,c643 tclass=cap_userns permissive=0

Expected results:

No error, no AVC denial.

Additional info:

Comment 1 Daniel Walsh 2017-04-10 14:11:14 UTC
Fixed in upstream 7400ac6a42b3f607682f1f110c0d8b498bf9fcb8

container-selinux-2.11.

Comment 2 Jan Pazdziora 2017-05-15 11:42:07 UTC
Could container-selinux 2.11 be built for Fedora (25 and newer)? The latest one seems to be container-selinux-2.10-1.fc25.

Comment 4 Jan Pazdziora 2017-05-23 11:45:05 UTC
I confirm that with container-selinux-2:2.14-1.fc25 from updates-testing, things no longer fail.

Can we get this bugzilla to some bodhi errata to track the release of the fix?

Comment 6 Fedora End Of Life 2017-11-16 18:35:29 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Jan Pazdziora 2017-11-29 14:16:30 UTC
Can we close this with CURRENTRELASE?


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