Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1266424 - SELinux is preventing /usr/bin/grep from 'getattr' accesses on the chr_file /dev/pts/2.
Summary: SELinux is preventing /usr/bin/grep from 'getattr' accesses on the chr_file /...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:b05d7ee0a0f72f57ad0b6672bca...
Depends On:
TreeView+ depends on / blocked
Reported: 2015-09-25 08:57 UTC by Yajo
Modified: 2015-09-25 14:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-09-25 14:44:27 UTC
Type: ---

Attachments (Terms of Use)

Description Yajo 2015-09-25 08:57:03 UTC
Description of problem:
docker exec -it somecontainer bash
SELinux is preventing /usr/bin/grep from 'getattr' accesses on the chr_file /dev/pts/2.

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

If cree que de manera predeterminada, grep debería permitir acceso getattr sobre  2 chr_file.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
permita el acceso momentáneamente executando:
# grep grep /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:svirt_lxc_net_t:s0:c280,c925
Target Context                system_u:object_r:docker_devpts_t:s0
Target Objects                /dev/pts/2 [ chr_file ]
Source                        grep
Source Path                   /usr/bin/grep
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           grep-2.21-5.fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.13.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.1.6-201.fc22.x86_64 #1 SMP Fri
                              Sep 4 17:49:24 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-09-25 10:41:41 CEST
Last Seen                     2015-09-25 10:41:41 CEST
Local ID                      cddf1ccb-0922-41a6-8fc3-43fd602a57ae

Raw Audit Messages
type=AVC msg=audit(1443170501.146:1701): avc:  denied  { getattr } for  pid=28471 comm="grep" path="/dev/pts/2" dev="devpts" ino=5 scontext=system_u:system_r:svirt_lxc_net_t:s0:c280,c925 tcontext=system_u:object_r:docker_devpts_t:s0 tclass=chr_file permissive=1

type=SYSCALL msg=audit(1443170501.146:1701): arch=x86_64 syscall=fstat success=yes exit=0 a0=1 a1=7ffe17c9a1f0 a2=7ffe17c9a1f0 a3=7ffe17c99f00 items=0 ppid=28470 pid=28471 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts2 ses=4294967295 comm=grep exe=/usr/bin/grep subj=system_u:system_r:svirt_lxc_net_t:s0:c280,c925 key=(null)

Hash: grep,svirt_lxc_net_t,docker_devpts_t,chr_file,getattr

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.6-201.fc22.x86_64
type:           libreport

Comment 1 Daniel Walsh 2015-09-25 14:44:27 UTC
yum -y update docker-selinux


yum -y reinstall docker-selinux

This should be in the docker-selinux package.

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