Bug 1259846 - KDC does not return proper client principal for client referrals
KDC does not return proper client principal for client referrals
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: krb5 (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Robbie Harwood
Patrik Kis
Depends On:
  Show dependency treegraph
Reported: 2015-09-03 11:34 EDT by Alexander Bokovoy
Modified: 2015-11-19 00:14 EST (History)
8 users (show)

See Also:
Fixed In Version: krb5-1.13.2-10.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1259844
Last Closed: 2015-11-19 00:14:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Alexander Bokovoy 2015-09-03 11:34:54 EDT
+++ 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 11:35:36 EDT
Created attachment 1069931 [details]
proposed backport patch
Comment 3 Patrik Kis 2015-09-04 04:01:20 EDT
Can you add reproducer please that can be used to verify the bug fix? Thanks.
Comment 4 Alexander Bokovoy 2015-09-04 05:38:34 EDT
Greg has a patch with test cases: https://github.com/greghudson/krb5/commit/573f37ebda20e185929d9a6bf4b884fa322c9512
Comment 5 Patrik Kis 2015-09-04 05:50:07 EDT
(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.

please make sure that the fix includes the test too. Thanks.
Comment 17 errata-xmlrpc 2015-11-19 00:14:36 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.


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