Bug 537629 - selinux policy alert - abrt_t denied search to /mnt/windows (fusefs_t)
Summary: selinux policy alert - abrt_t denied search to /mnt/windows (fusefs_t)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-15 09:16 UTC by Bradley
Modified: 2009-11-24 07:49 UTC (History)
2 users (show)

Fixed In Version: 3.6.32-46.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-24 07:49:27 UTC
Type: ---


Attachments (Terms of Use)

Description Bradley 2009-11-15 09:16:56 UTC
Description of problem:

I get the below alert when running a python program from within /mnt/windows.

/mnt/windows is mnt_t, but when mounted it uses ntfs-3g, so everything gets fusefs_t

To reproduce:
1. cd /mnt/windows
2. mkdir foo
3. cd foo
4. echo 'from ctypes import foo' > test.py
5. python test.py

Note - for some reason this only happens the first time I run it after an abrt restart. You may need to |service abrtd restart|

It also doesn't happen all the time (not sure why), but if it doesn't its more likely to happen again after an abrtd restart.

the path accessed is /mnt/windows, even if the working dir is /mnt/windows/foo/bar

Error message:

SELinux is preventing /usr/sbin/abrtd "search" access to /mnt/windows.

Detailed Description:

[abrtd has a permissive type (abrt_t). This access was not denied.]

SELinux denied access requested by abrtd. /mnt/windows may be a mislabeled.
/mnt/windows default SELinux type is mnt_t, but its current type is fusefs_t.
Changing this file back to the default type, may fix your problem.

File contexts can be assigned to a file in the following ways.

  * Files created in a directory receive the file context of the parent
    directory by default.
  * The SELinux policy might override the default label inherited from the
    parent directory by specifying a process running in context A which creates
    a file in a directory labeled B will instead create the file with label C.
    An example of this would be the dhcp client running with the dhclient_t type
    and creating a file in the directory /etc. This file would normally receive
    the etc_t type due to parental inheritance but instead the file is labeled
    with the net_conf_t type because the SELinux policy specifies this.
  * Users can change the file context on a file using tools such as chcon, or
    restorecon.

This file could have been mislabeled either by user error, or if an normally
confined application was run under the wrong domain.

However, this might also indicate a bug in SELinux because the file should not
have been labeled with this type.

If you believe this is a bug, please file a bug report against this package.

Allowing Access:

You can restore the default system context to this file by executing the
restorecon command. restorecon '/mnt/windows', if this file is a directory, you
can recursively restore using restorecon -R '/mnt/windows'.

Fix Command:

/sbin/restorecon '/mnt/windows'

Additional Information:

Source Context                system_u:system_r:abrt_t:s0
Target Context                system_u:object_r:fusefs_t:s0
Target Objects                /mnt/windows [ dir ]
Source                        abrtd
Source Path                   /usr/sbin/abrtd
Port                          <Unknown>
Host                          plum.home
Source RPM Packages           abrt-0.0.11-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                   restorecon
Host Name                     plum.home
Platform                      Linux plum.home 2.6.31.5-127.fc12.x86_64 #1 SMP
                              Sat Nov 7 21:11:14 EST 2009 x86_64 x86_64
Alert Count                   1
First Seen                    Sun 15 Nov 2009 14:02:18 EST
Last Seen                     Sun 15 Nov 2009 14:02:18 EST
Local ID                      99ce5c35-685f-4e25-9741-bb75e459b1b4
Line Numbers                  

Raw Audit Messages            

node=plum.home type=AVC msg=audit(1258254138.842:224): avc:  denied  { search } for  pid=1473 comm="abrtd" name="/" dev=sda1 ino=5 scontext=system_u:system_r:abrt_t:s0 tcontext=system_u:object_r:fusefs_t:s0 tclass=dir

node=plum.home type=SYSCALL msg=audit(1258254138.842:224): arch=c000003e syscall=4 success=yes exit=0 a0=a3db40 a1=7ffff8090dc0 a2=7ffff8090dc0 a3=fffffffffffffff0 items=0 ppid=1 pid=1473 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="abrtd" exe="/usr/sbin/abrtd" subj=system_u:system_r:abrt_t:s0 key=(null)

Version-Release number of selected component (if applicable):

selinux-policy-3.6.32-41.fc12.noarch
abrt-0.0.11-2.fc12.x86_64

Comment 1 Daniel Walsh 2009-11-16 15:43:19 UTC
You can add these rules for now using

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

Fixed in selinux-policy-3.6.32-46.fc12.noarch

Comment 2 Fedora Update System 2009-11-16 19:38:34 UTC
selinux-policy-3.6.32-46.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-46.fc12

Comment 3 Fedora Update System 2009-11-18 14:12:34 UTC
selinux-policy-3.6.32-46.fc12 has been pushed to the Fedora 12 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: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-11672

Comment 4 Fedora Update System 2009-11-24 07:47:30 UTC
selinux-policy-3.6.32-46.fc12 has been pushed to the Fedora 12 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.