Bug 1000300 - SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file /proc/<pid>/environ.
SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file /proc...
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
Depends On:
  Show dependency treegraph
Reported: 2013-08-23 02:51 EDT by Gerd Hoffmann
Modified: 2014-06-17 22:25 EDT (History)
1 user (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-86.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-06-13 09:28:10 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 Gerd Hoffmann 2013-08-23 02:51:58 EDT
Description of problem:
SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file /proc/<pid>/environ.

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

If you believe that bash should be allowed getattr access on the environ file 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 virt-what /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:rhsmcertd_t:s0
Target Context                system_u:system_r:init_t:s0
Target Objects                /proc/<pid>/environ [ file ]
Source                        virt-what
Source Path                   /usr/bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.45-2.el7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-70.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.10.0-9.el7.x86_64 #1 SMP Tue Aug
                              13 14:35:28 EDT 2013 x86_64 x86_64
Alert Count                   9
First Seen                    2013-08-21 22:12:56 CEST
Last Seen                     2013-08-23 06:12:57 CEST
Local ID                      c754f016-2eca-4727-b761-5fc4d728525d

Raw Audit Messages
type=AVC msg=audit(1377231177.326:6163): avc:  denied  { getattr } for  pid=3564 comm="virt-what" path="/proc/1/environ" dev="proc" ino=1125 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=file

type=SYSCALL msg=audit(1377231177.326:6163): arch=x86_64 syscall=stat success=yes exit=0 a0=1811cf0 a1=7fff792706f0 a2=7fff792706f0 a3=8 items=0 ppid=3551 pid=3564 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=virt-what exe=/usr/bin/bash subj=system_u:system_r:rhsmcertd_t:s0 key=(null)

Hash: virt-what,rhsmcertd_t,init_t,file,getattr

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.0-10.el7.x86_64
type:           libreport
Comment 2 Miroslav Grepl 2013-10-03 18:08:35 EDT
#============= rhsmcertd_t ==============

#!!!! This avc is allowed in the current policy
allow rhsmcertd_t init_t:file getattr;
Comment 5 Ludek Smid 2014-06-13 09:28:10 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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