Bug 197206 - gss_krb5_copy_ccache leaks memory
gss_krb5_copy_ccache leaks memory
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: krb5 (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-29 04:04 EDT by Morten Sylvest Olsen
Modified: 2012-06-20 09:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 09:22:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Morten Sylvest Olsen 2006-06-29 04:04:02 EDT
Description of problem:

gss_krb5_copy_ccache leaks a copy of each credential

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

krb5-libs-1.3.4-27

How reproducible:

Always

Steps to Reproduce:
1. Use the function gss_krb5_copy_ccache 
2. 
3.
  
Actual results:

A copy of each credential has now been leaked

Expected results:

No leaked memory

Additional info:

src/lib/gssapi/krb5/copy_ccache.c invokes krb5_ccc_next_cred in a loop without
freeing the returned credentials after storing them in the other cache. There
seem to be no workaround.

This has not been fixed upstream in krb5-1.5beta2
Comment 1 Morten Sylvest Olsen 2006-06-29 04:18:26 EDT
heimdal does the correct thing: 

while (ret == 0 &&
           krb5_cc_next_cred_match(context, from, &cursor, &cred,
                                   whichfields, mcreds) == 0) {
        if (matched)
            (*matched)++;
        ret = krb5_cc_store_cred(context, to, &cred);
        krb5_free_cred_contents(context, &cred);
    }

(from heimdal-0.7.2/lib/krb5/cache.c)
Comment 2 Jiri Pallich 2012-06-20 09:22:22 EDT
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.

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