Bug 671618

Summary: SELinux is preventing /bin/bash access to a leaked /bin/sh file descriptor.
Product: [Fedora] Fedora Reporter: maurizio <antillon.maurizio>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 13CC: antillon.maurizio, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:b41ea2eb275ebc8f6c133887e9ca4f40642cc6b2cb29d6a4c2d384525f8ac503
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-24 11:32:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description maurizio 2011-01-22 06:00:16 UTC
Summary:

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

Detailed Description:

[SELinux is in permissive mode. 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                sysadm_u:sysadm_r:oddjob_mkhomedir_t:s0-s0:c0.c102
                              3
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.2-4.fc13
Target RPM Packages           bash-4.1.2-4.fc13
Policy RPM                    selinux-policy-3.7.19-69.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.34.7-61.fc13.i686
                              #1 SMP Tue Oct 19 04:42:47 UTC 2010 i686 i686
Alert Count                   4
First Seen                    Thu 20 Jan 2011 10:54:10 PM MST
Last Seen                     Thu 20 Jan 2011 10:54:10 PM MST
Local ID                      1f532d4f-75dd-455c-be41-2985db3673d8
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1295589250.866:26114): avc:  denied  { read } for  pid=2517 comm="sealert" name="sh" dev=dm-0 ino=5782 scontext=sysadm_u:sysadm_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 tcontext=system_u:object_r:bin_t:s0 tclass=lnk_file

node=(removed) type=AVC msg=audit(1295589250.866:26114): avc:  denied  { execute } for  pid=2517 comm="sealert" name="bash" dev=dm-0 ino=30583 scontext=sysadm_u:sysadm_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file

node=(removed) type=AVC msg=audit(1295589250.866:26114): avc:  denied  { read open } for  pid=2517 comm="sealert" name="bash" dev=dm-0 ino=30583 scontext=sysadm_u:sysadm_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file

node=(removed) type=AVC msg=audit(1295589250.866:26114): avc:  denied  { execute_no_trans } for  pid=2517 comm="sealert" path="/bin/bash" dev=dm-0 ino=30583 scontext=sysadm_u:sysadm_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1295589250.866:26114): arch=40000003 syscall=11 success=yes exit=0 a0=25b825 a1=bff1cd4c a2=bff1f9b8 a3=3 items=0 ppid=2371 pid=2517 auid=500 uid=500 gid=493 euid=500 suid=500 fsuid=500 egid=493 sgid=493 fsgid=493 tty=(none) ses=1 comm="sh" exe="/bin/bash" subj=sysadm_u:sysadm_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 key=(null)



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

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

Comment 1 Miroslav Grepl 2011-01-24 11:32:17 UTC

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