Bug 580301

Summary: SELinux is preventing /sbin/setfiles access to a leaked tcp_socket file descriptor.
Product: [Fedora] Fedora Reporter: Rich Megginson <rmeggins>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 13CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:a54b77e919ab24d36d1e22c6aa7d74b114d321db17dbe0ee24f1b6139b252368
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-08 12:25:40 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 Rich Megginson 2010-04-07 22:12:46 UTC
Summary:

SELinux is preventing /sbin/setfiles access to a leaked tcp_socket file
descriptor.

Detailed Description:

[restorecon has a permissive type (setfiles_t). This access was not denied.]

SELinux denied access requested by the restorecon command. It looks like this is
either a leaked descriptor or restorecon output was redirected to a file it is
not allowed to access. Leaks usually can be ignored since SELinux is just
closing the leak and reporting the error. The application does not use the
descriptor, so it will run properly. If this is a redirection, you will not get
output in the tcp_socket. You should generate a bugzilla on selinux-policy, and
it will get routed to the appropriate package. You can safely ignore this avc.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385)

Additional Information:

Source Context                unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c102
                              3
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                tcp_socket [ tcp_socket ]
Source                        restorecon
Source Path                   /sbin/setfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           policycoreutils-2.0.82-4.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.17-6.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.1-19.fc13.x86_64 #1 SMP Sat
                              Mar 20 02:14:15 UTC 2010 x86_64 x86_64
Alert Count                   30
First Seen                    Wed 07 Apr 2010 04:53:28 PM MDT
Last Seen                     Wed 07 Apr 2010 04:53:38 PM MDT
Local ID                      eb73cb65-e369-45e3-b6c8-b2f96c494362
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1270680818.857:17061): avc:  denied  { read write } for  pid=3239 comm="restorecon" path="socket:[35052]" dev=sockfs ino=35052 scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=(removed) type=AVC msg=audit(1270680818.857:17061): avc:  denied  { read write } for  pid=3239 comm="restorecon" path="socket:[35062]" dev=sockfs ino=35062 scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=tcp_socket

node=(removed) type=SYSCALL msg=audit(1270680818.857:17061): arch=c000003e syscall=59 success=yes exit=0 a0=7fffbbcd4c26 a1=2f0ee00 a2=2ee1570 a3=7f7d8e19a4c0 items=0 ppid=3195 pid=3239 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="restorecon" exe="/sbin/setfiles" subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  leaks,restorecon,setfiles_t,unconfined_t,tcp_socket,read,write
audit2allow suggests:

#============= setfiles_t ==============
allow setfiles_t unconfined_t:tcp_socket { read write };

Comment 1 Daniel Walsh 2010-04-08 12:25:40 UTC

*** This bug has been marked as a duplicate of bug 580300 ***