Bug 986023 - SELinux prevents glusterfs mount at boot
Summary: SELinux prevents glusterfs mount at boot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-18 19:21 UTC by Michael Cronenworth
Modified: 2013-08-22 00:51 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.12.1-71.fc19
Clone Of:
Environment:
Last Closed: 2013-08-22 00:51:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
AVC messages (740 bytes, application/x-xz)
2013-07-18 19:21 UTC, Michael Cronenworth
no flags Details

Description Michael Cronenworth 2013-07-18 19:21:23 UTC
Created attachment 775472 [details]
AVC messages

Description of problem:
I have two glusterfs mounts in my fstab. Under Fedora 18 they mounted fine at boot. After upgrading to Fedora 19 they are no longer mounted at boot. Mounting them manually works just fine.

I have attached the AVC output from Enforcing. (glusterfs-enforcing.txt)

Setting SELinux to permissive allows the mount points to be mounted at boot. There are additional AVC messages found after boot. (glusterfs-permissive.txt)


Version-Release number of selected component (if applicable):
selinux-policy-3.12.1-63.fc19.noarch
glusterfs-3.4.0-0.9.beta4.fc19.x86_64


How reproducible: Always


Steps to Reproduce:
1. Add a glusterfs mount point to fstab.
2. Reboot.
3. ls /mnt/point (empty)

Actual results: ls /mnt/point returns nothing.


Expected results: ls /mnt/point returns files.


Additional info:
/etc/fstab:
10.0.0.1:/michael            /media/michael	glusterfs   defaults,_netdev    0 0
10.0.0.1:/media              /media/media	glusterfs   defaults,_netdev    0 0

Comment 1 Michael Cronenworth 2013-07-24 07:10:05 UTC
Still broken in selinux-policy-3.12.1-65.fc19.noarch.

Enforcing:
[    8.769934] type=1400 audit(1374649672.856:4): avc:  denied  { module_request } for  pid=1228 comm="glusterfs" kmod="char-major-10-229" scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=system
[    8.775263] type=1400 audit(1374649672.862:5): avc:  denied  { module_request } for  pid=1227 comm="glusterfs" kmod="char-major-10-229" scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=system

Comment 2 Miroslav Grepl 2013-07-24 09:03:58 UTC
#============= glusterd_t ==============

#!!!! This avc is allowed in the current policy
allow glusterd_t kernel_t:system module_request;

Comment 3 Fedora Update System 2013-07-24 14:10:29 UTC
selinux-policy-3.12.1-66.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-66.fc19

Comment 4 Fedora Update System 2013-07-25 00:34:30 UTC
Package selinux-policy-3.12.1-66.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-66.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-13543/selinux-policy-3.12.1-66.fc19
then log in and leave karma (feedback).

Comment 5 Michael Cronenworth 2013-07-25 02:00:42 UTC
Does not fix this issue. New AVC messages.

