Bug 1004609 - AVC denials when using GSS Proxy from Apache httpd
Summary: AVC denials when using GSS Proxy from Apache httpd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-05 03:20 UTC by Jan Pazdziora
Modified: 2013-09-12 01:54 UTC (History)
1 user (show)

Fixed In Version: selinux-policy-3.12.1-74.2.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-12 01:54:13 UTC
Type: Bug


Attachments (Terms of Use)

Description Jan Pazdziora 2013-09-05 03:20:39 UTC
Description of problem:

When I try to use GSS Proxy from Apache httpd, I get AVC denials

type=AVC msg=audit(1378278187.873:99): avc:  denied  { write } for  pid=1679 comm="httpd" name="default.sock" dev="dm-1" ino=2100982 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:gssproxy_var_lib_t:s0 tclass=sock_file
type=AVC msg=audit(1378278187.873:99): avc:  denied  { connectto } for pid=1679 comm="httpd" path="/var/lib/gssproxy/default.sock" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:gssproxy_t:s0 tclass=unix_stream_socket

and I've also seen

type=AVC msg=audit(1378278175.323:97): avc:  denied  { search } for  pid=1677 comm="httpd" name="gssproxy" dev="dm-1" ino=2100970 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:gssproxy_var_lib_t:s0 tclass=dir

I can see two possibilities -- adding the necessary allows, something like

allow httpd_t gssproxy_t:unix_stream_socket connectto;
allow httpd_t gssproxy_var_lib_t:dir search;
allow httpd_t gssproxy_var_lib_t:sock_file write;

or

gssproxy_read_lib_files(httpd_t)
userdom_unpriv_type(httpd_t)

or having these behind some SELinux boolean.

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

mod_auth_kerb-5.4-24.fc19.x86_64
httpd-2.4.6-2.fc19.x86_64
gssproxy-0.2.3-6.fc19.x86_64
selinux-policy-targeted-3.12.1-73.fc19.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. Set up Apache with GSS Proxy using for example the steps at https://fedorahosted.org/gss-proxy/wiki/Apache
2. kinit to get a valid ticket
3. Do a GET https request.

Actual results:

With enforcing, ISE 500 and some AVC denials.

In permissive, things works but more AVC denials.

Expected results:

Things working in enforcing without AVC denials, potentially with some boolean enabled to allow httpd_t to communicate with the GSS Proxy.

Additional info:

Comment 1 Daniel Walsh 2013-09-05 13:14:17 UTC
7ffcc5696a58ef97a3a32db5b409b38001a5049a fixes this in git.

Comment 2 Miroslav Grepl 2013-09-05 20:58:21 UTC
back ported.

Comment 3 Fedora Update System 2013-09-09 07:55:02 UTC
selinux-policy-3.12.1-74.2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-74.2.fc19

Comment 4 Fedora Update System 2013-09-09 23:57:56 UTC
Package selinux-policy-3.12.1-74.2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-74.2.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-16231/selinux-policy-3.12.1-74.2.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-09-12 01:54:13 UTC
selinux-policy-3.12.1-74.2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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