Bug 982205 - SELinux is preventing /usr/bin/ps from 'getattr' accesses on the directory /proc/<pid>.
SELinux is preventing /usr/bin/ps from 'getattr' accesses on the directory /p...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:a7faa806833f3dc8989a2f1fd32...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-08 07:44 EDT by Arindam Choudhury
Modified: 2013-10-24 13:51 EDT (History)
5 users (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-63.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-24 13:51:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Arindam Choudhury 2013-07-08 07:44:59 EDT
Description of problem:
SELinux is preventing /usr/bin/ps from 'getattr' accesses on the directory /proc/<pid>.

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

If you believe that ps should be allowed getattr access on the <pid> directory 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 ps /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:rabbitmq_beam_t:s0
Target Context                system_u:system_r:rabbitmq_epmd_t:s0
Target Objects                /proc/<pid> [ dir ]
Source                        ps
Source Path                   /usr/bin/ps
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           procps-ng-3.3.8-8.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-59.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.9-301.fc19.x86_64 #1 SMP Thu
                              Jul 4 15:10:36 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-07-08 11:42:25 CEST
Last Seen                     2013-07-08 11:42:25 CEST
Local ID                      7d21963a-49c2-41f7-9ed8-cca12a8761f7

Raw Audit Messages
type=AVC msg=audit(1373276545.908:474): avc:  denied  { getattr } for  pid=1179 comm="ps" path="/proc/557" dev="proc" ino=19577 scontext=system_u:system_r:rabbitmq_beam_t:s0 tcontext=system_u:system_r:rabbitmq_epmd_t:s0 tclass=dir


type=SYSCALL msg=audit(1373276545.908:474): arch=x86_64 syscall=stat success=yes exit=0 a0=1bcb5b0 a1=3e8f612a80 a2=3e8f612a80 a3=0 items=0 ppid=378 pid=1179 auid=4294967295 uid=990 gid=988 euid=990 suid=990 fsuid=990 egid=988 sgid=988 fsgid=988 ses=4294967295 tty=(none) comm=ps exe=/usr/bin/ps subj=system_u:system_r:rabbitmq_beam_t:s0 key=(null)

Hash: ps,rabbitmq_beam_t,rabbitmq_epmd_t,dir,getattr

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.9-301.fc19.x86_64
type:           libreport
Comment 1 Daniel Walsh 2013-07-08 14:51:34 EDT
a50224a24d03f76033f1a65ee5a628782b709447 allows this in git.
Comment 2 Fedora Update System 2013-07-11 04:58:45 EDT
selinux-policy-3.12.1-63.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-63.fc19
Comment 3 Fedora Update System 2013-07-11 22:58:16 EDT
Package selinux-policy-3.12.1-63.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-63.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-12762/selinux-policy-3.12.1-63.fc19
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-07-13 23:39:46 EDT
selinux-policy-3.12.1-63.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Raf Geens 2013-07-16 11:54:26 EDT
I'm still seeing the issue with selinux-policy-3.12.1-63.fc19:

type=AVC msg=audit(1373983035.745:640): avc:  denied  { getattr } for  pid=18732 comm="ps" path="/proc/493" dev="proc" ino=12914 scontext=system_u:system_r:rabbitmq_beam_t:s0 tcontext=system_u:system_r:initrc_t:s0 tclass=dir
Comment 6 Miroslav Grepl 2013-07-22 06:30:08 EDT
What does

# ps -eZ |grep initrc

on your system?
Comment 7 Raf Geens 2013-07-22 14:19:32 EDT
It doesn't return anything.
Comment 8 Raf Geens 2013-07-22 14:34:05 EDT
I picked another entry from the audit log after attemping to start rabbitmq:

type=SYSCALL msg=audit(1374517789.081:24532): arch=c000003e syscall=4 success=no exit=-13 a0=10405c0 a1=7fd6a7f93a80 a2=7fd6a7f93a80 a3=0 items=0 ppid=1969 pid=2018 auid=4294967295 uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 ses=4294967295 tty=(none) comm="ps" exe="/usr/bin/ps" subj=system_u:system_r:rabbitmq_beam_t:s0 key=(null)
type=AVC msg=audit(1374517789.081:24533): avc:  denied  { getattr } for  pid=2018 comm="ps" path="/proc/350" dev="proc" ino=10558 scontext=system_u:system_r:rabbitmq_beam_t:s0 tcontext=system_u:system_r:syslogd_t:s0 tclass=dir
type=SYSCALL msg=audit(1374517789.081:24533): arch=c000003e syscall=4 success=no exit=-13 a0=10405c0 a1=7fd6a7f93a80 a2=7fd6a7f93a80 a3=0 items=0 ppid=1969 pid=2018 auid=4294967295 uid=996 gid=997 euid=996 suid=996 fsuid=996 egid=997 sgid=997 fsgid=997 ses=4294967295 tty=(none) comm="ps" exe="/usr/bin/ps" subj=system_u:system_r:rabbitmq_beam_t:s0 key=(null)

ps -eZ | grep syslogd gives:

system_u:system_r:syslogd_t:s0    270 ?        00:00:00 systemd-journal
system_u:system_r:syslogd_t:s0    350 ?        00:00:00 rsyslogd
Comment 9 Raf Geens 2013-07-22 14:39:08 EDT
Ah, and the log in the previous message is with selinux-policy-3.12.1-65.fc19.
Comment 10 Raf Geens 2013-08-02 15:06:12 EDT
Can this bug be reopened? It's marked as closed but there's nobody in https://admin.fedoraproject.org/updates/FEDORA-2013-12762/selinux-policy-3.12.1-63.fc19 who seems to have tested it. I currently have to disable SELinux to be able to start the distro version of RabbitMQ.
Comment 11 Daniel Walsh 2013-08-05 12:04:44 EDT
What AVC are you currently seeing?
Comment 12 Raf Geens 2013-08-05 15:10:27 EDT
I've retested with selinux-policy-3.12.1-69.fc19 and the ps related denials are gone. It's still not starting though: there are now a bunch of name_bind denials and one name_connect denial. I've filed a new report for that: https://bugzilla.redhat.com/show_bug.cgi?id=993279 .

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