Bug 717508

Summary: SELinux is preventing /sbin/ldconfig from read, write access on the file /tmp/ffiwZGB5u (deleted).
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: rawhideCC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:7cb50bdf71508d5641c532272076da498d79184b7134191d74fe40d1c395b434
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-21 17:03:24 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 Adam Williamson 2011-06-29 03:32:57 UTC
SELinux is preventing /sbin/ldconfig from read, write access on the file /tmp/ffiwZGB5u (deleted).

*****  Plugin catchall (50.5 confidence) suggests  ***************************

If you believe that ldconfig should be allowed read write access on the ffiwZGB5u (deleted) 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 ldconfig /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

*****  Plugin leaks (50.5 confidence) suggests  ******************************

If you want to ignore ldconfig trying to read write access the ffiwZGB5u (deleted) file, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /sbin/ldconfig /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:ldconfig_t:s0-s0:c0.c102
                              3
Target Context                unconfined_u:object_r:mock_tmp_t:s0
Target Objects                /tmp/ffiwZGB5u (deleted) [ file ]
Source                        ldconfig
Source Path                   /sbin/ldconfig
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           glibc-2.14-3
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-30.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              3.0-0.rc5.git0.1.fc16.x86_64 #1 SMP Tue Jun 28
                              04:06:31 UTC 2011 x86_64 x86_64
Alert Count                   12
First Seen                    Mon 27 Jun 2011 01:55:20 PM PDT
Last Seen                     Tue 28 Jun 2011 08:32:08 PM PDT
Local ID                      8da4170f-d498-41d0-b8e6-3374280908d1

Raw Audit Messages
type=AVC msg=audit(1309318328.719:118): avc:  denied  { read write } for  pid=2961 comm="ldconfig" path=2F746D702F666669775A47423575202864656C6574656429 dev=dm-1 ino=9434 scontext=unconfined_u:unconfined_r:ldconfig_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:mock_tmp_t:s0 tclass=file


type=SYSCALL msg=audit(1309318328.719:118): arch=x86_64 syscall=execve success=yes exit=0 a0=d3dd50 a1=d3de50 a2=d3cd50 a3=0 items=0 ppid=2960 pid=2961 auid=501 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm=ldconfig exe=/sbin/ldconfig subj=unconfined_u:unconfined_r:ldconfig_t:s0-s0:c0.c1023 key=(null)

Hash: ldconfig,ldconfig_t,mock_tmp_t,file,read,write

audit2allow

#============= ldconfig_t ==============
allow ldconfig_t mock_tmp_t:file { read write };

audit2allow -R

#============= ldconfig_t ==============
allow ldconfig_t mock_tmp_t:file { read write };

Comment 1 Adam Williamson 2011-06-29 03:34:41 UTC
This happens when I try to do a mock build on Rawhide. If I set SELinux to Permissive, I can do a mock build. With it on Enforcing, the build fails, claiming it can't find the .src.rpm.

Comment 2 Adam Williamson 2011-06-29 03:34:54 UTC
severity high as this breaks mock on Rawhide.

Comment 3 Miroslav Grepl 2011-06-29 08:12:00 UTC
so it works with

# grep ldconfig /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

in enforcing mode.