Bug 328701

Summary: SELinux, Mailman socket denials
Product: [Fedora] Fedora Reporter: Anthony Messina <amessina>
Component: mailmanAssignee: Tomas Smetana <tsmetana>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: dwalsh, jorton, triage
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-17 02:39:02 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 Anthony Messina 2007-10-11 23:15:01 UTC
Description of problem:
Using selinux-policy-targeted-2.6.4-26.fc7 in permissive mode, I get a number 
of socket denials from Mailman.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-2.6.4-26.fc7
mailman-2.1.9-5
httpd-2.2.6-1.fc7

How reproducible:
Difficult to determine.  It appears I think, when I make changes to a list 
using the web interface.

Actual results:
avc: denied { read, write } for comm="listinfo" dev=sockfs egid=41 euid=48 
exe="/usr/lib/mailman/cgi-bin/listinfo" exit=0 fsgid=41 fsuid=48 gid=48 
items=0 name="" path="socket:[465972]" pid=28912 
scontext=system_u:system_r:mailman_cgi_t:s0 sgid=41 
subj=system_u:system_r:mailman_cgi_t:s0 suid=48 tclass=unix_stream_socket 
tcontext=system_u:system_r:httpd_t:s0 tty=(none) uid=48

avc: denied { read, write } for comm="admin" dev=sockfs egid=41 euid=48 
exe="/usr/lib/mailman/cgi-bin/admin" exit=0 fsgid=41 fsuid=48 gid=48 items=0 
name="" path="socket:[563308]" pid=32584 
scontext=system_u:system_r:mailman_cgi_t:s0 sgid=41 
subj=system_u:system_r:mailman_cgi_t:s0 suid=48 tclass=unix_stream_socket 
tcontext=system_u:system_r:httpd_t:s0 tty=(none) uid=48

avc: denied { read, write } for comm="listinfo" dev=sockfs egid=41 euid=48 
exe="/usr/lib/mailman/cgi-bin/listinfo" exit=0 fsgid=41 fsuid=48 gid=48 
items=0 name="" path="socket:[563323]" pid=4394 
scontext=system_u:system_r:mailman_cgi_t:s0 sgid=41 
subj=system_u:system_r:mailman_cgi_t:s0 suid=48 tclass=unix_stream_socket 
tcontext=system_u:system_r:httpd_t:s0 tty=(none) uid=48

avc: denied { read, write } for comm="private" dev=sockfs egid=41 euid=48 
exe="/usr/lib/mailman/cgi-bin/private" exit=0 fsgid=41 fsuid=48 gid=48 items=0 
name="" path="socket:[391607]" pid=4745 
scontext=system_u:system_r:mailman_cgi_t:s0 sgid=41 
subj=system_u:system_r:mailman_cgi_t:s0 suid=48 tclass=unix_stream_socket 
tcontext=system_u:system_r:httpd_t:s0 tty=(none) uid=48

avc: denied { read, write } for comm="create" dev=sockfs egid=41 euid=48 
exe="/usr/lib/mailman/cgi-bin/create" exit=0 fsgid=41 fsuid=48 gid=48 items=0 
name="" path="socket:[565273]" pid=25608 
scontext=system_u:system_r:mailman_cgi_t:s0 sgid=41 
subj=system_u:system_r:mailman_cgi_t:s0 suid=48 tclass=unix_stream_socket 
tcontext=system_u:system_r:httpd_t:s0 tty=(none) uid=48

Additional info:
Userid 48 is apache on this system.

Comment 1 Daniel Walsh 2007-10-12 13:24:49 UTC
If you put the machine in enforcing mode, does mailman continue to work?

Comment 2 Daniel Walsh 2007-10-12 13:27:01 UTC
I will dontaudit this in selinux-policy-targeted-2.6.4-49.fc7
if it works.

Comment 3 Anthony Messina 2007-10-12 13:44:26 UTC
Yes, it seems to work just fine in enforcing mode using 
selinux-policy-targeted-2.6.4-26.fc7.  I'm not sure what it was trying to do 
in the first place, especially since it was called by the apache user (#48).

Comment 4 Daniel Walsh 2007-10-12 13:55:12 UTC
Could be a leaked file descriptor.

Policy currently has a interface to dontaudit this and none to allow, which
seems to mean no one needs it.

So I will dontaudit this in the next release and I am reassign this to httpd to
have them look for a leaked file descriptor, or tell if this is the correct
behaviour.



Comment 5 Anthony Messina 2007-10-12 16:47:02 UTC
OK, in permissive mode, this occurs whenever /mailman/listinfo is called using 
the webserver, i.e. http://example.com/mailman/listinfo

avc: denied { read, write } for comm="listinfo" dev=sockfs egid=41 euid=48 
exe="/usr/lib/mailman/cgi-bin/listinfo" exit=0 fsgid=41 fsuid=48 gid=48 
items=0 name="" path="socket:[630337]" pid=10916 
scontext=system_u:system_r:mailman_cgi_t:s0 sgid=41 
subj=system_u:system_r:mailman_cgi_t:s0 suid=48 tclass=unix_stream_socket 
tcontext=system_u:system_r:httpd_t:s0 tty=(none) uid=48

Comment 6 Joe Orton 2008-01-24 15:47:12 UTC
Dan, there is really no point in just assigning these to me in the hope that I
will magically diagnose a leaked fd in httpd based on no evidence.  These issues
needs debugging from the perspective of the CGI script in question.

Comment 7 Daniel Walsh 2008-01-24 18:31:10 UTC
Yes you are right.  Sorry.

Comment 8 Tomas Smetana 2008-01-30 11:28:03 UTC
I can't reproduce the problem.  I looks to be similar to the bug #338091 though...

Comment 9 Bug Zapper 2008-05-14 14:43:25 UTC
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. 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 '7'.

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 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 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 please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

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. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Bug Zapper 2008-06-17 02:39:01 UTC
Fedora 7 changed to end-of-life (EOL) status on June 13, 2008. 
Fedora 7 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.

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