Bug 197206 - gss_krb5_copy_ccache leaks memory
Summary: gss_krb5_copy_ccache leaks memory
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: krb5
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Nalin Dahyabhai
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-06-29 08:04 UTC by Morten Sylvest Olsen
Modified: 2012-06-20 13:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:22:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Morten Sylvest Olsen 2006-06-29 08:04:02 UTC
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 08:18:26 UTC
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 13:22:22 UTC
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.