Bug 902878 - SELinux is preventing /usr/bin/bash from 'execute' accesses on the file ./yum.update.
Summary: SELinux is preventing /usr/bin/bash from 'execute' accesses on the file ./yum...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:4bcd76cfba82945ac2d287692fa...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-22 15:33 UTC by Eric Paris
Modified: 2013-02-08 02:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-08 02:22:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Eric Paris 2013-01-22 15:33:41 UTC
Description of problem:
Executed a script I created in /root
SELinux is preventing /usr/bin/bash from 'execute' accesses on the file ./yum.update.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that bash should be allowed execute access on the yum.update 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 bash /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023
Target Context                staff_u:object_r:admin_home_t:s0
Target Objects                ./yum.update [ file ]
Source                        bash
Source Path                   /usr/bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.2.42-1.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-71.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.8.0-0.rc3.git0.1.fc19.x86_64 #1
                              SMP Thu Jan 10 21:09:08 UTC 2013 x86_64 x86_64
Alert Count                   8
First Seen                    2013-01-22 10:32:29 EST
Last Seen                     2013-01-22 10:32:32 EST
Local ID                      124dbaee-e2b9-4b97-964d-768a195cd2eb

Raw Audit Messages
type=AVC msg=audit(1358868752.1:16171): avc:  denied  { execute } for  pid=2772 comm="bash" name="yum.update" dev="sda4" ino=395676 scontext=staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 tcontext=staff_u:object_r:admin_home_t:s0 tclass=file


type=SYSCALL msg=audit(1358868752.1:16171): arch=x86_64 syscall=access success=no exit=EACCES a0=ec1820 a1=1 a2=7fff3f2eafb0 a3=d items=1 ppid=2768 pid=2772 auid=4166 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=2 tty=pts3 comm=bash exe=/usr/bin/bash subj=staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 key=(null)

type=CWD msg=audit(1358868752.1:16171): cwd=/root

type=PATH msg=audit(1358868752.1:16171): item=0 name=./yum.update inode=395676 dev=08:04 mode=0100755 ouid=0 ogid=0 rdev=00:00 obj=staff_u:object_r:admin_home_t:s0

Hash: bash,sysadm_t,admin_home_t,file,execute

audit2allow

#============= sysadm_t ==============
allow sysadm_t admin_home_t:file execute;

audit2allow -R

#============= sysadm_t ==============
allow sysadm_t admin_home_t:file execute;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.0-0.rc3.git0.1.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-01-22 19:46:09 UTC
Change your useFixed in selinux-policy-3.12.1-6.fc19.noarch

Comment 2 Miroslav Grepl 2013-01-23 08:46:30 UTC
Backported to F18.

commit 4b782390cff44fcbd9ed6089e914e50e093c16ac
Author: Dan Walsh <dwalsh>
Date:   Tue Jan 22 14:45:14 2013 -0500

    Allow sysadm_t to execute content in his homedir

Comment 3 Fedora Update System 2013-01-31 13:16:57 UTC
selinux-policy-3.11.1-74.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-74.fc18

Comment 4 Fedora Update System 2013-02-01 16:37:34 UTC
Package selinux-policy-3.11.1-74.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-74.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1693/selinux-policy-3.11.1-74.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-02-08 02:22:03 UTC
selinux-policy-3.11.1-74.fc18 has been pushed to the Fedora 18 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.