Bug 1298332

Summary: [1.3.2 - 0.94.5-1.el7cp] cephtest selinux denial for dev="sda1"
Product: Red Hat Ceph Storage Reporter: Vasu Kulkarni <vakulkar>
Component: RBDAssignee: Boris Ranto <branto>
Status: CLOSED NOTABUG QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.3.2CC: ceph-eng-bugs, jdillama
Target Milestone: rc   
Target Release: 1.3.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-14 10:56:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vasu Kulkarni 2016-01-13 19:39:10 UTC
Description of problem:

Following denial for cephtest seen during rbd testing

SELinux denials found on ubuntu.redhat.com: ['type=AVC msg=audit(1452669001.796:15051): avc: denied { search } for pid=2143 comm=72733A6D61696E20513A526567 name="cephtest" dev="sda1" ino=1310802 scontext=system_u:system_r:syslogd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir'] 

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

How reproducible:
Intermittent


Steps to Reproduce:

This is seen intermittently during rbd iozone testing with selinux in permissive mode


Actual results:
http://pulpito.ceph.redhat.com/vasu-2016-01-12_23:52:10-smoke:basic-v0.94.5---basic-clara/210811/

Expected results:


Additional info:
http://magna002.ceph.redhat.com/vasu-2016-01-12_23:52:10-smoke:basic-v0.94.5---basic-clara/210811/remote/clara003/audit/

Comment 3 Boris Ranto 2016-01-14 10:56:35 UTC
This is not a ceph bug but a teuthology one-- teuthology creates files in home directory (syslogd file in this case) so they end up being labelled user_home_t. A process (suslogd) with syslogd_t context cannot access (search -- list directory in this case) files with user_home_t context by default.

AFAICR, there should have already been some changes regarding this in teuthology. However, I'm not sure what version of teuthology was used in this case/whether it contains the patches or not.

In the mean-time closing as NOTABUG. See upstream teuthology bug for details:

http://tracker.ceph.com/issues/12972

FWIW: I can give you some tips so that you can maintain a custom teuthology SELinux policy that would help avoid denials like these that are not dedicated to ceph itself but to the test framework.