Bug 1256737

Summary: SELinux is preventing pidof from 'getattr' accesses on the directory /proc/<pid>.
Product: [Fedora] Fedora Reporter: redhat
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 23CC: dominick.grift, dwalsh, lvrabec, mgrepl, pj.pandit, plautrba, psimerda, pspacek, pwouters, thozza
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:53b1c6a2a48b7a8c522d62a6c6e75f9316eadf09f551a0b1422a02de350e1e88
Fixed In Version: 3.13.1-146.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-18 18:52:28 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:
Bug Depends On:    
Bug Blocks: 1182488    

Description redhat 2015-08-25 11:11:28 UTC
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 17:18:08 UTC
Is this expected?

Comment 2 Tomáš Hozza 2015-08-28 07:57:00 UTC
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 07:26:14 UTC
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 11:58:35 UTC
commit 48a5464232fe9ff4b06b37fe48bce45e2f9114ec
Author: Lukas Vrabec <lvrabec>
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 09:52:56 UTC
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 18:51:35 UTC
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.