Bug 851658 - SSO: ocsp request from KDC fails in selinux enforce mode, access needs to be allowed by the selinux policy.
SSO: ocsp request from KDC fails in selinux enforce mode, access needs to be ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.8
All Linux
medium Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-24 11:37 EDT by Asha Akkiangady
Modified: 2013-01-07 22:34 EST (History)
4 users (show)

See Also:
Fixed In Version: selinux-policy-2.4.6-333.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 22:34:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Asha Akkiangady 2012-08-24 11:37:31 EDT
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@EXAMPLE.COM for krbtgt/EXAMPLE.COM@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@EXAMPLE.COM for krbtgt/EXAMPLE.COM@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 Product and Program Management 2012-08-26 13:36:55 EDT
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 07:28:50 EDT
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 08:38:32 EDT
Great.
Comment 10 Asha Akkiangady 2012-10-15 10:00:38 EDT
Marking the bug verified.
Comment 16 errata-xmlrpc 2013-01-07 22:34:10 EST
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.