Bug 1125239 - SELinux is preventing /usr/bin/perl from 'accept' accesses on the unix_stream_socket .
Summary: SELinux is preventing /usr/bin/perl from 'accept' accesses on the unix_stream...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:f3c8d36ca2bb1be62a2188947a3...
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-31 11:56 UTC by Tim Hughes
Modified: 2014-08-21 09:46 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-180.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-08-21 09:46:48 UTC
Type: ---

Attachments (Terms of Use)

Description Tim Hughes 2014-07-31 11:56:38 UTC
Description of problem:
yum -y install smpokeping 
systemctl enable smokeping.service
service smokeping start
service httpd start

SELinux is preventing /usr/bin/perl from 'accept' accesses on the unix_stream_socket .

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

If you believe that perl should be allowed accept access on the  unix_stream_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep smokeping.fcgi /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:httpd_smokeping_cgi_script_t:s0
Target Context                system_u:system_r:httpd_t:s0
Target Objects                 [ unix_stream_socket ]
Source                        smokeping.fcgi
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           perl-5.18.2-289.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-177.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.15.6-200.fc20.x86_64 #1 SMP Fri
                              Jul 18 02:36:27 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-07-31 12:48:26 BST
Last Seen                     2014-07-31 12:48:26 BST
Local ID                      ba198cd7-a899-4620-930a-258539e1a400

Raw Audit Messages
type=AVC msg=audit(1406807306.57:2827): avc:  denied  { accept } for  pid=27522 comm="smokeping.fcgi" path="/run/mod_fcgid/27511.0" scontext=system_u:system_r:httpd_smokeping_cgi_script_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=unix_stream_socket

type=SYSCALL msg=audit(1406807306.57:2827): arch=x86_64 syscall=accept success=no exit=EACCES a0=0 a1=7fffc66672e0 a2=7fffc66672d0 a3=7fffc6667070 items=0 ppid=27511 pid=27522 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=smokeping.fcgi exe=/usr/bin/perl subj=system_u:system_r:httpd_smokeping_cgi_script_t:s0 key=(null)

Hash: smokeping.fcgi,httpd_smokeping_cgi_script_t,httpd_t,unix_stream_socket,accept

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.15.6-200.fc20.x86_64
type:           libreport

Potential duplicate: bug 834089

Comment 1 Miroslav Grepl 2014-07-31 13:14:53 UTC
commit 3210275a5c4d90d9a11a92f08a6141fd870ab3ac
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Thu Jul 31 15:12:25 2014 +0200

    Allow smokeping cgi scripts to accept connection on httpd stream socket.

Comment 2 Fedora Update System 2014-08-13 12:09:22 UTC
selinux-policy-3.12.1-180.fc20 has been submitted as an update for Fedora 20.

Comment 3 Fedora Update System 2014-08-16 00:30:43 UTC
Package selinux-policy-3.12.1-180.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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-180.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-08-21 09:46:48 UTC
selinux-policy-3.12.1-180.fc20 has been pushed to the Fedora 20 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.