Bug 435945 - Can't mount GFS2 from fstab with selinux enabled
Can't mount GFS2 from fstab with selinux enabled
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: GFS (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Robert Peterson
:
: 448600 (view as bug list)
Depends On: 425884
Blocks: 473168
  Show dependency treegraph
 
Reported: 2008-03-04 10:52 EST by David Juran
Modified: 2009-03-27 07:42 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-27 07:42:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Juran 2008-03-04 10:52:23 EST
Description of problem:
Mounting a (non-clustered) GFS2 file system from fstab breaks with
selinux-targeted policy. The following error messages show up in syslog during
system startup:

Mar  4 14:23:34 F8 kernel: GFS2 (built Feb 10 2008 17:05:30) installed
Mar  4 14:23:34 F8 kernel: GFS2: fsid=: Trying to join cluster "lock_nolock", "dm-1"
Mar  4 14:23:34 F8 kernel: audit(1204633414.315:6): avc:  denied  { sys_module }
for  pid=1545 comm="mount.gfs2" capability=16
scontext=system_u:system_r:mount_t:s0 tcontext=system_u:system_r:mount_t:s0
tclass=capability
Mar  4 14:23:34 F8 kernel: GFS2: can't find protocol lock_nolock
Mar  4 14:23:34 F8 kernel: GFS2: fsid=: can't mount proto=lock_nolock,
table=dm-1, hostdata=
Mar  4 14:23:34 F8 kernel: GFS2: fsid=: Trying to join cluster "lock_nolock", "dm-1"
Mar  4 14:23:34 F8 kernel: audit(1204633414.600:7): avc:  denied  { sys_module }
for  pid=1587 comm="mount.gfs2" capability=16
scontext=system_u:system_r:mount_t:s0 tcontext=system_u:system_r:mount_t:s0
tclass=capability
Mar  4 14:23:34 F8 kernel: GFS2: can't find protocol lock_nolock
Mar  4 14:23:34 F8 kernel: GFS2: fsid=: can't mount proto=lock_nolock,
table=dm-1, hostdata=


Version-Release number of selected component (if applicable):
selinux-policy-3.0.8-87.fc8

How reproducible:
Every time

Steps to Reproduce:
1. mkfs -t gfs2 /dev/VolGroup00/LogVol01
2. mkdir /tmp/gfs2
3. echo "/dev/VolGroup00/LogVol01  /tmp/gfs2               gfs2    defaults    
   0 0" >> /etc/fstab
4. reboot and watch it fail
Comment 1 Daniel Walsh 2008-03-04 15:55:35 EST
Mount is allowed to exec modutils, any reason this command is now execing it?

Which module is it loading?  Wouldn't it be better if this happened somewhere
else besides the mount command?  Allowing the mount command to modify sections
of the kernel feels wrong.
Comment 2 David Juran 2008-03-05 07:49:07 EST
In my case I believe it tried to load the lock_nolock kernel module, i.e. the
locking protocol...
Comment 3 Steve Whitehouse 2008-03-05 08:42:35 EST
Yes, it ought to happen automatically. I'll have a look and see if we are not
doing that for some reason.
Comment 4 Steve Whitehouse 2008-03-05 08:49:30 EST
Ah, now I remember what the problem is here. The userland parts of mount.gfs2
need to talk to the lock module before we actually call into the kernel (via the
mount syscall) and thus we have to poke the module to load earlier. I guess this
is really only a problem for lock_dlm but there is no harm in doing both I suppose.

The long term plan is to merge the two lock modules into the main part of GFS2
and the locking interface will become the DLM's interface. That should solve the
problem at that stage.
Comment 5 Steve Whitehouse 2008-05-28 06:21:17 EDT
*** Bug 448600 has been marked as a duplicate of this bug. ***
Comment 6 Steve Whitehouse 2008-07-16 10:09:45 EDT
This is now fixed upstream for lock_nolock. That lock module no longer exists so
we don't need to load it (obviously lock_nolock protocol is still supported, its
just built in now).

Eventually the plan is to do the same thing to lock_dlm as well.
Comment 7 Bug Zapper 2008-11-26 05:00:40 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Steve Whitehouse 2009-03-27 07:42:04 EDT
The issue is now solved by removal of the locking modules in the upstream kernel, so there is no need to load them from the init script.

In 2.6.30

Note You need to log in before you can comment on or make changes to this bug.