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 951965

Summary: PAC is not recognized in krb5 1.10 KDC at TGS-REQ from krb5-1.11 client
Product: Red Hat Enterprise Linux 6 Reporter: Sumit Bose <sbose>
Component: krb5Assignee: Nalin Dahyabhai <nalin>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: abokovoy, dpal, ebenes, ekeck, jplans, ksrot, mkosek, nalin, nathaniel, nsoman, pkis, sbose, snagar
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: krb5-1.10.3-14.el6 Doc Type: Bug Fix
Doc Text:
* When processing client requests transmitted to it using the flexible authentication secure tunneling (FAST) facility, the KDC would lose track of the type of the request that the client supplied, potentially causing it to fail to include authorization data in the ticket it would later issue in response to the request. In some environments, this would result in authorization to resources being incorrectly denied. This update sets the msg_type option when decoding FAST requests, and access control no longer fails in the described scenario.
Story Points: ---
Clone Of: 951964 Environment:
Last Closed: 2013-11-14 10:48:18 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:
Bug Depends On: 951843, 951964    
Bug Blocks: 1002179    

Description Sumit Bose 2013-04-14 21:09:33 UTC
+++ This bug was initially created as a clone of Bug #951964 +++

The same server side issue can be found when a 1.11 client talks to a 1.10 KDC.

+++ This bug was initially created as a clone of Bug #951843 +++

Description of problem:

FAST request processing in krb5 1.11.1 drops message type to 0 which leads to not recognizing PAC in TGT and not attaching PAC to the issued service tickets during TGS-REQ processing.

As result, FreeIPA cross-realm trusts with Active Directory stopped working when AD user tries to log in via ssh from one of IPA-controlled machines, since SSSD cannot pull list of AD user's SIDs out of PAC in the ticket and map them to secondary groups. Additionally, Samba is unable to see PAC and resorts to local identity provider (SSSD) which leads to not recognizing user's groups and failing access control.

There is a one-line fix provided by Greg Hudson here: https://github.com/greghudson/krb5/commit/3fbdcd0965180b46c545187e7784350340ae88ee

Unfortunately, the fix didn't make to 1.11.2 so the patch has to be applied on top of currently existing updates.

Comment 7 Patrik Kis 2013-07-22 12:40:33 UTC
Hi Sumit, Nalin,

any thoughts how to reproduce this easily? Can it be done without AD just with a MIT kdc?
There is a possibility to test against AD, but the proffered way is without it.

Thanks,
Patrik

Comment 8 Patrik Kis 2013-07-25 07:27:09 UTC
Hi Sumit,

Could you please give more detail about the issue reproduction?
Do we really need to have IPA and AD or is there a simpler way?

Thanks,
Patrik

Comment 9 Alexander Bokovoy 2013-07-25 07:34:19 UTC
Yes, you need IPA to reproduce the issue because default MIT KDC driver does not deal with MS-PAC.

Comment 10 Patrik Kis 2013-07-25 09:34:26 UTC
(In reply to Alexander Bokovoy from comment #9)
> Yes, you need IPA to reproduce the issue because default MIT KDC driver does
> not deal with MS-PAC.

I'm confused, doesn't IPA use mit kdc?

Comment 11 Alexander Bokovoy 2013-07-25 10:09:42 UTC
Yes, and it uses its own database backend which implements MS-PAC handling. MIT KDC has pluggable database backends.

Comment 12 Patrik Kis 2013-07-25 12:55:12 UTC
(In reply to Alexander Bokovoy from comment #11)
> Yes, and it uses its own database backend which implements MS-PAC handling.
> MIT KDC has pluggable database backends.

I see. And could you describe the reproduction scenario in more details, please? From the original description it is not clear to me what and how to configure to see the error. Thanks you in advance.

Comment 13 Alexander Bokovoy 2013-07-25 13:23:00 UTC
I think the easiest way would be for you to work with Martin (added to CC:) who can provide you a pre-built IPA environment with trust to AD.

Once environment is there, all you need to do is following:

0. kdestroy
1. kinit admin
2. ls -la /`klist | grep cache | cut -d':' -f2-|cut -d/ -f2-`
3. kvno cifs/`hostname`
4. ls -la /`klist | grep cache | cut -d':' -f2-|cut -d/ -f2-`

The result should look like this:
[root@master ~]# kinit admin
Password for admin: 
[root@master ~]# ls -la /`klist | grep cache | cut -d':' -f2-|cut -d/ -f2-`
-rw-------. 1 root root 1372 Jul 25 16:18 /run/user/0/krb5cc/tktVtEKRi
[root@master ~]# kvno cifs/`hostname`
cifs/master.lvee.ipa: kvno = 1
[root@master ~]# ls -la /`klist | grep cache | cut -d':' -f2-|cut -d/ -f2-`
-rw-------. 1 root root 2401 Jul 25 16:18 /run/user/0/krb5cc/tktVtEKRi

Note the sizes of the credentials cache -- first step is the ccache with TGT. If it has MS-PAC, it should be bigger than 1Kb. Second size is ccache with TGT and a ticket to cifs service. If the ticket has MS-PAC attached, it should be roughly a 1Kb size and definitely not around 500 bytes or so. In result, a second size of the ccache should be about twice the original size.

Comment 14 Martin Kosek 2013-07-25 13:47:24 UTC
Yes, if needed I can provide one-time testing environment or instructions for you how to create it yourselves.

Comment 15 Patrik Kis 2013-07-25 14:48:19 UTC
(In reply to Martin Kosek from comment #14)
> Yes, if needed I can provide one-time testing environment or instructions
> for you how to create it yourselves.

Great! I prefer instructions to create test env.

Comment 16 Martin Kosek 2013-07-25 15:05:27 UTC
I think the best instructions on connecting IPA and AD are available on freeipa.org wiki:

http://www.freeipa.org/page/Howto/IPAv3_AD_trust_setup

... or RHEL docs:

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Identity_Management_Guide/active-directory-trust.html