Bug 1256737 - SELinux is preventing pidof from 'getattr' accesses on the directory /proc/<pid>.
SELinux is preventing pidof from 'getattr' accesses on the directory /proc/<p...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
23
x86_64 Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:53b1c6a2a48b7a8c522d62a6c6e...
:
Depends On:
Blocks: Default_Local_DNS_Resolver
  Show dependency treegraph
 
Reported: 2015-08-25 07:11 EDT by redhat
Modified: 2015-09-18 14:52 EDT (History)
10 users (show)

See Also:
Fixed In Version: 3.13.1-146.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-18 14:52:28 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 redhat 2015-08-25 07:11:28 EDT
Description of problem:
SELinux is preventing pidof from 'getattr' accesses on the directory /proc/<pid>.

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

If you believe that pidof 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 pidof /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:dnssec_trigger_t:s0
Target Context                system_u:system_r:sshd_t:s0-s0:c0.c1023
Target Objects                /proc/<pid> [ dir ]
Source                        pidof
Source Path                   pidof
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-141.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.0-0.rc6.git0.2.fc23.x86_64 #1
                              SMP Wed Aug 12 21:39:36 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-08-25 13:08:59 CEST
Last Seen                     2015-08-25 13:08:59 CEST
Local ID                      0869243f-7704-4ffc-807c-0e7d4350b82a

Raw Audit Messages
type=AVC msg=audit(1440500939.68:1815): avc:  denied  { getattr } for  pid=6508 comm="pidof" path="/proc/12190" dev="proc" ino=1187739 scontext=system_u:system_r:dnssec_trigger_t:s0 tcontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tclass=dir permissive=0


Hash: pidof,dnssec_trigger_t,sshd_t,dir,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-141.fc23.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.0-0.rc6.git0.2.fc23.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2015-08-27 13:18:08 EDT
Is this expected?
Comment 2 Tomáš Hozza 2015-08-28 03:57:00 EDT
Yes, it is. Please see Bug #1242578.

Unfortunately since we don't have better way to get NetworkManager's PID, we call 'pidof NetworkManager' and then send signal to it.
Comment 3 Tomáš Hozza 2015-08-31 03:26:14 EDT
increasing severity, since SELinux is blocking basic functionality in dnssec-trigger by not allowing to get PID of NetworkManager
Comment 4 Lukas Vrabec 2015-08-31 07:58:35 EDT
commit 48a5464232fe9ff4b06b37fe48bce45e2f9114ec
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Mon Aug 31 13:44:54 2015 +0200

    Allow dnssec-trigger to exec pidof. BZ(#1256737)
Comment 5 Fedora Update System 2015-09-03 05:52:56 EDT
selinux-policy-3.13.1-146.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update selinux-policy'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14826
Comment 6 Fedora Update System 2015-09-18 14:51:35 EDT
selinux-policy-3.13.1-146.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

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