Bug 1288133 - dspam tries to read /etc/passwd
Summary: dspam tries to read /etc/passwd
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1286020
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-03 16:01 UTC by Lukas Vrabec
Modified: 2015-12-08 12:56 UTC (History)
8 users (show)

Fixed In Version: selinux-policy-3.13.1-162.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of: 1286020
Environment:
Last Closed: 2015-12-08 12:56:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lukas Vrabec 2015-12-03 16:01:00 UTC
+++ This bug was initially created as a clone of Bug #1286020 +++

Description of problem:
 * AFAICT the dspam web UI works fine, but the AVCs are generated

Version-Release number of selected component (if applicable):
dspam-3.10.2-11.el7.x86_64
dspam-libs-3.10.2-11.el7.x86_64
dspam-web-3.10.2-11.el7.x86_64
httpd-2.4.6-40.el7.x86_64
httpd-manual-2.4.6-40.el7.noarch
httpd-tools-2.4.6-40.el7.x86_64
selinux-policy-3.13.1-60.el7.noarch
selinux-policy-targeted-3.13.1-60.el7.noarch

How reproducible:
 * always

Steps to Reproduce:
1. get a RHEL-7.2 machine (active targeted policy)
2. install httpd, change its configuration so that it listens on port 8009 too
3. install dspam and dspam-web packages
4. htpasswd -c /var/www/dspam-passwd test-user
5. start the httpd service
6. links http://localhost:8009/ and log in as test-user

Actual results:
----
type=PATH msg=audit(11/27/2015 03:49:54.491:567) : item=0 name=/etc/passwd inode=29739 dev=fd:01 mode=file,644 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:passwd_file_t:s0 objtype=NORMAL 
type=CWD msg=audit(11/27/2015 03:49:54.491:567) :  cwd=/var/www/dspam 
type=SYSCALL msg=audit(11/27/2015 03:49:54.491:567) : arch=x86_64 syscall=open success=no exit=-13(Permission denied) a0=0x7f9a90ab2092 a1=O_RDONLY|O_CLOEXEC a2=0x1b6 a3=0x24 items=1 ppid=7817 pid=7818 auid=unset uid=dspam gid=dspam euid=dspam suid=dspam fsuid=dspam egid=mail sgid=mail fsgid=mail tty=(none) ses=unset comm=dspam exe=/usr/bin/dspam subj=system_u:system_r:dspam_script_t:s0 key=(null) 
type=AVC msg=audit(11/27/2015 03:49:54.491:567) : avc:  denied  { read } for  pid=7818 comm=dspam name=passwd dev="dm-1" ino=29739 scontext=system_u:system_r:dspam_script_t:s0 tcontext=system_u:object_r:passwd_file_t:s0 tclass=file 
----

Expected results:
 * no SELinux denials, dontaudit candidate ?

Comment 1 Lukas Vrabec 2015-12-08 12:56:31 UTC
commit 02d1a67fb126b8fc1554267d5a9040a5d5ba285e
Author: Lukas Vrabec <lvrabec>
Date:   Thu Dec 3 17:12:09 2015 +0100

    Allow dspam to read /etc/passwd BZ(1288133)


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