Bug 844430 - SELinux is preventing /usr/libexec/colord-sane from 'read' accesses on the file interpreter.
SELinux is preventing /usr/libexec/colord-sane from 'read' accesses on the fi...
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: colord (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
abrt_hash:99b59b81c789bec1df43d749a6f...
:
: 879689 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-30 11:24 EDT by Frank Büttner
Modified: 2013-04-24 07:22 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-24 07:22:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Frank Büttner 2012-07-30 11:24:11 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.6-2.fc17.x86_64
time:           Mo 30 Jul 2012 17:21:49 CEST

description:
:SELinux is preventing /usr/libexec/colord-sane from 'read' accesses on the file interpreter.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow colord-sane to have read access on the interpreter file
:Then sie müssen das Label auf interpreter ändern
:Do
:# semanage fcontext -a -t FILE_TYPE 'interpreter'
:wobei FILE_TYPE einer der folgenen Werte ist: noxattrfs, colord_t, locale_t, etc_t, bin_t, cert_t, proc_t, sysfs_t, ifconfig_exec_t, usr_t, user_cron_spool_t, system_cronjob_var_lib_t, samba_var_t, policykit_var_lib_t, cupsd_rw_etc_t, abrt_t, samba_etc_t, ld_so_t, cupsd_etc_t, lib_t, user_tmpfs_t, net_conf_t, cpu_online_t, afs_cache_t, abrt_helper_exec_t, shell_exec_t, colord_tmpfs_t, dbusd_etc_t, userdomain, sysctl_dev_t, textrel_shlib_t, data_home_t, icc_data_home_t, rpm_script_tmp_t, proc_net_t, hplip_etc_t, policykit_reload_t, ld_so_cache_t, colord_exec_t, colord_var_lib_t, etc_t, cert_t, xdm_var_lib_t, udev_var_run_t, machineid_t, net_conf_t, sssd_public_t, abrt_var_run_t, puppet_tmp_t, system_dbusd_var_lib_t, colord_tmp_t, fail2ban_var_lib_t, policykit_auth_exec_t, sysctl_crypto_t, passwd_file_t, krb5_conf_t, zoneminder_tmpfs_t, root_t. 
:Führen Sie danach Folgendes aus: 
:restorecon -v 'interpreter'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If sie denken, dass colord-sane standardmässig erlaubt sein sollte, read Zugriff auf interpreter file zu erhalten.
:Then sie sollten dies als Fehler melden.
:Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
:Do
:zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
:# grep colord-sane /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:colord_t:s0
:Target Context                system_u:object_r:var_lib_t:s0
:Target Objects                interpreter [ file ]
:Source                        colord-sane
:Source Path                   /usr/libexec/colord-sane
:Port                          <Unbekannt>
:Host                          (removed)
:Source RPM Packages           colord-0.1.21-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-140.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.6-2.fc17.x86_64 #1
:                              SMP Thu Jul 19 22:54:16 UTC 2012 x86_64 x86_64
:Alert Count                   4
:First Seen                    So 29 Jul 2012 20:59:04 CEST
:Last Seen                     Mo 30 Jul 2012 17:21:31 CEST
:Local ID                      5d791f98-3cca-4e29-899d-75d7dd84b951
:
:Raw Audit Messages
:type=AVC msg=audit(1343661691.854:89): avc:  denied  { read } for  pid=1424 comm="colord-sane" name="interpreter" dev="dm-1" ino=88736293 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1343661691.854:89): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff603e1560 a1=0 a2=1b6 a3=238 items=0 ppid=1 pid=1424 auid=4294967295 uid=996 gid=995 euid=996 suid=996 fsuid=996 egid=995 sgid=995 fsgid=995 tty=(none) ses=4294967295 comm=colord-sane exe=/usr/libexec/colord-sane subj=system_u:system_r:colord_t:s0 key=(null)
:
:Hash: colord-sane,colord_t,var_lib_t,file,read
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:
Comment 1 Miroslav Grepl 2012-07-30 17:36:45 EDT
I thought we dropped colord-sane?
Comment 2 Richard Hughes 2012-09-09 17:07:32 EDT
(In reply to comment #1)
> I thought we dropped colord-sane?

No, I'm waiting for the new sane-backends so I can just use udev. Hopefully soon.
Comment 3 Miroslav Grepl 2012-09-11 02:33:33 EDT
Frank,
could you execute

# semanage permissive -a colord_t

re-test it and attach your output of

# ausearch -m avc -ts recent

Thank you.
Comment 4 Frank Büttner 2012-09-11 11:32:04 EDT
Here the output:
ausearch -m avc -ts recent
system_r:colord_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file
[root@bart ~]# ausearch -m avc -ts recent
----
time->Tue Sep 11 17:30:23 2012
type=SYSCALL msg=audit(1347377423.292:131): arch=c000003e syscall=2 success=yes exit=8 a0=7fff63d5b390 a1=0 a2=1b6 a3=238 items=0 ppid=1 pid=3231 auid=4294967295 uid=996 gid=995 euid=996 suid=996 fsuid=996 egid=995 sgid=995 fsgid=995 tty=(none) ses=4294967295 comm="colord-sane" exe="/usr/libexec/colord-sane" subj=system_u:system_r:colord_t:s0 key=(null)
type=AVC msg=audit(1347377423.292:131): avc:  denied  { open } for  pid=3231 comm="colord-sane" path="/var/lib/iscan/interpreter" dev="dm-1" ino=88736293 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file
type=AVC msg=audit(1347377423.292:131): avc:  denied  { read } for  pid=3231 comm="colord-sane" name="interpreter" dev="dm-1" ino=88736293 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file
----
time->Tue Sep 11 17:30:23 2012
type=SYSCALL msg=audit(1347377423.292:132): arch=c000003e syscall=5 success=yes exit=0 a0=8 a1=7fff63d5c220 a2=7fff63d5c220 a3=78 items=0 ppid=1 pid=3231 auid=4294967295 uid=996 gid=995 euid=996 suid=996 fsuid=996 egid=995 sgid=995 fsgid=995 tty=(none) ses=4294967295 comm="colord-sane" exe="/usr/libexec/colord-sane" subj=system_u:system_r:colord_t:s0 key=(null)
type=AVC msg=audit(1347377423.292:132): avc:  denied  { getattr } for  pid=3231 comm="colord-sane" path="/var/lib/iscan/interpreter" dev="dm-1" ino=88736293 scontext=system_u:system_r:colord_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file
Comment 5 Robert Kief 2012-11-23 12:12:33 EST
The SELinux error icon appears after a restart.

Package: (null)
OS Release: Fedora release 17 (Beefy Miracle)
Comment 6 Miroslav Grepl 2012-11-23 13:45:36 EST
*** Bug 879689 has been marked as a duplicate of this bug. ***
Comment 7 Daniel Walsh 2012-11-27 06:54:15 EST
On F18 this file should have this label.

matchpathcon /var/lib/iscan/interprete
/var/lib/iscan/interprete	system_u:object_r:cupsd_rw_etc_t:s0


And colord is allowed to read it.

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