Bug 986385

Summary: SELinux is preventing /usr/sbin/ldconfig from 'read' accesses on the chr_file /dev/urandom.
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:72f953c4daa182e3996a4a12aa31f7b2aa4ff32c1c01e9a239d787b0ed9e76d2
Fixed In Version: selinux-policy-3.12.1-69.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-04 22:59:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kamil Páral 2013-07-19 16:06:19 UTC
Description of problem:
I resumed my computer and this popped up.
SELinux is preventing /usr/sbin/ldconfig from 'read' accesses on the chr_file /dev/urandom.

*****  Plugin catchall_boolean (89.3 confidence) suggests  *******************

If you want to allow global to ssp
Then you must tell SELinux about this by enabling the 'global_ssp' boolean.
You can read 'None' man page for more details.
Do
setsebool -P global_ssp 1

*****  Plugin catchall (11.6 confidence) suggests  ***************************

If you believe that ldconfig should be allowed read access on the urandom chr_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

Additional Information:
Source Context                system_u:system_r:ldconfig_t:s0
Target Context                system_u:object_r:urandom_device_t:s0
Target Objects                /dev/urandom [ chr_file ]
Source                        ldconfig
Source Path                   /usr/sbin/ldconfig
Port                          <Neznámé>
Host                          (removed)
Source RPM Packages           glibc-2.17-11.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-65.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.9-302.fc19.x86_64 #1 SMP Sat
                              Jul 6 13:41:07 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-07-19 18:04:57 CEST
Last Seen                     2013-07-19 18:04:57 CEST
Local ID                      f5f7c181-6c74-4578-a8cb-f293e2b67a3d

Raw Audit Messages
type=AVC msg=audit(1374249897.171:326): avc:  denied  { read } for  pid=8573 comm="ldconfig" path="/dev/urandom" dev="devtmpfs" ino=1033 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1374249897.171:326): arch=x86_64 syscall=execve success=yes exit=0 a0=23d8b10 a1=23d8c10 a2=23d75f0 a3=0 items=0 ppid=8571 pid=8573 auid=4294967295 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=4294967295 tty=(none) comm=ldconfig exe=/usr/sbin/ldconfig subj=system_u:system_r:ldconfig_t:s0 key=(null)

Hash: ldconfig,ldconfig_t,urandom_device_t,chr_file,read

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.9-302.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-07-21 11:02:01 UTC
This is s a leaked file descriptor.  Some tool had an open read fd to /dev/urandom and then executed ldconfig.

Added dontaudit rules for this into git.
c168faac729de9e68f46980b7f978d190c003462

Comment 2 Kamil Páral 2013-07-22 08:21:41 UTC
It seems that it is related to connecting to network. I see it on two different notebooks, after I resume and the network is re-connected, every time.

Comment 3 Daniel Walsh 2013-07-24 22:51:16 UTC
c168faac729de9e68f46980b7f978d190c003462 I just added dontaudit for all device nodes leaked into ldconfig, since this happens too frequently.

Comment 4 Fedora Update System 2013-08-02 13:28:25 UTC
selinux-policy-3.12.1-69.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-69.fc19

Comment 5 Fedora Update System 2013-08-02 21:54:30 UTC
Package selinux-policy-3.12.1-69.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-69.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-14089/selinux-policy-3.12.1-69.fc19
then log in and leave karma (feedback).

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