Bug 1136773 - SELinux is preventing /var/lib/docker/init/dockerinit-1.2.0 from 'getattr' accesses on the file /proc/kcore.
Summary: SELinux is preventing /var/lib/docker/init/dockerinit-1.2.0 from 'getattr' ac...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:ec86b1158d7af29d72896410d32...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-03 09:35 UTC by Elad Alfassa
Modified: 2014-09-23 04:45 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.13.1-79.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-23 04:45:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Elad Alfassa 2014-09-03 09:35:53 UTC
Description of problem:
This happened when typing "top" in a Fedora docker container.  Maybe docker should even try reading this file and it's a docker bug, I don't know.
SELinux is preventing /var/lib/docker/init/dockerinit-1.2.0 from 'getattr' accesses on the file /proc/kcore.

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

If you believe that dockerinit-1.2.0 should be allowed getattr access on the kcore file 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 dockerinit-1.2. /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:object_r:proc_kcore_t:s0
Target Objects                /proc/kcore [ file ]
Source                        dockerinit-1.2.
Source Path                   /var/lib/docker/init/dockerinit-1.2.0
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-77.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.16.1-300.fc21.x86_64 #1 SMP Thu
                              Aug 14 15:06:34 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-09-03 12:34:30 IDT
Last Seen                     2014-09-03 12:34:30 IDT
Local ID                      5d9a17dd-fcb5-44f2-a9b7-4cab7221011c

Raw Audit Messages
type=AVC msg=audit(1409736870.191:274): avc:  denied  { getattr } for  pid=4199 comm="dockerinit-1.2." path="/proc/kcore" dev="proc" ino=4026531992 scontext=system_u:system_r:docker_t:s0 tcontext=system_u:object_r:proc_kcore_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1409736870.191:274): arch=x86_64 syscall=stat success=yes exit=0 a0=c2080b08e0 a1=c20800f830 a2=0 a3=0 items=0 ppid=2685 pid=4199 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts4 ses=4294967295 comm=dockerinit-1.2. exe=/var/lib/docker/init/dockerinit-1.2.0 subj=system_u:system_r:docker_t:s0 key=(null)

Hash: dockerinit-1.2.,docker_t,proc_kcore_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-77.fc21.noarch

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.1-300.fc21.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-09-03 10:48:23 UTC
6b9b757ddd7566ad3fb323fef51279a62152e829 fixes this in git.

Comment 2 Lukas Vrabec 2014-09-03 15:04:31 UTC
commit 6b9b757ddd7566ad3fb323fef51279a62152e829
Author: Dan Walsh <dwalsh>
Date:   Wed Sep 3 06:48:03 2014 -0400

    Allow docker to read all of /proc

https://github.com/selinux-policy/selinux-policy/commit/6b9b757ddd7566ad3fb323fef51279a62152e829

Comment 3 Stephen Gallagher 2014-09-04 11:45:39 UTC
Description of problem:
I was generating a docker image from the nginx dockerfile from fedora-dockerfiles

Version-Release number of selected component:
selinux-policy-3.13.1-77.fc21.noarch

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.1-301.fc21.x86_64
type:           libreport

Comment 4 Fedora Update System 2014-09-10 09:28:39 UTC
selinux-policy-3.13.1-79.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-79.fc21

Comment 5 Fedora Update System 2014-09-10 16:42:56 UTC
Package selinux-policy-3.13.1-79.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-79.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-10624/selinux-policy-3.13.1-79.fc21
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-09-23 04:45:24 UTC
selinux-policy-3.13.1-79.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.