Bug 234827 - mlocate should not search in /etc/rhgb/temp
mlocate should not search in /etc/rhgb/temp
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2007-04-02 09:42 EDT by Kim Bisgaard
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version: Current
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-08-22 10:15:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Kim Bisgaard 2007-04-02 09:42:10 EDT
Description of problem:
mlocate should not search in /etc/rhgb/temp or alternatively of mounttype ramfs

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

Actual results:
Apr  2 10:14:27  kim setroubleshoot:      SELinux is preventing
/usr/bin/updatedb (locate_t) "getattr
" to /etc/rhgb/temp (ramfs_t).      For complete SELinux messages. run sealert
-l 8ffbad84-9fde-4e36-9897-5428d49c6f97

Additional info:
# sealert -l 8ffbad84-9fde-4e36-9897-5428d49c6f97
    SELinux is preventing /usr/bin/updatedb (locate_t) "getattr" to
    /etc/rhgb/temp (ramfs_t).

Detailed Description
    SELinux denied access requested by /usr/bin/updatedb. It is not expected
    that this access is required by /usr/bin/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
    Sometimes labeling problems can cause SELinux denials.  You could try to
    restore the default system file context for /etc/rhgb/temp, restorecon -v
    /etc/rhgb/temp If this does not work, there is currently no automatic way to
    allow this access. Instead,  you can generate a local policy module to allow
    this access - see http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385
    Or you can disable SELinux protection altogether. Disabling SELinux
    protection is not recommended. Please file a
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against this package.

Additional Information

Source Context                system_u:system_r:locate_t
Target Context                system_u:object_r:ramfs_t
Target Objects                /etc/rhgb/temp [ dir ]
Affected RPM Packages         mlocate-0.16-1 [application]rhgb-0.17.2-2.fc7
Policy RPM                    selinux-policy-2.5.10-2.fc7
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.catchall_file
Host Name                     kim.alleroedderne.adsl.dk
Platform                      Linux kim.alleroedderne.adsl.dk 2.6.20-1.3038.fc7
                              #1 SMP Sat Mar 31 19:23:43 EDT 2007 x86_64 x86_64
Alert Count                   12
First Seen                    Sun Apr  1 13:43:20 2007
Last Seen                     Mon Apr  2 10:14:38 2007
Local ID                      8ffbad84-9fde-4e36-9897-5428d49c6f97
Line Numbers

Raw Audit Messages

avc: denied { getattr } for comm="updatedb" dev=ramfs egid=0 euid=0
exe="/usr/bin/updatedb" exit=-13 fsgid=0 fsuid=0 gid=0 items=0 name="/"
path="/etc/rhgb/temp" pid=21917 scontext=system_u:system_r:locate_t:s0 sgid=0
subj=system_u:system_r:locate_t:s0 suid=0 tclass=dir
tcontext=system_u:object_r:ramfs_t:s0 tty=(none) uid=0
Comment 1 Miloslav Trmač 2007-04-02 20:45:13 EDT
Thanks for your report.

mlocate needs to at least stat () ramfs mount points to identify the directory
as a mount point.  I wonder why ramfs is treated specially at all...
Comment 2 Daniel Walsh 2007-04-03 09:01:49 EDT
Fixed in selinux-policy-2.5.11-2
Comment 3 Matthew Miller 2007-04-10 12:26:58 EDT
Fedora 7 test bugs should be filed against "devel", not against test1/2/3. This
isn't obvious, I know. Moving this report so it isn't lost.

This is a bulk message -- I apologize if this was actually meant to be targeted
against a different release. If so, please fix or let me know. Thanks.
Comment 4 Daniel Walsh 2007-08-22 10:15:50 EDT
Should be fixed in the current release

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