Bug 717508 - SELinux is preventing /sbin/ldconfig from read, write access on the file /tmp/ffiwZGB5u (deleted).
Summary: SELinux is preventing /sbin/ldconfig from read, write access on the file /tmp...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:7cb50bdf715...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-29 03:32 UTC by Adam Williamson
Modified: 2011-11-21 17:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-21 17:03:24 UTC
Type: ---


Attachments (Terms of Use)

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.


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