Bug 1015978

Summary: SELinux is preventing /usr/bin/mongod from 'search' accesses on the directory /home.
Product: [Fedora] Fedora Reporter: Moritz Pein <moritz.pein>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:da155e4e9d1c08eae16512925c4b5d51354f615ec12e49cd805d99aed2e3a86f
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 22:26:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Moritz Pein 2013-10-07 07:59:39 UTC
Description of problem:
Just on startup after "yum update", so I don't know what caused the problem or if it can be reproduced. 
SELinux is preventing /usr/bin/mongod from 'search' accesses on the directory /home.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that mongod should be allowed search access on the home directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep mongod /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:mongod_t:s0
Target Context                system_u:object_r:home_root_t:s0
Target Objects                /home [ dir ]
Source                        mongod
Source Path                   /usr/bin/mongod
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           mongo-10gen-server-2.4.6-mongodb_1.x86_64
Target RPM Packages           filesystem-3.1-2.fc18.x86_64
Policy RPM                    selinux-policy-3.11.1-105.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.13-101.fc18.x86_64 #1 SMP Fri
                              Sep 27 20:22:12 UTC 2013 x86_64 x86_64
Alert Count                   4
First Seen                    2013-09-30 10:47:03 CEST
Last Seen                     2013-10-07 09:55:46 CEST
Local ID                      9a988d38-4817-458a-9fac-944537abd9c9

Raw Audit Messages
type=AVC msg=audit(1381132546.345:332): avc:  denied  { search } for  pid=3127 comm="mongod" name="/" dev="sda1" ino=2 scontext=system_u:system_r:mongod_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=dir


type=SYSCALL msg=audit(1381132546.345:332): arch=x86_64 syscall=stat success=no exit=EACCES a0=7f1e10d2c8d8 a1=7fffb53d8230 a2=7fffb53d8230 a3=6d2f676f6c2f6174 items=0 ppid=3126 pid=3127 auid=4294967295 uid=990 gid=987 euid=990 suid=990 fsuid=990 egid=987 sgid=987 fsgid=987 ses=4294967295 tty=(none) comm=mongod exe=/usr/bin/mongod subj=system_u:system_r:mongod_t:s0 key=(null)

Hash: mongod,mongod_t,home_root_t,dir,search

audit2allow

#============= mongod_t ==============
allow mongod_t home_root_t:dir search;

audit2allow -R
require {
	type mongod_t;
}

#============= mongod_t ==============
files_search_home(mongod_t)


Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.10.13-101.fc18.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-10-07 13:51:31 UTC
Any idea why mongod would be searcing /home?

Comment 2 Fedora End Of Life 2013-12-21 14:38:54 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Fedora End Of Life 2014-02-05 22:26:59 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.