Bug 725209 - SELinux is preventing /usr/bin/perl from 'setattr' accesses on the directory /var/cache/fontconfig.
Summary: SELinux is preventing /usr/bin/perl from 'setattr' accesses on the directory ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:021af142272...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-24 07:47 UTC by Jeff Raber
Modified: 2011-09-06 10:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-06 10:37:42 UTC
Type: ---


Attachments (Terms of Use)

Description Jeff Raber 2011-07-24 07:47:50 UTC
SELinux is preventing /usr/bin/perl from 'setattr' accesses on the directory /var/cache/fontconfig.

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

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

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:fonts_cache_t:s0
Target Objects                /var/cache/fontconfig [ dir ]
Source                        graph.cgi
Source Path                   /usr/bin/perl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           perl-5.12.4-159.fc15
Target RPM Packages           fontconfig-2.8.0-3.fc15
Policy RPM                    selinux-policy-3.9.16-34.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.38.8-35.fc15.x86_64 #1 SMP Wed Jul 6 13:58:54
                              UTC 2011 x86_64 x86_64
Alert Count                   656
First Seen                    Sun 24 Jul 2011 02:11:11 AM CDT
Last Seen                     Sun 24 Jul 2011 02:44:56 AM CDT
Local ID                      e748356b-ef3a-491b-88d9-19cf3815bc0e

Raw Audit Messages
type=AVC msg=audit(1311493496.935:1479): avc:  denied  { setattr } for  pid=32543 comm="graph.cgi" name="fontconfig" dev=dm-0 ino=2759 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:fonts_cache_t:s0 tclass=dir


type=SYSCALL msg=audit(1311493496.935:1479): arch=x86_64 syscall=chmod success=no exit=EACCES a0=1516560 a1=1ed a2=d a3=1 items=0 ppid=30584 pid=32543 auid=4294967295 uid=48 gid=487 euid=48 suid=48 fsuid=48 egid=487 sgid=487 fsgid=487 tty=(none) ses=4294967295 comm=graph.cgi exe=/usr/bin/perl subj=system_u:system_r:httpd_t:s0 key=(null)

Hash: graph.cgi,httpd_t,fonts_cache_t,dir,setattr

audit2allow

#============= httpd_t ==============
allow httpd_t fonts_cache_t:dir setattr;

audit2allow -R

#============= httpd_t ==============
allow httpd_t fonts_cache_t:dir setattr;

Comment 1 Jeff Raber 2011-07-24 07:51:32 UTC
I installed the package 'collectd-web' (some dependencies were installed too).

The alert appeared when I accessed the webpage provided by the package.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Miroslav Grepl 2011-07-25 14:19:43 UTC
It looks like we will need a policy for 'collectd-web'

Comment 3 Daniel Walsh 2011-07-25 15:29:18 UTC
I just wrote a policy for collectd in Rawhide.

Comment 4 Daniel Walsh 2011-07-25 15:29:46 UTC
Totally untested, but enough to start and stop the service.

Comment 5 Miroslav Grepl 2011-08-04 09:23:40 UTC
Backported to selinux-policy-3.9.16-37.fc15


Note You need to log in before you can comment on or make changes to this bug.