Bug 917195 - SELinux is preventing /usr/bin/perl from 'write, open' accesses on the file /tmp/U0mD08rlUx.
Summary: SELinux is preventing /usr/bin/perl from 'write, open' accesses on the file /...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-01 23:41 UTC by Joel Uckelman
Modified: 2013-03-14 03:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-14 03:04:15 UTC
Type: Bug


Attachments (Terms of Use)

Description Joel Uckelman 2013-03-01 23:41:34 UTC
Description of problem:

SELinux is preventing /usr/bin/perl from 'write, open' accesses on the file /tmp/U0mD08rlUx.

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

If you believe that perl should be allowed write open access on the U0mD08rlUx file 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 graph.cgi /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


Additional Information:
Source Context                system_u:system_r:httpd_collectd_script_t:s0
Target Context                system_u:object_r:tmp_t:s0
Target Objects                /tmp/U0mD08rlUx [ file ]
Source                        graph.cgi
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          clio
Source RPM Packages           perl-5.16.2-238.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-81.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     clio
Platform                      Linux clio 3.7.9-205.fc18.x86_64 #1 SMP Sun Feb 24
                              20:10:02 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-03-02 00:38:31 CET
Last Seen                     2013-03-02 00:38:31 CET
Local ID                      24e0e4be-e20c-4dd5-b34b-026446d3b2ae

Raw Audit Messages
type=AVC msg=audit(1362181111.974:2755): avc:  denied  { write open } for  pid=5781 comm="graph.cgi" path="/tmp/U0mD08rlUx" dev="tmpfs" ino=34736 scontext=system_u:system_r:httpd_collectd_script_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file


type=SYSCALL msg=audit(1362181111.974:2755): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff8b55dd30 a1=241 a2=1b6 a3=238 items=0 ppid=2714 pid=5781 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 ses=4294967295 tty=(none) comm=graph.cgi exe=/usr/bin/perl subj=system_u:system_r:httpd_collectd_script_t:s0 key=(null)

Hash: graph.cgi,httpd_collectd_script_t,tmp_t,file,write,open

audit2allow

#============= httpd_collectd_script_t ==============
#!!!! The source type 'httpd_collectd_script_t' can write to a 'file' of the following type:
# httpd_collectd_rw_content_t

allow httpd_collectd_script_t tmp_t:file { write open };

audit2allow -R

#============= httpd_collectd_script_t ==============
#!!!! The source type 'httpd_collectd_script_t' can write to a 'file' of the following type:
# httpd_collectd_rw_content_t

allow httpd_collectd_script_t tmp_t:file { write open };

Version-Release number of selected component (if applicable):

collectd-web-5.2.0-1.fc18.x86_64


How reproducible:

Always.


Steps to Reproduce:
1. Load some graphs via the web interface.

Comment 1 Joel Uckelman 2013-03-01 23:47:13 UTC
It looks like graph.cgi is writing temp files with random names, which audit2allow isn't smart enough to figure out.

Comment 2 Miroslav Grepl 2013-03-04 10:02:35 UTC
I added fixes to selinux-policy-3.11.1-82.fc18.noarch

Comment 3 Fedora Update System 2013-03-04 12:12:08 UTC
selinux-policy-3.11.1-83.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-83.fc18

Comment 4 Fedora Update System 2013-03-04 22:34:54 UTC
Package selinux-policy-3.11.1-83.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-83.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3398/selinux-policy-3.11.1-83.fc18
then log in and leave karma (feedback).

Comment 5 Joel Uckelman 2013-03-05 22:38:57 UTC
I tested selinux-policy-3.11.1-83.fc18. It works for me. Thanks!

Comment 6 Miroslav Grepl 2013-03-07 09:45:10 UTC
Thank you for testing.

Comment 7 Fedora Update System 2013-03-08 16:12:57 UTC
selinux-policy-3.11.1-84.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-84.fc18

Comment 8 Fedora Update System 2013-03-14 03:04:17 UTC
selinux-policy-3.11.1-85.fc18 has been pushed to the Fedora 18 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.