Bug 729962

Summary: SELinux is preventing /bin/bash from 'execute' accesses on the file /usr/share/virtualbox/VBoxCreateUSBNode.sh.
Product: [Fedora] Fedora Reporter: Milan Kerslager <milan.kerslager>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:38b07253288af0ded628de5710e524e8a077dbb593f1a7bc153b8b272ded8003
Fixed In Version: selinux-policy-3.10.0-18.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-23 20:25:55 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 Milan Kerslager 2011-08-11 12:08:12 UTC
abrt version: 2.0.5
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.0.1-3.fc16.i686.PAE
reason:         SELinux is preventing /bin/bash from 'execute' accesses on the file /usr/share/virtualbox/VBoxCreateUSBNode.sh.
time:           Thu Aug 11 14:07:25 2011

description:
:SELinux is preventing /bin/bash from 'execute' accesses on the file /usr/share/virtualbox/VBoxCreateUSBNode.sh.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow bash to have execute access on the VBoxCreateUSBNode.sh file
:Then you need to change the label on /usr/share/virtualbox/VBoxCreateUSBNode.sh
:Do
:# semanage fcontext -a -t FILE_TYPE '/usr/share/virtualbox/VBoxCreateUSBNode.sh'
:where FILE_TYPE is one of the following: pam_console_exec_t, netutils_exec_t, lib_t, etc_t, ifconfig_exec_t, abrt_helper_exec_t, ld_so_t, devicekit_disk_exec_t, udev_exec_t, usbmuxd_exec_t, cupsd_config_exec_t, textrel_shlib_t, mount_exec_t, dhcpc_exec_t, brctl_exec_t, pcscd_exec_t, udev_helper_exec_t, fusermount_exec_t, fsadm_exec_t, gpsd_exec_t, mdadm_exec_t, bluetooth_exec_t, openct_exec_t, setfiles_exec_t, exec_type, alsa_exec_t, hwclock_exec_t, consoletype_exec_t, vbetool_exec_t, lvm_exec_t, insmod_exec_t. 
:Then execute: 
:restorecon -v '/usr/share/virtualbox/VBoxCreateUSBNode.sh'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If you believe that bash should be allowed execute access on the VBoxCreateUSBNode.sh 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 VBoxCreateUSBNo /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:udev_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:usr_t:s0
:Target Objects                /usr/share/virtualbox/VBoxCreateUSBNode.sh [ file
:                              ]
:Source                        VBoxCreateUSBNo
:Source Path                   /bin/bash
:Port                          <Neznámé>
:Host                          (removed)
:Source RPM Packages           bash-4.2.10-4.fc16
:Target RPM Packages           VirtualBox-4.1-4.1.0_73009_fedora15-1
:Policy RPM                    selinux-policy-3.10.0-15.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.0.1-3.fc16.i686.PAE #1 SMP Mon Aug 8
:                              18:13:53 UTC 2011 i686 i686
:Alert Count                   1
:First Seen                    Čt 11. srpen 2011, 14:05:14 CEST
:Last Seen                     Čt 11. srpen 2011, 14:05:14 CEST
:Local ID                      c538185e-e34f-41d0-ae72-d0040f17cdb7
:
:Raw Audit Messages
:type=AVC msg=audit(1313064314.400:91): avc:  denied  { execute } for  pid=3173 comm="udevd" name="VBoxCreateUSBNode.sh" dev=sda2 ino=413797 scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file
:
:
:type=AVC msg=audit(1313064314.400:91): avc:  denied  { execute_no_trans } for  pid=3173 comm="udevd" path="/usr/share/virtualbox/VBoxCreateUSBNode.sh" dev=sda2 ino=413797 scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1313064314.400:91): arch=i386 syscall=execve success=yes exit=0 a0=bff7fa8c a1=bff7e220 a2=22052ab0 a3=50b060 items=0 ppid=2770 pid=3173 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=VBoxCreateUSBNo exe=/bin/bash subj=system_u:system_r:udev_t:s0-s0:c0.c1023 key=(null)
:
:Hash: VBoxCreateUSBNo,udev_t,usr_t,file,execute
:
:audit2allow
:
:#============= udev_t ==============
:allow udev_t usr_t:file { execute execute_no_trans };
:
:audit2allow -R
:
:#============= udev_t ==============
:allow udev_t usr_t:file { execute execute_no_trans };
:

Comment 1 Miroslav Grepl 2011-08-11 12:20:31 UTC
Try to execute

# chcon -t bin_t /usr/share/virtualbox/VBoxCreateUSBNode.sh


does it work then?

Comment 2 Milan Kerslager 2011-08-11 12:45:09 UTC
Yes. No alerts since then.

I have up-to-date F16 (updates-testing) and VirtualBox-4.1-4.1.0_73009_fedora15-1.i686.

Comment 3 Daniel Walsh 2011-08-11 15:44:12 UTC
Miroslav I think we should just add

files_exec_usr_files(udev_t)

Fixed in selinux-policy-3.10.0-19.fc16

Need to back port this fix to RHEL6.

Comment 4 Fedora Update System 2011-08-11 20:34:58 UTC
selinux-policy-3.10.0-18.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-18.fc16

Comment 5 Fedora Update System 2011-08-12 04:22:20 UTC
Package selinux-policy-3.10.0-18.fc16:
* should fix your issue,
* was pushed to the Fedora 16 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.10.0-18.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-18.fc16
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-08-23 20:25:20 UTC
selinux-policy-3.10.0-18.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.