Bug 1127128 - SELinux is preventing /usr/bin/docker from using the 'setfcap' capabilities.
Summary: SELinux is preventing /usr/bin/docker from using the 'setfcap' capabilities.
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:ab05a45c42fc679d9fb9cd1152c...
Depends On:
TreeView+ depends on / blocked
Reported: 2014-08-06 08:34 UTC by Stephen Gallagher
Modified: 2014-09-10 02:45 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.13.1-78.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-09-10 02:45:48 UTC
Type: ---

Attachments (Terms of Use)

Description Stephen Gallagher 2014-08-06 08:34:10 UTC
Description of problem:
Tried to set up the fedora/memcached:latest docker image through Cockpit.
SELinux is preventing /usr/bin/docker from using the 'setfcap' capabilities.

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

If you believe that docker should have the setfcap capability by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep docker /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:docker_t:s0
Target Context                system_u:system_r:docker_t:s0
Target Objects                Unknown [ capability ]
Source                        docker
Source Path                   /usr/bin/docker
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           docker-io-1.1.2-2.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-67.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.16.0-0.rc6.git3.1.fc21.x86_64 #1
                              SMP Sat Jul 26 13:57:52 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                    2014-08-06 10:33:24 CEST
Last Seen                     2014-08-06 10:33:41 CEST
Local ID                      17d2fb67-32bf-42f6-a4d7-1d61f3cbbff1

Raw Audit Messages
type=AVC msg=audit(1407314021.608:1083): avc:  denied  { setfcap } for  pid=5072 comm="docker" capability=31  scontext=system_u:system_r:docker_t:s0 tcontext=system_u:system_r:docker_t:s0 tclass=capability permissive=1

type=SYSCALL msg=audit(1407314021.608:1083): arch=x86_64 syscall=lsetxattr success=yes exit=0 a0=c2085a4300 a1=c208460180 a2=c208460160 a3=14 items=0 ppid=1 pid=5072 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=docker exe=/usr/bin/docker subj=system_u:system_r:docker_t:s0 key=(null)

Hash: docker,docker_t,docker_t,capability,setfcap

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.0-0.rc6.git3.1.fc21.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-08-06 13:31:56 UTC
Miroslav we should continue to run docker as a permissive domain, or even unconfined_domain for now.  Too many unkowns.

Comment 2 Daniel Walsh 2014-08-06 13:32:59 UTC
25b7c9d4566df5b2ac5ec731dc5a4047822446f9 fixes this in git.

Comment 3 Lukas Vrabec 2014-08-12 09:29:26 UTC
commit 25b7c9d4566df5b2ac5ec731dc5a4047822446f9
Author: Dan Walsh <dwalsh>
Date:   Wed Aug 6 09:32:12 2014 -0400

    docker needs setfcap


Comment 4 Fedora Update System 2014-08-28 14:10:49 UTC
selinux-policy-3.13.1-77.fc21 has been submitted as an update for Fedora 21.

Comment 5 Fedora Update System 2014-08-28 16:42:32 UTC
Package selinux-policy-3.13.1-77.fc21:
* should fix your issue,
* was pushed to the Fedora 21 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.13.1-77.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-09-02 19:29:33 UTC
selinux-policy-3.13.1-78.fc21 has been submitted as an update for Fedora 21.

Comment 7 Fedora Update System 2014-09-10 02:45:48 UTC
selinux-policy-3.13.1-78.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

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