Bug 626114 - SELinux is preventing /bin/bash access to a leaked /bin/sh file descriptor.
Summary: SELinux is preventing /bin/bash access to a leaked /bin/sh file descriptor.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:6a3e4879a05...
: 626115 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-22 01:27 UTC by Daniel Stripes
Modified: 2010-08-31 06:39 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.7.19-51.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-31 06:39:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Daniel Stripes 2010-08-22 01:27:06 UTC
Summary:

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

Detailed Description:

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

SELinux denied access requested by the sh command. It looks like this is either
a leaked descriptor or 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 /bin/sh. 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                system_u:system_r:boinc_project_t:s0
Target Context                system_u:object_r:bin_t:s0
Target Objects                /bin/sh [ lnk_file ]
Source                        sh
Source Path                   /bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.1.7-1.fc13
Target RPM Packages           bash-4.1.7-1.fc13
Policy RPM                    selinux-policy-3.7.19-47.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.6-147.2.4.fc13.x86_64
                              #1 SMP Fri Jul 23 17:14:44 UTC 2010 x86_64 x86_64
Alert Count                   4
First Seen                    Sat 21 Aug 2010 09:24:34 PM EDT
Last Seen                     Sat 21 Aug 2010 09:24:34 PM EDT
Local ID                      8eca93ef-9534-410d-940a-3fd92254b8d4
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1282440274.769:47322): avc:  denied  { read } for  pid=11465 comm="unzip_cpufeat" name="sh" dev=dm-4 ino=1054084 scontext=system_u:system_r:boinc_project_t:s0 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file

node=(removed) type=AVC msg=audit(1282440274.769:47322): avc:  denied  { execute } for  pid=11465 comm="unzip_cpufeat" name="bash" dev=dm-4 ino=1049138 scontext=system_u:system_r:boinc_project_t:s0 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file

node=(removed) type=AVC msg=audit(1282440274.769:47322): avc:  denied  { read open } for  pid=11465 comm="unzip_cpufeat" name="bash" dev=dm-4 ino=1049138 scontext=system_u:system_r:boinc_project_t:s0 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file

node=(removed) type=AVC msg=audit(1282440274.769:47322): avc:  denied  { execute_no_trans } for  pid=11465 comm="unzip_cpufeat" path="/bin/bash" dev=dm-4 ino=1049138 scontext=system_u:system_r:boinc_project_t:s0 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1282440274.769:47322): arch=c000003e syscall=59 success=yes exit=0 a0=46fe9b a1=7fffeecf4490 a2=7fffeecf57d0 a3=8 items=0 ppid=11464 pid=11465 auid=4294967295 uid=491 gid=472 euid=491 suid=491 fsuid=491 egid=472 sgid=472 fsgid=472 tty=(none) ses=4294967295 comm="sh" exe="/bin/bash" subj=system_u:system_r:boinc_project_t:s0 key=(null)



Hash String generated from  leaks,sh,boinc_project_t,bin_t,lnk_file,read
audit2allow suggests:

#============= boinc_project_t ==============
allow boinc_project_t bin_t:lnk_file read;
allow boinc_project_t shell_exec_t:file { read execute open execute_no_trans };

Comment 1 Miroslav Grepl 2010-08-22 22:25:27 UTC
*** Bug 626115 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2010-08-24 12:44:21 UTC
Fixed in selinux-policy-3.7.19-50.fc13

Comment 3 Fedora Update System 2010-08-25 15:36:34 UTC
selinux-policy-3.7.19-51.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-51.fc13

Comment 4 Fedora Update System 2010-08-26 00:59:19 UTC
selinux-policy-3.7.19-51.fc13 has been pushed to the Fedora 13 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/selinux-policy-3.7.19-51.fc13

Comment 5 Fedora Update System 2010-08-31 06:38:28 UTC
selinux-policy-3.7.19-51.fc13 has been pushed to the Fedora 13 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.