Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1259846

Summary: KDC does not return proper client principal for client referrals
Product: Red Hat Enterprise Linux 7 Reporter: Alexander Bokovoy <abokovoy>
Component: krb5Assignee: Robbie Harwood <rharwood>
Status: CLOSED ERRATA QA Contact: Patrik Kis <pkis>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: abokovoy, dpal, extras-qa, nalin, nathaniel, pkis, rcritten, rharwood
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: krb5-1.13.2-10.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1259844 Environment:
Last Closed: 2015-11-19 05:14:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed backport patch none

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