This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1266424 - SELinux is preventing /usr/bin/grep from 'getattr' accesses on the chr_file /dev/pts/2.
SELinux is preventing /usr/bin/grep from 'getattr' accesses on the chr_file /...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-09-25 04:57 EDT by Yajo
Modified: 2015-09-25 10:44 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-09-25 10:44:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Yajo 2015-09-25 04:57:03 EDT
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 10:44:27 EDT
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.