Bug 1712652

Summary: SELinux is preventing pgrep from 'getattr' accesses on the directory /proc/<pid>.
Product: [Fedora] Fedora Reporter: D. Hugh Redelmeier <hugh>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: dwalsh, hugh, lvrabec, mgrepl, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:6dad7c7aed59e5dce6b23a8f5a95611fed1d5f70184a269d26cc73dc03c7df79;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-22 20:46:30 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 D. Hugh Redelmeier 2019-05-22 04:17:00 UTC
Description of problem:
- Fedora 30, with updates as of yesterday (I think).  Including new selinux policy update
- running spamassassin
- recent selinux policy from Fedora updates fixed an issue that prevented /usr/share/spamassassin/sa-update.cron running [Bug 1705331] 
- I think that this then exposed the current issue.
SELinux is preventing pgrep from 'getattr' accesses on the directory /proc/<pid>.

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

If you believe that pgrep 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:
# ausearch -c 'pgrep' --raw | audit2allow -M my-pgrep
# semodule -X 300 -i my-pgrep.pp

Additional Information:
Source Context                system_u:system_r:spamd_update_t:s0
Target Context                system_u:system_r:kernel_t:s0
Target Objects                /proc/<pid> [ dir ]
Source                        pgrep
Source Path                   pgrep
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.3-37.fc30.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.0.16-300.fc30.x86_64 #1 SMP Tue
                              May 14 19:33:09 UTC 2019 x86_64 x86_64
Alert Count                   228
First Seen                    2019-05-22 00:00:01 EDT
Last Seen                     2019-05-22 00:00:01 EDT
Local ID                      cdac6cde-bc34-483e-803a-f5fdb612df06

Raw Audit Messages
type=AVC msg=audit(1558497601.781:2195): avc:  denied  { getattr } for  pid=25901 comm="pgrep" path="/proc/870" dev="proc" ino=3775545 scontext=system_u:system_r:spamd_update_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=dir permissive=0


Hash: pgrep,spamd_update_t,kernel_t,dir,getattr

Version-Release number of selected component:
selinux-policy-3.14.3-37.fc30.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         5.0.16-300.fc30.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2019-05-22 20:46:30 UTC

*** This bug has been marked as a duplicate of bug 1711799 ***