Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1000300

Summary: SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file /proc/<pid>/environ.
Product: Red Hat Enterprise Linux 7 Reporter: Gerd Hoffmann <kraxel>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: abrt_hash:40f09d0fa3595147a3bf8733efeed178b930bf06032445880cb103a9824b303b
Fixed In Version: selinux-policy-3.12.1-86.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 13:28:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gerd Hoffmann 2013-08-23 06:51:58 UTC
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.
Do
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 22:08:35 UTC
#============= rhsmcertd_t ==============

#!!!! This avc is allowed in the current policy
allow rhsmcertd_t init_t:file getattr;

Comment 5 Ludek Smid 2014-06-13 13:28:10 UTC
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.