Bug 585454 - SELinux prevented mount from mounting on the file or directory "mtab".
SELinux prevented mount from mounting on the file or directory "mtab".
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
12
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:34b3e3da821...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-24 02:37 EDT by sudhir kumar meena
Modified: 2010-04-26 04:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-26 04:37:08 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 sudhir kumar meena 2010-04-24 02:37:01 EDT
Summary:

SELinux prevented mount from mounting on the file or directory "mtab".

Detailed Description:

SELinux prevented mount from mounting a filesystem on the file or directory
"mtab" of type "etc_t". By default SELinux limits the mounting of filesystems to
only some files or directories (those with types that have the mountpoint
attribute). The type "etc_t" does not have this attribute. You can either
relabel the file or directory or set the boolean "allow_mount_anyfile" to true
to allow mounting on any file or directory.

Allowing Access:

Changing the "allow_mount_anyfile" boolean to true will allow this access:
"setsebool -P allow_mount_anyfile=1."

Fix Command:

setsebool -P allow_mount_anyfile=1

Additional Information:

Source Context                system_u:system_r:mount_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:etc_t:s0
Target Objects                mtab [ file ]
Source                        mount.ntfs
Source Path                   /sbin/mount.ntfs-3g
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           util-linux-ng-2.16-10.2.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-41.fc12
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   allow_mount_anyfile
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.5-127.fc12.i686 #1 SMP Sat Nov
                              7 21:41:45 EST 2009 i686 i686
Alert Count                   2
First Seen                    Fri 23 Apr 2010 11:49:59 PM IST
Last Seen                     Fri 23 Apr 2010 11:49:59 PM IST
Local ID                      4b6d8dea-e24e-41a9-b096-7cbc7d6b3c44
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1272046799.915:48): avc:  denied  { write } for  pid=2951 comm="mount" name="mtab" dev=sda9 ino=61 scontext=system_u:system_r:mount_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1272046799.915:48): arch=40000003 syscall=5 success=no exit=-13 a0=4608d4 a1=8042 a2=1a4 a3=466de0 items=0 ppid=2947 pid=2951 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="mount" exe="/bin/mount" subj=system_u:system_r:mount_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-41.fc12,allow_mount_anyfile,mount.ntfs,mount_t,etc_t,file,write
audit2allow suggests:

#============= mount_t ==============
allow mount_t etc_t:file write;
Comment 1 Miroslav Grepl 2010-04-26 04:37:08 EDT
execute

# restorecon -v /etc/mtab

and also please update your system

# yum update


Please reopen if the problem still persists.

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