Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1259846 - KDC does not return proper client principal for client referrals
Summary: KDC does not return proper client principal for client referrals
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: krb5
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Robbie Harwood
QA Contact: Patrik Kis
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-03 15:34 UTC by Alexander Bokovoy
Modified: 2015-11-19 05:14 UTC (History)
8 users (show)

Fixed In Version: krb5-1.13.2-10.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1259844
Environment:
Last Closed: 2015-11-19 05:14:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed backport patch (1.04 KB, patch)
2015-09-03 15:35 UTC, Alexander Bokovoy
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2154 0 normal SHIPPED_LIVE Moderate: krb5 security, bug fix, and enhancement update 2015-11-19 08:16:22 UTC

Description Alexander Bokovoy 2015-09-03 15:34:54 UTC
+++ This bug was initially created as a clone of Bug #1259844 +++

Description of problem:
When working on support for client referrals from trusted domains in FreeIPA I've found a bug in MIT Kerberos KDC that prevents it from returning correct trusted domain realm for client referral.

The reason for this bug is that prepare_error_as_req() uses KDC-specific table error code to check if wrong realm is reported rather than a protocol error code.

The fix upstream that removes need to consider error codes in prepare_error_as_req() is proposed at https://github.com/krb5/krb5/pull/323/

Attached is the minimal backport suggested by Simo that is essentially s/KRB5KDC_ERR_WRONG_REALM/KDC_ERR_WRONG_REALM/ in prepare_error_as_req() to reduce scope of backport.

According to Greg Hudson the bug exists since MIT Kerberos 1.7.

Comment 2 Alexander Bokovoy 2015-09-03 15:35:36 UTC
Created attachment 1069931 [details]
proposed backport patch

Comment 3 Patrik Kis 2015-09-04 08:01:20 UTC
Can you add reproducer please that can be used to verify the bug fix? Thanks.

Comment 4 Alexander Bokovoy 2015-09-04 09:38:34 UTC
Greg has a patch with test cases: https://github.com/greghudson/krb5/commit/573f37ebda20e185929d9a6bf4b884fa322c9512

Comment 5 Patrik Kis 2015-09-04 09:50:07 UTC
(In reply to Alexander Bokovoy from comment #4)
> Greg has a patch with test cases:
> https://github.com/greghudson/krb5/commit/
> 573f37ebda20e185929d9a6bf4b884fa322c9512

Thanks Alexander,
I should have checked that first.

@Robbie,
please make sure that the fix includes the test too. Thanks.

Comment 17 errata-xmlrpc 2015-11-19 05:14:36 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.

https://rhn.redhat.com/errata/RHSA-2015-2154.html


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