Bug 625120

Summary: SELinux is preventing /bin/bash from executing /etc/kde/shutdown/gpg-agent-shutdown.sh.
Product: [Fedora] Fedora Reporter: Laurent Rineau <laurent.rineau__fedora>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA 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:c93cc9fa371037877f424bfe17f457588d0e40677d2103b47ad8d98f379603b4
Fixed In Version: selinux-policy-3.7.19-49.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-24 21:13:29 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 Laurent Rineau 2010-08-18 16:08:18 UTC
Summary:

SELinux is preventing /bin/bash from executing
/etc/kde/shutdown/gpg-agent-shutdown.sh.

Detailed Description:

SELinux has denied the startkde from executing
/etc/kde/shutdown/gpg-agent-shutdown.sh. If startkde is supposed to be able to
execute /etc/kde/shutdown/gpg-agent-shutdown.sh, this could be a labeling
problem. Most confined domains are allowed to execute files labeled bin_t. So
you could change the labeling on this file to bin_t and retry the application.
If this startkde is not supposed to execute
/etc/kde/shutdown/gpg-agent-shutdown.sh, this could signal an intrusion attempt.

Allowing Access:

If you want to allow startkde to execute
/etc/kde/shutdown/gpg-agent-shutdown.sh: chcon -t bin_t
'/etc/kde/shutdown/gpg-agent-shutdown.sh' If this fix works, please update the
file context on disk, with the following command: semanage fcontext -a -t bin_t
'/etc/kde/shutdown/gpg-agent-shutdown.sh' Please specify the full path to the
executable, Please file a bug report to make sure this becomes the default
labeling.

Additional Information:

Source Context                xguest_u:xguest_r:xguest_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                /etc/kde/shutdown/gpg-agent-shutdown.sh [ file ]
Source                        startkde
Source Path                   /bin/bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           bash-4.1.7-1.fc13
Target RPM Packages           kde-settings-4.4-16.fc13
Policy RPM                    selinux-policy-3.7.19-47.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   execute
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                   1
First Seen                    Wed 18 Aug 2010 05:39:15 PM CEST
Last Seen                     Wed 18 Aug 2010 05:39:15 PM CEST
Local ID                      3c2e4233-687a-44d0-87e5-67817d368878
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1282145955.475:4372): avc:  denied  { execute } for  pid=1810 comm="startkde" name="gpg-agent-shutdown.sh" dev=dm-0 ino=3232376 scontext=xguest_u:xguest_r:xguest_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1282145955.475:4372): arch=c000003e syscall=21 success=no exit=-13 a0=2725730 a1=1 a2=0 a3=8 items=0 ppid=1760 pid=1810 auid=502 uid=502 gid=503 euid=502 suid=502 fsuid=502 egid=503 sgid=503 fsgid=503 tty=(none) ses=74 comm="startkde" exe="/bin/bash" subj=xguest_u:xguest_r:xguest_t:s0 key=(null)



Hash String generated from  execute,startkde,xguest_t,etc_t,file,execute
audit2allow suggests:

#============= xguest_t ==============
allow xguest_t etc_t:file execute;

Comment 1 Daniel Walsh 2010-08-19 10:40:14 UTC
Miroslav add


/etc/kde/env(/.*)?  gen_context(system_u:object_r:bin_t,s0)
/etc/kde/shutdown(/.*)?  gen_context(system_u:object_r:bin_t,s0)

Comment 2 Miroslav Grepl 2010-08-20 11:57:59 UTC
Fixed in Fixed in selinux-policy-3.7.19-49.fc13.

Comment 3 Fedora Update System 2010-08-20 13:02:23 UTC
selinux-policy-3.7.19-49.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-49.fc13

Comment 4 Fedora Update System 2010-08-21 04:34:05 UTC
selinux-policy-3.7.19-49.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-49.fc13

Comment 5 Fedora Update System 2010-08-24 21:12:54 UTC
selinux-policy-3.7.19-49.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.