Bug 1683295 - Kerberos cleanup procedures do not work with GSSAPIDelegateCredentials and default ccache from krb5.conf
Summary: Kerberos cleanup procedures do not work with GSSAPIDelegateCredentials and de...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: openssh
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.1
Assignee: Jakub Jelen
QA Contact: Anderson Sasaki
Abhimanyu Jamaiyar
URL:
Whiteboard:
Depends On: 1682500
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-26 14:31 UTC by Jakub Jelen
Modified: 2019-11-05 22:42 UTC (History)
6 users (show)

Fixed In Version: openssh-8.0p1-1.el8
Doc Type: Bug Fix
Doc Text:
.Kerberos cleanup procedures are now compatible with `GSSAPIDelegateCredentials` and default cache from `krb5.conf` Previously, when the `default_ccache_name` option was configured in the `krb5.conf` file, the kerberos credentials were not cleaned up with the `GSSAPIDelegateCredentials` and `GSSAPICleanupCredentials` options set. This bug is now fixed by updating the source code to clean up credential caches in the described use cases. After the configuration, the credential cache gets cleaned up on exit if the user configures it.
Clone Of:
Environment:
Last Closed: 2019-11-05 22:41:32 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3702 None None None 2019-11-05 22:42:00 UTC

Description Jakub Jelen 2019-02-26 14:31:22 UTC
Description of problem:
Based on the discussion in bug #1645291, it turned out that the cleanup procedure for the kerberos tickets created during GSSAPI Credential forwarding or Kerberos authentication are attempted to be cleaned with root context. This works fine with all the caches, but not with the KCM:, which is the new default.

Version-Release number of selected component (if applicable):
*

How reproducible:
100%

Steps to Reproduce:
1. Run the test /CoreOS/openssh/Sanity/gssapi-ccname
2. Observe some failures with KCM: 

Actual results:
credential cache when the credential cleanup was not performed as expected with KCM 

Expected results:
The credentials are properly cleaned up (by switching to the user that has acquired them)

Comment 1 Jakub Jelen 2019-03-01 10:50:28 UTC
From the code, the cleanup procedure of the GSSAPIDelegateCredentials is called twice, once as a root from the privileged process and once as a user from the user process, which is still not correct but rules out the issue is caused by calling the cleanup from different user.

Additionally, it looks like the krb5_cc_resolve() is called with empty name argument, which is something I am wondering why it could work with other credential cache types. It looks like an issue of the test.

The problem here is that the cleanup procedure of GSSAPIDelegateCredentials is getting the NULL name which makes it fail and prevents the cleanup in any case. It is caused by the recent modifications of OpenSSH to not set the environment variables KRB5CCNAME if the default is used.

This is minor issue, which should be fixed in RHEL 8.1 and it should be documented as a know issue.

Comment 16 errata-xmlrpc 2019-11-05 22:41:32 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://access.redhat.com/errata/RHSA-2019:3702


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