Bug 548051 - SELinux is preventing /bin/bash access to a leaked unix_stream_socket file descriptor.
Summary: SELinux is preventing /bin/bash access to a leaked unix_stream_socket file de...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:9a913e51871...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-16 13:59 UTC by Patrick
Modified: 2010-01-08 20:08 UTC (History)
2 users (show)

Fixed In Version: 3.6.32-66.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-05 22:58:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Patrick 2009-12-16 13:59:19 UTC
Summary:

SELinux is preventing /bin/bash access to a leaked unix_stream_socket file
descriptor.

Detailed Description:

[sandboxX.sh has a permissive type (sandbox_web_t). This access was not denied.]

SELinux denied access requested by the sandboxX.sh command. It looks like this
is either a leaked descriptor or sandboxX.sh 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 unix_stream_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://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385)

Additional Information:

Source Context                unconfined_u:unconfined_r:sandbox_web_t:s0:c463,c7
                              13
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                unix_stream_socket [ unix_stream_socket ]
Source                        sandboxX.sh
Source Path                   /bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.0.33-1.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-56.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.6-166.fc12.x86_64 #1 SMP Wed
                              Dec 9 10:46:22 EST 2009 x86_64 x86_64
Alert Count                   2
First Seen                    Wed 16 Dec 2009 02:57:57 PM CET
Last Seen                     Wed 16 Dec 2009 02:57:57 PM CET
Local ID                      e39c1101-7af8-4ae1-8f1a-5a7aa9e598ae
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1260971877.86:27): avc:  denied  { read write } for  pid=6483 comm="sandboxX.sh" path="socket:[13687]" dev=sockfs ino=13687 scontext=unconfined_u:unconfined_r:sandbox_web_t:s0:c463,c713 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket

node=(removed) type=AVC msg=audit(1260971877.86:27): avc:  denied  { read write } for  pid=6483 comm="sandboxX.sh" path="socket:[14172]" dev=sockfs ino=14172 scontext=unconfined_u:unconfined_r:sandbox_web_t:s0:c463,c713 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket

node=(removed) type=SYSCALL msg=audit(1260971877.86:27): arch=c000003e syscall=59 success=yes exit=0 a0=7fffb51428c8 a1=7fffb5141ae0 a2=7f4ac9dbd610 a3=7fffb5141610 items=0 ppid=6482 pid=6483 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="sandboxX.sh" exe="/bin/bash" subj=unconfined_u:unconfined_r:sandbox_web_t:s0:c463,c713 key=(null)



Hash String generated from  selinux-policy-3.6.32-56.fc12,leaks,sandboxX.sh,sandbox_web_t,unconfined_t,unix_stream_socket,read,write
audit2allow suggests:
audit2allow is not installed.

Comment 1 Daniel Walsh 2009-12-16 18:31:03 UTC
You can add these rules for now using

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

Fixed in selinux-policy-3.6.32-60.fc12.noarch

Comment 2 Fedora Update System 2009-12-22 21:54:41 UTC
selinux-policy-3.6.32-63.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-63.fc12

Comment 3 Fedora Update System 2010-01-04 21:51:51 UTC
selinux-policy-3.6.32-66.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-66.fc12

Comment 4 Fedora Update System 2010-01-05 22:47:44 UTC
selinux-policy-3.6.32-66.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0184

Comment 5 Fedora Update System 2010-01-05 22:56:22 UTC
selinux-policy-3.6.32-63.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2010-01-08 20:02:34 UTC
selinux-policy-3.6.32-66.fc12 has been pushed to the Fedora 12 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.