Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1445226

Summary: selinux policy does not allow execute on fusefs filesystems (like glusterfs)
Product: Red Hat Enterprise Linux 7 Reporter: Humble Chirammal <hchiramm>
Component: container-selinuxAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.3CC: aos-bugs, bchilds, dwalsh, eparis, fkrska, hchiramm, jamills, jhou, jligon, jokerman, jrosenta, lfriedma, lvrabec, madam, mgrepl, misalunk, mmalik, mmccomas, mrobson, plautrba, pprakash, pvrabec, qcai, rcyriac, ssekidde, vwalek, wmeng
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: container-selinux-2.12-1.gite7096ce.el7_3 Doc Type: Bug Fix
Doc Text:
The SELinux boolean to allow containers to use fuse file systems, did not allow them to execute content on a fuse file system. This update will add the allow rules for executing content.
Story Points: ---
Clone Of: 1441216 Environment:
Last Closed: 2017-05-26 14:55:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1441216    

Comment 6 Eric Paris 2017-05-01 14:59:48 UTC
*** Bug 1431907 has been marked as a duplicate of this bug. ***

Comment 20 Daniel Walsh 2017-05-05 14:12:41 UTC
We are moving control of the container domains to container-selinux so we have more flexibility.  This change is fine with me.  We can discuss the ability to mount/umount in a separate discussion.

Comment 32 Miheer Salunke 2017-05-12 01:51:08 UTC
So we installed selinux modules on your Openshift node which helped.


Summary ->

we oc rsh'ed in to jenkins pod

executed the script which gave permission denied 

We checked the audit logs

cat /var/log/audit.log | grep denied
We saw the following

 avc:  denied  { execute } 

# getsebool virt_sandbox_use_fusefs virt_use_fusefs

# grep fusefs /var/log/audit/audit.log | grep execute | audit2allow -M fusefstoexecutetemp

Installing the module  on OpenShift node->

# semodule -i fusefstoexecutetemp.pp

Then again we oc rsh'ed to the jenkins pod and executed the script. 

We saw the audit logs again and we saw ->
avc:  denied  { execute_no_trans }

- Checking and deleting earlier fusefstoexecutetemp

# semodule -l | grep fusefstoexecutetemp

# semodule -d fusefstoexecutetemp

Copy and add the contents to the new file as per the latest avc denial
# cp fusefstoexecutetemp.te fusefstoexecute.te

# Add the following to fusefstoexecute.te
##########################################################################
module fusefstoexecute 1.0;

require {
    type svirt_lxc_net_t;
    type fusefs_t;
    class file { execute execute_no_trans };
}

#============= svirt_lxc_net_t ==============
allow svirt_lxc_net_t fusefs_t:file execute_no_trans;
allow svirt_lxc_net_t fusefs_t:file execute;

###########################################################################

Save the file and run the following.

# checkmodule -M -m -o fusefstoexecute.mod fusefstoexecute.te

# semodule_package -m fusefstoexecute.mod -o fusefstoexecute.pp

Install the module the same way as before.

# semodule -i fusefstoexecute.pp

Again we oc rsh'ed into the pod and then we were able to execute the script.


After the package will be released, told them that they can simply remove the workaround by running (on every node)


# semodule -l | grep fuse
fusefstoexecutetemp     1.0
fusefstoexecute     1.0

# semodule -d fusefstoexecutetemp 
# semodule -d fusefstoexecute

Comment 38 errata-xmlrpc 2017-05-26 14:55:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1331