Bug 984465

Summary: SELinux is preventing /usr/sbin/glusterfsd from 'read, write' accesses on the chr_file fuse.
Product: [Fedora] Fedora Reporter: Gowrishankar Rajaiyan <grajaiya>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: barumuga, dominick.grift, dwalsh, grajaiya, joe, jonathansteffan, kkeithle, mgrepl, ndevos, silas, vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.12.1-65.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-20 09:33:51 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: 984460    

Description Gowrishankar Rajaiyan 2013-07-15 10:03:08 UTC
SELinux is preventing /usr/sbin/glusterfsd from 'read, write' accesses on the chr_file fuse.

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

If you believe that glusterfsd should be allowed read write access on the fuse chr_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 glusterfs /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


Additional Information:
Source Context                system_u:system_r:glusterd_t:s0
Target Context                system_u:object_r:fuse_device_t:s0
Target Objects                fuse [ chr_file ]
Source                        glusterfs
Source Path                   /usr/sbin/glusterfsd
Port                          <Unknown>
Host                          <Unknown>
Source RPM Packages           glusterfs-3.4.0-0.8.beta4.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-54.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     dhcp201-146.englab.pnq.redhat.com
Platform                      Linux dhcp201-146.englab.pnq.redhat.com
                              3.9.5-301.fc19.x86_64 #1 SMP Tue Jun 11 19:39:38
                              UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-07-16 01:58:11 IST
Last Seen                     2013-07-16 01:58:11 IST
Local ID                      27545d41-f4f5-405a-8b3f-3ad42f728e5e

Raw Audit Messages
type=AVC msg=audit(1373920091.348:3000): avc:  denied  { read write } for  pid=10497 comm="glusterfs" name="fuse" dev="devtmpfs" ino=11671 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:fuse_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1373920091.348:3000): arch=x86_64 syscall=open success=no exit=EACCES a0=7fe52e5b1f4a a1=2 a2=0 a3=1 items=0 ppid=10477 pid=10497 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=glusterfs exe=/usr/sbin/glusterfsd subj=system_u:system_r:glusterd_t:s0 key=(null)

Hash: glusterfs,glusterd_t,fuse_device_t,chr_file,read,write

Comment 1 Niels de Vos 2013-07-15 15:38:00 UTC
There have been some improvements with the update related to bug 980683, but I do not think that access to /dev/fuse was included there.

/usr/sbin/glusterfs (a symlink to /usr/sbin/glusterfsd) is the client side process that accesses /dev/fuse. This behaviour should indeed be permitted.

Comment 2 Fedora Update System 2013-07-17 11:53:53 UTC
selinux-policy-3.12.1-65.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-65.fc19

Comment 3 Fedora Update System 2013-07-18 06:02:30 UTC
Package selinux-policy-3.12.1-65.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-65.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-13172/selinux-policy-3.12.1-65.fc19
then log in and leave karma (feedback).

Comment 4 Gowrishankar Rajaiyan 2013-07-19 06:37:23 UTC
+1 karma provided. 

Verified using selinux-policy-3.12.1-65.fc19.

Comment 5 Fedora Update System 2013-07-20 09:33:51 UTC
selinux-policy-3.12.1-65.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.