Bug 947683 - SELinux is preventing /usr/bin/bash from 'execute' accesses on the file ldconfig.
Summary: SELinux is preventing /usr/bin/bash from 'execute' accesses on the file ldcon...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:fcfc0e77d7463c62d59a42609de...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-03 02:00 UTC by Dawid Zamirski
Modified: 2013-04-20 20:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-20 20:07:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dawid Zamirski 2013-04-03 02:00:24 UTC
Description of problem:
SELinux is preventing /usr/bin/bash from 'execute' accesses on the file 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:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:ldconfig_exec_t:s0
Target Objects                ldconfig [ file ]
Source                        sh
Source Path                   /usr/bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.45-1.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-24.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.0-0.rc4.git0.1.fc19.x86_64 #1
                              SMP Mon Mar 25 02:31:02 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-04-02 20:25:44 EDT
Last Seen                     2013-04-02 20:25:44 EDT
Local ID                      59ddf13c-77ff-496a-913c-59dffd08b439

Raw Audit Messages
type=AVC msg=audit(1364948744.904:418): avc:  denied  { execute } for  pid=1236 comm="sh" name="ldconfig" dev="sda3" ino=927900 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:ldconfig_exec_t:s0 tclass=file


type=SYSCALL msg=audit(1364948744.904:418): arch=x86_64 syscall=execve success=no exit=EACCES a0=109c120 a1=109c220 a2=109ab60 a3=7fff72c76c60 items=0 ppid=1234 pid=1236 auid=4294967295 uid=992 gid=990 euid=992 suid=992 fsuid=992 egid=990 sgid=990 fsgid=990 ses=4294967295 tty=(none) comm=sh exe=/usr/bin/bash subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: sh,xdm_t,ldconfig_exec_t,file,execute

audit2allow

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

audit2allow -R
require {
	type xdm_t;
}

#============= xdm_t ==============
libs_exec_ldconfig(xdm_t)


Additional info:
hashmarkername: setroubleshoot
kernel:         3.9.0-0.rc4.git0.1.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-04-08 16:56:52 UTC
6623b717e7a1185d2c54b00420bbb139f1810ebc fixes this in git.  Just allow it although it is not really needed.  These are caused by random scripts in /etc/profile.d directory.

Comment 2 Miroslav Grepl 2013-04-09 08:56:48 UTC
back ported.

Comment 3 Fedora Update System 2013-04-16 11:34:59 UTC
selinux-policy-3.12.1-31.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-31.fc19

Comment 4 Fedora Update System 2013-04-16 16:14:30 UTC
Package selinux-policy-3.12.1-31.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-31.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5812/selinux-policy-3.12.1-31.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-04-20 20:08:00 UTC
selinux-policy-3.12.1-31.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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