Bug 587756 - SELinux is preventing /usr/bin/updatedb "read" access on mods-2010.04.30.
Summary: SELinux is preventing /usr/bin/updatedb "read" access on mods-2010.04.30.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:c72af712bb1...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-30 19:27 UTC by brock
Modified: 2010-04-30 20:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-30 19:37:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description brock 2010-04-30 19:27:36 UTC
Summary:

SELinux is preventing /usr/bin/updatedb "read" access on mods-2010.04.30.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by updatedb. It is not expected that this access
is required by updatedb 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:locate_t:s0-s0:c0.c1023
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                mods-2010.04.30 [ dir ]
Source                        updatedb
Source Path                   /usr/bin/updatedb
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           mlocate-0.22.2-2.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-106.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.32.10-90.fc12.x86_64 #1 SMP Tue Mar 23
                              09:47:08 UTC 2010 x86_64 x86_64
Alert Count                   2
First Seen                    Fri 30 Apr 2010 09:45:09 AM PDT
Last Seen                     Fri 30 Apr 2010 09:45:09 AM PDT
Local ID                      7d86a5da-215a-48af-aafe-b1a42a7f0999
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1272645909.598:53): avc:  denied  { read } for  pid=19727 comm="updatedb" name="mods-2010.04.30" dev=dm-0 ino=9699351 scontext=system_u:system_r:locate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir

node=(removed) type=AVC msg=audit(1272645909.598:53): avc:  denied  { open } for  pid=19727 comm="updatedb" name="mods-2010.04.30" dev=dm-0 ino=9699351 scontext=system_u:system_r:locate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1272645909.598:53): arch=c000003e syscall=2 success=yes exit=4294967424 a0=407753 a1=50000 a2=940017 a3=322d70756b636162 items=0 ppid=19714 pid=19727 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="updatedb" exe="/usr/bin/updatedb" subj=system_u:system_r:locate_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,updatedb,locate_t,unlabeled_t,dir,read
audit2allow suggests:

#============= locate_t ==============
allow locate_t unlabeled_t:dir { read open };

Comment 1 brock 2010-04-30 19:34:11 UTC
This error and the following two errors occurred immediately on reboot / login after applying the available updates for fedora 12 on 2010.04.30

The two following SELinux errors are also generated at the same time :

======================

Summary:

SELinux is preventing /usr/bin/updatedb "getattr" access to
/sred_archive/Beta.1.3.0/mods-2010.04.30.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by updatedb.
/sred_archive/Beta.1.3.0/mods-2010.04.30 may be a mislabeled.
/sred_archive/Beta.1.3.0/mods-2010.04.30 default SELinux type is default_t, but
its current type is unlabeled_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 '/sred_archive/Beta.1.3.0/mods-2010.04.30', if
this file is a directory, you can recursively restore using restorecon -R
'/sred_archive/Beta.1.3.0/mods-2010.04.30'.

Fix Command:

/sbin/restorecon '/sred_archive/Beta.1.3.0/mods-2010.04.30'

Additional Information:

Source Context                system_u:system_r:locate_t:s0-s0:c0.c1023
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                /sred_archive/Beta.1.3.0/mods-2010.04.30 [ dir ]
Source                        updatedb
Source Path                   /usr/bin/updatedb
Port                          <Unknown>
Host                          elrond.demo.mmtek.net
Source RPM Packages           mlocate-0.22.2-2.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-106.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   restorecon
Host Name                     elrond.demo.mmtek.net
Platform                      Linux elrond.demo.mmtek.net
                              2.6.32.10-90.fc12.x86_64 #1 SMP Tue Mar 23
                              09:47:08 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Fri 30 Apr 2010 09:45:09 AM PDT
Last Seen                     Fri 30 Apr 2010 09:45:09 AM PDT
Local ID                      f3fa8cf7-1d12-4c90-a9da-642b8f732240
Line Numbers                  

Raw Audit Messages            

node=elrond.demo.mmtek.net type=AVC msg=audit(1272645909.594:51): avc:  denied  { getattr } for  pid=19727 comm="updatedb" path="/sred_archive/Beta.1.3.0/mods-2010.04.30" dev=dm-0 ino=9699351 scontext=system_u:system_r:locate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir

node=elrond.demo.mmtek.net type=SYSCALL msg=audit(1272645909.594:51): arch=c000003e syscall=6 success=yes exit=4294967424 a0=1fbc929 a1=7fffac933770 a2=7fffac933770 a3=322d70756b636162 items=0 ppid=19714 pid=19727 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="updatedb" exe="/usr/bin/updatedb" subj=system_u:system_r:locate_t:s0-s0:c0.c1023 key=(null)

============================


Summary:

SELinux is preventing /usr/bin/updatedb "search" access on mods-2010.04.30.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

SELinux denied access requested by updatedb. It is not expected that this access
is required by updatedb 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:locate_t:s0-s0:c0.c1023
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                mods-2010.04.30 [ dir ]
Source                        updatedb
Source Path                   /usr/bin/updatedb
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           mlocate-0.22.2-2.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-106.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux elrond.demo.mmtek.net
                              2.6.32.10-90.fc12.x86_64 #1 SMP Tue Mar 23
                              09:47:08 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Fri 30 Apr 2010 09:45:09 AM PDT
Last Seen                     Fri 30 Apr 2010 09:45:09 AM PDT
Local ID                      5b2ff34d-03bb-40e5-a371-47e28c0877ca
Line Numbers                  

Raw Audit Messages            

node=elrond.demo.mmtek.net type=AVC msg=audit(1272645909.597:52): avc:  denied  { search } for  pid=19727 comm="updatedb" name="mods-2010.04.30" dev=dm-0 ino=9699351 scontext=system_u:system_r:locate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir

node=elrond.demo.mmtek.net type=SYSCALL msg=audit(1272645909.597:52): arch=c000003e syscall=80 success=yes exit=4294967424 a0=1fbc929 a1=0 a2=7fffac933770 a3=322d70756b636162 items=0 ppid=19714 pid=19727 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="updatedb" exe="/usr/bin/updatedb" subj=system_u:system_r:locate_t:s0-s0:c0.c1023 key=(null)

===================

Comment 2 brock 2010-04-30 19:37:43 UTC
Sorry.
This has to do with user directories, not system directories.
NOT a fedora problem.
No work required.

Comment 3 Daniel Walsh 2010-04-30 20:34:08 UTC
You either need to add labels to /sred_archive/Beta.1.3.0/mods-2010.04.30

Or mount it with a context 

mount -o context="system_u:object_r:default_t:s0"


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