Bug 811421

Summary: SELinux is preventing /usr/sbin/httpd from 'search' accesses on the directory /var/lib/colord.
Product: [Fedora] Fedora Reporter: Luya Tshimbalanga <luya>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl, promac
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:43123b57cf6303047c58c1c638840c803811cd570fb4da4ea5776f4bcf378122
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-25 08:17:01 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:
Attachments:
Description Flags
avc denial none

Description Luya Tshimbalanga 2012-04-11 01:21:34 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.1-3.fc16.x86_64
reason:         SELinux is preventing /usr/sbin/httpd from 'search' accesses on the directory /var/lib/colord.
time:           Tue 10 Apr 2012 06:21:17 PM PDT

description:
:SELinux is preventing /usr/sbin/httpd from 'search' accesses on the directory /var/lib/colord.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that httpd should be allowed search access on the colord 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 httpd /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:colord_var_lib_t:s0
:Target Objects                /var/lib/colord [ dir ]
:Source                        httpd
:Source Path                   /usr/sbin/httpd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           httpd-2.2.22-2.fc16.x86_64
:Target RPM Packages           colord-0.1.18-2.fc16.x86_64
:Policy RPM                    selinux-policy-3.10.0-80.fc16.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.1-3.fc16.x86_64 #1 SMP
:                              Wed Apr 4 18:08:51 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    Tue 10 Apr 2012 01:32:25 PM PDT
:Last Seen                     Tue 10 Apr 2012 06:13:54 PM PDT
:Local ID                      e21608af-9053-46bf-bcfa-9ed6861647b3
:
:Raw Audit Messages
:type=AVC msg=audit(1334106834.720:409): avc:  denied  { search } for  pid=2209 comm="httpd" name="colord" dev="dm-0" ino=1312176 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:colord_var_lib_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1334106834.720:409): arch=x86_64 syscall=stat success=no exit=EACCES a0=7f11ed045350 a1=7fff26613ea0 a2=7fff26613ea0 a3=0 items=0 ppid=2206 pid=2209 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null)
:
:Hash: httpd,httpd_t,colord_var_lib_t,dir,search
:
:audit2allow
:
:#============= httpd_t ==============
:allow httpd_t colord_var_lib_t:dir search;
:
:audit2allow -R
:
:#============= httpd_t ==============
:allow httpd_t colord_var_lib_t:dir search;
:

Comment 1 Miroslav Grepl 2012-04-11 07:19:36 UTC
Do you have apache files in /var/lib/colord?

Comment 2 Luya Tshimbalanga 2012-04-11 23:39:23 UTC
No according to the result:

$ ls /var/lib/colord/
icc  mapping.db  storage.db

icc folder is empty

Comment 3 Miroslav Grepl 2012-06-22 14:19:24 UTC
Did it happen again?

Comment 4 Luya Tshimbalanga 2012-06-23 17:22:31 UTC
No, I don't see the problem happening since the last update. It seems the issue is fixed.

Comment 5 Miroslav Grepl 2012-06-25 08:17:01 UTC
OK, thank you. Let's close this bug.

Comment 6 Paulo Roma Cavalcanti 2012-11-01 21:34:00 UTC
I am still seeing this bug on F17 64 bits fully updated:

/usr/bin/httpd
Attempted this access: search
On this directory:

saslauthd
/var/lib/chrony
/var/lib/colord
/var/lib/mpd
/etc/openvpn


It has been this way for a long time ...

Comment 7 Daniel Walsh 2012-11-05 19:51:00 UTC
Paulo please attach your current AVCs

rpm -q selinux-policy

Comment 8 Paulo Roma Cavalcanti 2012-11-06 00:17:59 UTC
Created attachment 639005 [details]
avc denial

Comment 9 Paulo Roma Cavalcanti 2012-11-06 00:18:33 UTC
selinux-policy-3.10.0-156.fc17.noarch

Comment 10 Miroslav Grepl 2012-11-06 09:49:35 UTC
Did it all happen if you were running BackupPC?

Comment 11 Paulo Roma Cavalcanti 2012-11-06 13:43:40 UTC

In F17, if I restart backuppc, I have to restart httpd, 
otherwise no backup is shown in backuppc admin page.
Therefore, this happens every time I restart httpd.

Normally, I have backuppc running all the time,
and backing up on an external usb HD. I have
to check if I stop backuppc and restar httpd, 
whether the avc happens or not ...

Comment 12 Paulo Roma Cavalcanti 2012-11-06 20:57:32 UTC
Even with backuppc stopped the denial occurs ...