Bug 851658 - SSO: ocsp request from KDC fails in selinux enforce mode, access needs to be allowed by the selinux policy.
Summary: SSO: ocsp request from KDC fails in selinux enforce mode, access needs to be ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy
Version: 5.8
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-24 15:37 UTC by Asha Akkiangady
Modified: 2013-01-08 03:34 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-2.4.6-333.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-08 03:34:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0060 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2013-01-08 08:27:19 UTC

Description Asha Akkiangady 2012-08-24 15:37:31 UTC
Description of problem:
SSO: ocsp request from KDC fails in selinux enforce mode, access needs to be allowed by the selinux policy.

Version-Release number of selected component (if applicable):
selinux-policy-2.4.6-327.el5
nss-tools-3.12.10-8.el5
krb5-server-1.6.1-70.el5

How reproducible:


Steps to Reproduce:
1. KDC is set-up on a RHEL 5.8 machine. Configured for kinit with smart card certificates login. 

kinit with smart card results in error "Client not trusted while getting initial credentials"

/var/log/krb5kdclog has this:
Aug 24 11:32:15 ipaqavmg.idm.lab.bos.redhat.com krb5kdc[32420](info): AS_REQ (12 etypes {18 17 16 23 1 3 2 11 10 15 12 13}) 10.11.231.57: NEEDED_PREAUTH: aakkiang for krbtgt/EXAMPLE.COM, Additional pre-authentication required
Aug 24 11:32:21 ipaqavmg.idm.lab.bos.redhat.com krb5kdc[32420](info): preauth (pkinit-nss) verify failure: Client not trusted
Aug 24 11:32:21 ipaqavmg.idm.lab.bos.redhat.com krb5kdc[32420](info): AS_REQ (12 etypes {18 17 16 23 1 3 2 11 10 15 12 13}) 10.11.231.57: PREAUTH_FAILED: aakkiang for krbtgt/EXAMPLE.COM, Client not trusted


# ausearch -m avc -ts today
----
time->Fri Aug 24 10:37:02 2012
type=SYSCALL msg=audit(1345819022.637:264): arch=c000003e syscall=42 success=no exit=-13 a0=15 a1=7fff8e1b79f0 a2=10 a3=1 items=0 ppid=1 pid=32100 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm="krb5kdc" exe="/usr/kerberos/sbin/krb5kdc" subj=root:system_r:krb5kdc_t:s0 key=(null)
type=AVC msg=audit(1345819022.637:264): avc:  denied  { name_connect } for  pid=32100 comm="krb5kdc" dest=9180 scontext=root:system_r:krb5kdc_t:s0 tcontext=system_u:object_r:pki_ca_port_t:s0 tclass=tcp_socket

KDC is not allowed to contact pki_ca_port_t

With selinux in permissive mode, kinit with smart card is successful and kerberos credentials issued successfully.


Actual results:
kinit with smart card login fails.

Expected results:

kinit with smart card login should be successful.
Additional info:

Comment 1 RHEL Program Management 2012-08-26 17:36:55 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 2 Miroslav Grepl 2012-08-27 11:28:50 UTC
Asha,
so if you execute

# grep krb5kdc /var/log/audit/audit.log |audit2allow -M mypol
# semodule -i mypol.pp
# setenfoce 1

then it works?

Comment 4 Miroslav Grepl 2012-09-06 12:38:32 UTC
Great.

Comment 10 Asha Akkiangady 2012-10-15 14:00:38 UTC
Marking the bug verified.

Comment 16 errata-xmlrpc 2013-01-08 03:34:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0060.html


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