Bug 712623

Summary: SELinux is preventing /bin/bash from 'execute' accesses on the file /sbin/ldconfig.
Product: [Fedora] Fedora Reporter: Marco Guazzone <marco.guazzone>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: big-nikita, dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:7ac983aaf74f8612951b67fd87084f597463f13ea96fbc205daa62806bef514a
Fixed In Version: selinux-policy-3.9.16-30.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-24 03:53:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Marco Guazzone 2011-06-11 20:32:56 UTC
SELinux is preventing /bin/bash from 'execute' accesses on the file /sbin/ldconfig.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that bash should be allowed execute access on the ldconfig 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 sh /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:fail2ban_t:s0
Target Context                system_u:object_r:ldconfig_exec_t:s0
Target Objects                /sbin/ldconfig [ file ]
Source                        sh
Source Path                   /bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.10-2.fc15
Target RPM Packages           glibc-2.14-2
Policy RPM                    selinux-policy-3.9.16-29.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.7-30.fc15.x86_64 #1 SMP Fri
                              May 27 05:15:53 UTC 2011 x86_64 x86_64
Alert Count                   3
First Seen                    Sat 11 Jun 2011 10:13:26 PM CEST
Last Seen                     Sat 11 Jun 2011 10:17:04 PM CEST
Local ID                      241bcaa8-b530-4c43-bf1e-b58a1b73652c

Raw Audit Messages
type=AVC msg=audit(1307823424.944:68): avc:  denied  { execute } for  pid=1855 comm="sh" name="ldconfig" dev=sda5 ino=457708 scontext=system_u:system_r:fail2ban_t:s0 tcontext=system_u:object_r:ldconfig_exec_t:s0 tclass=file


type=SYSCALL msg=audit(1307823424.944:68): arch=x86_64 syscall=execve success=no exit=EACCES a0=25d2980 a1=25d2a50 a2=25d1ab0 a3=0 items=0 ppid=1854 pid=1855 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=sh exe=/bin/bash subj=system_u:system_r:fail2ban_t:s0 key=(null)

Hash: sh,fail2ban_t,ldconfig_exec_t,file,execute

audit2allow

#============= fail2ban_t ==============
allow fail2ban_t ldconfig_exec_t:file execute;

audit2allow -R

#============= fail2ban_t ==============
allow fail2ban_t ldconfig_exec_t:file execute;

Comment 1 Dominick Grift 2011-06-11 20:43:27 UTC
Looks like not all fixes were back ported to f15., mgrepl could this be added as well?

Comment 2 Miroslav Grepl 2011-06-12 16:39:45 UTC
*** Bug 712622 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2011-06-12 16:43:46 UTC
Yes, I will add it. 

Not sure how but I had to overlook a commit in flood of F16 fixes.

Marco,
you can allow it using 

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

Comment 4 Miroslav Grepl 2011-06-13 19:55:54 UTC
Fixed in selinux-policy-3.9.16-30.fc15

Comment 5 Fedora Update System 2011-06-14 10:17:39 UTC
selinux-policy-3.9.16-30.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-30.fc15

Comment 6 Fedora Update System 2011-06-21 17:30:02 UTC
Package selinux-policy-3.9.16-30.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-30.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-30.fc15
then log in and leave karma (feedback).

Comment 7 Marco Guazzone 2011-06-22 08:01:55 UTC
Positive karma left. Thank you very much!

Comment 8 Fedora Update System 2011-06-24 03:51:57 UTC
selinux-policy-3.9.16-30.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Nikita Bige 2011-06-24 09:16:50 UTC
can't reproduce this bug any more. I think it's fixed
Thank you