Bug 749869

Summary: SELinux is preventing /usr/sbin/dmidecode from 'read' accesses on the file /etc/ld.so.cache.
Product: [Fedora] Fedora Reporter: Jared Smith <jsmith.fedora>
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: awilliam, dominick.grift, dwalsh, mgrepl
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:80eea128c2824741181d11a56f63439b5f02c2df2d21803d134185e2c5da303d
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-23 14:40: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:

Description Jared Smith 2011-10-28 18:32:09 UTC
libreport version: 2.0.6
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.0-1.fc16.x86_64
reason:         SELinux is preventing /usr/sbin/dmidecode from 'read' accesses on the file /etc/ld.so.cache.
time:           Fri Oct 28 14:31:56 2011

description:
:SELinux is preventing /usr/sbin/dmidecode from 'read' accesses on the file /etc/ld.so.cache.
:
:*****  Plugin restorecon (94.8 confidence) suggests  *************************
:
:If you want to fix the label. 
:/etc/ld.so.cache default label should be ld_so_cache_t.
:Then you can run restorecon.
:Do
:# /sbin/restorecon -v /etc/ld.so.cache
:
:*****  Plugin catchall_labels (5.21 confidence) suggests  ********************
:
:If you want to allow dmidecode to have read access on the ld.so.cache file
:Then you need to change the label on /etc/ld.so.cache
:Do
:# semanage fcontext -a -t FILE_TYPE '/etc/ld.so.cache'
:where FILE_TYPE is one of the following: dmidecode_exec_t, abrt_var_run_t, dmidecode_t, sysctl_crypto_t, sysfs_t, abrt_t, lib_t, ld_so_t, afs_cache_t, abrt_helper_exec_t, textrel_shlib_t, rpm_script_tmp_t, user_cron_spool_t, ld_so_cache_t. 
:Then execute: 
:restorecon -v '/etc/ld.so.cache'
:
:
:*****  Plugin catchall (1.44 confidence) suggests  ***************************
:
:If you believe that dmidecode should be allowed read access on the ld.so.cache 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 dmidecode /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:dmidecode_t:s0-s0:c0.c1023
:Target Context                unconfined_u:object_r:etc_t:s0
:Target Objects                /etc/ld.so.cache [ file ]
:Source                        dmidecode
:Source Path                   /usr/sbin/dmidecode
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           dmidecode-2.11-4.fc16
:Target RPM Packages           glibc-2.14.90-14
:Policy RPM                    selinux-policy-3.10.0-46.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.1.0-1.fc16.x86_64
:                              #1 SMP Mon Oct 24 12:18:13 UTC 2011 x86_64 x86_64
:Alert Count                   1
:First Seen                    Thu 27 Oct 2011 07:12:17 PM EDT
:Last Seen                     Thu 27 Oct 2011 07:12:17 PM EDT
:Local ID                      ac625e60-aa69-4d0f-9db4-a17ee29cc069
:
:Raw Audit Messages
:type=AVC msg=audit(1319757137.931:70): avc:  denied  { read } for  pid=1377 comm="dmidecode" name="ld.so.cache" dev=dm-0 ino=170299 scontext=system_u:system_r:dmidecode_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1319757137.931:70): arch=x86_64 syscall=open success=no exit=EACCES a0=7f48c30cf14c a1=80000 a2=1 a3=7f48c30cdfb4 items=0 ppid=1277 pid=1377 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=dmidecode exe=/usr/sbin/dmidecode subj=system_u:system_r:dmidecode_t:s0-s0:c0.c1023 key=(null)
:
:Hash: dmidecode,dmidecode_t,etc_t,file,read
:
:audit2allow
:
:#============= dmidecode_t ==============
:allow dmidecode_t etc_t:file read;
:
:audit2allow -R
:
:#============= dmidecode_t ==============
:allow dmidecode_t etc_t:file read;
:

Comment 1 Daniel Walsh 2011-10-28 20:12:16 UTC
Did you read the alert?

restorecon /etc/ld.so.cache

Just like the alert tells you?

I have no idea how this file got mislabeled.

Comment 2 Jared Smith 2011-10-29 15:17:33 UTC
Yes, I could have run restorecon on the file myself, but since this was a test Fedora 16 (TC2, since updated to the latest packages in updates-testing) installation, and I hadn't manually done anything with ld.so.cache, I thought it would be worth reporting. 

I don't have a clue how it got mislabeled either -- might be worth checking on a fresh f16-RC1 install.

Comment 3 Daniel Walsh 2011-10-31 15:52:56 UTC
Adam can you check after a fresh install from livemedia what the label on /etc/ld.so.cache is?

Comment 4 Adam Williamson 2011-10-31 17:05:29 UTC
fresh install from RC2.1 (the silent respin of RC2 lives):

system_u:object_r:ld_so_cache_t:s0 /etc/ld.so.cache



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

Comment 5 Daniel Walsh 2011-10-31 18:13:31 UTC
That looks correct to me.