Bug 789269

Summary: SELinux is preventing /usr/bin/eu-unstrip from 'read' accesses on the file /usr/lib/debug/lib/libkrb5support.so.0.1.debug.
Product: [Fedora] Fedora Reporter: Slawomir Czarko <slawomir.czarko>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:1e55f9ef72fa6b01b4ed8ff980b3cb6b13b45eb07f9c6f9fcb993aff34244062
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-10 14:11:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Slawomir Czarko 2012-02-10 08:52:29 UTC
SELinux is preventing /usr/bin/eu-unstrip from 'read' accesses on the file /usr/lib/debug/lib/libkrb5support.so.0.1.debug.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow eu-unstrip to have read access on the libkrb5support.so.0.1.debug file
Then you need to change the label on /usr/lib/debug/lib/libkrb5support.so.0.1.debug
Do
# semanage fcontext -a -t FILE_TYPE '/usr/lib/debug/lib/libkrb5support.so.0.1.debug'
where FILE_TYPE is one of the following: user_cron_spool_t, rpm_script_tmp_t, system_cronjob_var_lib_t, policykit_var_lib_t, dbusd_etc_t, userdomain, abrt_exec_t, rpm_exec_t, shell_exec_t, ld_so_cache_t, modules_object_t, sosreport_tmp_t, abrt_tmp_t, var_lib_t, configfile, domain, rpm_var_cache_t, abrt_var_cache_t, proc_net_t, abrt_etc_t, rpm_log_t, var_log_t, policykit_reload_t, mta_exec_type, abrt_var_run_t, abrt_var_log_t, rpm_var_lib_t, rpm_var_run_t, net_conf_t, etc_runtime_t, sysctl_crypto_t, abrt_var_run_t, system_dbusd_var_lib_t, anon_inodefs_t, sysctl_kernel_t, httpd_modules_t, sosreport_exec_t, exec_type, abrt_t, lib_t, nsplugin_rw_t, policykit_auth_exec_t, afs_cache_t, abrt_helper_exec_t, fail2ban_var_lib_t, abrt_t, ld_so_t, bin_t, cert_t, tmp_t, usr_t, noxattrfs, prelink_exec_t, fusefs_t, locale_t, nsplugin_home_t, textrel_shlib_t, ld_so_t, nfs_t, proc_t, sysfs_t, root_t. 
Then execute: 
restorecon -v '/usr/lib/debug/lib/libkrb5support.so.0.1.debug'


*****  Plugin catchall (17.1 confidence) suggests  ***************************

If you believe that eu-unstrip should be allowed read access on the libkrb5support.so.0.1.debug 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 eu-unstrip /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:mnt_t:s0
Target Objects                /usr/lib/debug/lib/libkrb5support.so.0.1.debug [
                              file ]
Source                        eu-unstrip
Source Path                   /usr/bin/eu-unstrip
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           elfutils-0.152-1.fc15
Target RPM Packages           krb5-debuginfo-1.9.1-14.fc15
Policy RPM                    selinux-policy-3.9.16-50.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.41.10-3.fc15.i686.PAE #1
                              SMP Mon Jan 23 15:36:55 UTC 2012 i686 i686
Alert Count                   7
First Seen                    Tue 07 Feb 2012 02:54:08 PM CET
Last Seen                     Wed 08 Feb 2012 10:49:58 AM CET
Local ID                      0994fb81-6134-4a27-877f-75d4a4beaf44

Raw Audit Messages
type=AVC msg=audit(1328694598.9:1577): avc:  denied  { read } for  pid=3943 comm="eu-unstrip" name="libkrb5support.so.0.1.debug" dev=sda6 ino=406733 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:mnt_t:s0 tclass=file


type=SYSCALL msg=audit(1328694598.9:1577): arch=i386 syscall=open success=no exit=EACCES a0=87a59c0 a1=8000 a2=0 a3=bffc5e78 items=0 ppid=3942 pid=3943 auid=4294967295 uid=2026 gid=2027 euid=2026 suid=2026 fsuid=2026 egid=2027 sgid=2027 fsgid=2027 tty=(none) ses=4294967295 comm=eu-unstrip exe=/usr/bin/eu-unstrip subj=system_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)

Hash: eu-unstrip,abrt_t,mnt_t,file,read

audit2allow

#============= abrt_t ==============
allow abrt_t mnt_t:file read;

audit2allow -R

#============= abrt_t ==============
allow abrt_t mnt_t:file read;

Comment 1 Daniel Walsh 2012-02-10 14:11:25 UTC
restorecon -R -v /usr/lib/debug

For some reason this directory is mislabled.

Comment 2 Slawomir Czarko 2012-02-10 14:33:38 UTC
(In reply to comment #1)
> restorecon -R -v /usr/lib/debug
> 
> For some reason this directory is mislabled.

there was no output from restorecon

Comment 3 Daniel Walsh 2012-02-10 15:17:28 UTC
ls -lZ /usr/lib/debug/lib/libkrb5support.so.0.1.debug

Comment 4 Slawomir Czarko 2012-02-10 15:34:29 UTC
(In reply to comment #3)
> ls -lZ /usr/lib/debug/lib/libkrb5support.so.0.1.debug

-r--r--r--. root root unconfined_u:object_r:mnt_t:s0   /usr/lib/debug/lib/libkrb5support.so.0.1.debug

Comment 5 Daniel Walsh 2012-02-10 16:08:40 UTC
That is strange.  Did you have some content located in /mnt?

Comment 6 Slawomir Czarko 2012-02-10 16:12:52 UTC
(In reply to comment #5)
> That is strange.  Did you have some content located in /mnt?

yes, one directory mounted via autofs with nfs and two local directories

Comment 7 Daniel Walsh 2012-02-14 20:43:53 UTC
We have another bug that tells abrt to not watch for crashes in /mnt directory since these are not something Fedora or Red Hat ships.