[    8.846060] fuse init (API version 7.21)
[    8.848492] type=1400 audit(1374717534.942:4): avc:  denied  { mounton } for  pid=1236 comm="glusterfs" path="/media/michael" dev="md0" ino=922299 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:mnt_t:s0 tclass=dir
[    8.850622] type=1400 audit(1374717534.944:5): avc:  denied  { mounton } for  pid=1232 comm="glusterfs" path="/media/media" dev="md0" ino=918192 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:mnt_t:s0 tclass=dir
[    8.853022] type=1400 audit(1374717534.947:6): avc:  denied  { mounton } for  pid=1245 comm="fusermount-glus" path="/media/media" dev="md0" ino=918192 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:mnt_t:s0 tclass=dir
[    8.853024] type=1400 audit(1374717534.947:7): avc:  denied  { mounton } for  pid=1244 comm="fusermount-glus" path="/media/michael" dev="md0" ino=922299 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:mnt_t:s0 tclass=dir
[    8.854095] SELinux: initialized (dev fusectl, type fusectl), uses genfs_contexts
[    8.854794] type=1400 audit(1374717534.948:8): avc:  denied  { net_admin } for  pid=1237 comm="glusterfs" capability=12  scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:system_r:glusterd_t:s0 tclass=capability
[    8.854809] type=1400 audit(1374717534.948:9): avc:  denied  { net_admin } for  pid=1237 comm="glusterfs" capability=12  scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:system_r:glusterd_t:s0 tclass=capability
[    8.854826] type=1400 audit(1374717534.948:10): avc:  denied  { net_admin } for  pid=1237 comm="glusterfs" capability=12  scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:system_r:glusterd_t:s0 tclass=capability
[    8.856638] type=1400 audit(1374717534.950:11): avc:  denied  { net_admin } for  pid=1234 comm="glusterfs" capability=12  scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:system_r:glusterd_t:s0 tclass=capability
[    8.856647] type=1400 audit(1374717534.950:12): avc:  denied  { net_admin } for  pid=1234 comm="glusterfs" capability=12  scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:system_r:glusterd_t:s0 tclass=capability
[    8.856654] type=1400 audit(1374717534.950:13): avc:  denied  { net_admin } for  pid=1234 comm="glusterfs" capability=12  scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:system_r:glusterd_t:s0 tclass=capability

Comment 6 Fedora Update System 2013-07-26 23:05:26 UTC
selinux-policy-3.12.1-66.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Michael Cronenworth 2013-07-27 01:30:41 UTC
Not fixed, per comment 5.

Comment 8 Miroslav Grepl 2013-07-29 11:34:47 UTC
Fixes have been added.

Comment 9 Fedora Update System 2013-08-02 13:28:17 UTC
selinux-policy-3.12.1-69.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-69.fc19

Comment 10 Fedora Update System 2013-08-02 21:54:19 UTC
Package selinux-policy-3.12.1-69.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-69.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-14089/selinux-policy-3.12.1-69.fc19
then log in and leave karma (feedback).

Comment 11 Michael Cronenworth 2013-08-02 23:30:06 UTC
Still broken.

[    8.764460] fuse init (API version 7.21)
[    8.766871] SELinux: initialized (dev fuse, type fuse), uses genfs_contexts
[    8.766900] type=1400 audit(1375486137.855:4): avc:  denied  { mount } for  pid=1234 comm="glusterfs" name="/" dev="fuse" ino=1 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:fusefs_t:s0 tclass=filesystem
[    8.768445] SELinux: initialized (dev fuse, type fuse), uses genfs_contexts
[    8.768459] type=1400 audit(1375486137.857:5): avc:  denied  { mount } for  pid=1238 comm="glusterfs" name="/" dev="fuse" ino=1 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:fusefs_t:s0 tclass=filesystem
[    8.773182] SELinux: initialized (dev fusectl, type fusectl), uses genfs_contexts

Comment 12 Fedora Update System 2013-08-04 22:59:09 UTC
selinux-policy-3.12.1-69.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Michael Cronenworth 2013-08-04 22:59:58 UTC
Not fixed. See comment 11.

Comment 14 Miroslav Grepl 2013-08-05 05:28:04 UTC
These are different. I added fixes.


Author: Miroslav Grepl <mgrepl>
Date:   Mon Aug 5 07:26:57 2013 +0200

    Allow glusterd to mount filesystems

Comment 15 Michael Cronenworth 2013-08-09 00:31:25 UTC
I can confirm that this is finally fixed with selinux-policy-3.12.1-70.fc19. Thanks.

Comment 16 Fedora Update System 2013-08-20 08:25:09 UTC
selinux-policy-3.12.1-71.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-71.fc19

Comment 17 Fedora Update System 2013-08-21 00:14:19 UTC
Package selinux-policy-3.12.1-71.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-71.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15088/selinux-policy-3.12.1-71.fc19
then log in and leave karma (feedback).

Comment 18 Fedora Update System 2013-08-22 00:51:48 UTC
selinux-policy-3.12.1-71.fc19 has been pushed to the Fedora 19 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.