Bug 650796 - SELinux is preventing /bin/mount "setattr" access on /extra.
Summary: SELinux is preventing /bin/mount "setattr" access on /extra.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:8bcccb00b80...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-08 04:22 UTC by Maciej Żenczykowski
Modified: 2010-11-11 22:17 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.9.7-10.fc14
Clone Of:
Environment:
Last Closed: 2010-11-11 22:17:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Maciej Żenczykowski 2010-11-08 04:22:07 UTC
Summary:

SELinux is preventing /bin/mount "setattr" access on /extra.

Detailed Description:

SELinux denied access requested by mount. It is not expected that this access is
required by mount and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:mount_t:s0-s0:c0.c1023
Target Context                system_u:object_r:default_t:s0
Target Objects                /extra [ dir ]
Source                        mount
Source Path                   /bin/mount
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           util-linux-ng-2.18-4.4.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-7.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.6-48.fc14.x86_64 #1 SMP Fri Oct 22 15:36:08
                              UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Sun 07 Nov 2010 08:02:55 PM PST
Last Seen                     Sun 07 Nov 2010 08:02:55 PM PST
Local ID                      8a4daee9-95f0-42ed-907c-c289911393eb
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1289188975.760:33262): avc:  denied  { setattr } for  pid=3125 comm="mount" name="/" dev=dm-7 ino=2 scontext=system_u:system_r:mount_t:s0-s0:c0.c1023 tcontext=system_u:object_r:default_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1289188975.760:33262): arch=c000003e syscall=280 success=no exit=-13 a0=3 a1=0 a2=7fffffd3b730 a3=0 items=0 ppid=3124 pid=3125 auid=4294967295 uid=25782 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  catchall,mount,mount_t,default_t,dir,setattr
audit2allow suggests:

#============= mount_t ==============
allow mount_t default_t:dir setattr;

Comment 1 Maciej Żenczykowski 2010-11-08 04:28:50 UTC
/extra is a mountpoint for a firewire external drive, ie. /etc/fstab:

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /extra ext4 defaults,acl,user_xattr,barrier=0,user,exec,noauto 1 0

before mount:

$ ls -alZd /extra
drwxr-xr-x. root root system_u:object_r:default_t:s0   /extra

after mount:

$ ls -alZd /extra
drwxrwxrwt. root root system_u:object_r:default_t:s0   /extra

Is there some special settings somewhere that I'm missing (for example a chcon on /extra before or after the mount)?  If so, the error message could use some work.  If not, the policy for mount could use some work.

Comment 2 Daniel Walsh 2010-11-08 21:03:27 UTC
Miroslav can you add

files_setattr_all_mountpoints(mount_t)

Maciej  you can add this for now by executing


# grep avc /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Comment 3 Fedora Admin XMLRPC Client 2010-11-08 21:53:43 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora Admin XMLRPC Client 2010-11-08 21:55:55 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora Admin XMLRPC Client 2010-11-08 21:56:56 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Miroslav Grepl 2010-11-10 08:35:47 UTC
Fixed in selinux-policy-3.9.7-10.fc14

Comment 7 Fedora Update System 2010-11-10 15:55:20 UTC
selinux-policy-3.9.7-10.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-10.fc14

Comment 8 Fedora Update System 2010-11-10 21:49:04 UTC
selinux-policy-3.9.7-10.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-10.fc14

Comment 9 Fedora Update System 2010-11-11 22:16:23 UTC
selinux-policy-3.9.7-10.fc14 has been pushed to the Fedora 14 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.