Bug 1094077

Summary: SELinux is preventing /usr/bin/grep from using the 'execmem' accesses on a process.
Product: [Fedora] Fedora Reporter: Matthew Garrett <mjg59>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, jpopelka, lvrabec, mgrepl, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:ea56b621e6ae4663a3847103413f9cbd4be663e878ea51644dd33626e0ca9bf6
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-05 09:17:29 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 Matthew Garrett 2014-05-05 01:13:03 UTC
Description of problem:
Attempted to print to a remote CUPS server
SELinux is preventing /usr/bin/grep from using the 'execmem' accesses on a process.

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

If you believe that grep should be allowed execmem access on processes labeled cupsd_t 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 grep /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Objects                 [ process ]
Source                        grep
Source Path                   /usr/bin/grep
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           grep-2.18-1.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-158.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.14.2-200.fc20.x86_64 #1 SMP Mon
                              Apr 28 14:40:57 UTC 2014 x86_64 x86_64
Alert Count                   3
First Seen                    2014-05-03 14:16:34 EDT
Last Seen                     2014-05-04 21:11:45 EDT
Local ID                      aee7862b-7ec2-48fb-9990-bb3fadf0585e

Raw Audit Messages
type=AVC msg=audit(1399252305.118:525): avc:  denied  { execmem } for  pid=9369 comm="grep" scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tclass=process


type=SYSCALL msg=audit(1399252305.118:525): arch=x86_64 syscall=mmap success=no exit=EACCES a0=0 a1=10000 a2=7 a3=22 items=0 ppid=9340 pid=9369 auid=4294967295 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm=grep exe=/usr/bin/grep subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: grep,cupsd_t,cupsd_t,process,execmem

Additional info:
reporter:       libreport-2.2.2
hashmarkername: setroubleshoot
kernel:         3.14.2-200.fc20.x86_64
type:           libreport

Potential duplicate: bug 1079534

Comment 1 Miroslav Grepl 2014-05-05 09:17:29 UTC

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