mainGnuTLS - Support: sr #107804, privkey memory leak in server...

 
 

sr #107804: privkey memory leak in server handshake

Submitter:  Dan Winship <danw>
Submitted:  Sat 17 Sep 2011 02:41:53 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  nmav
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 17 Sep 2011 10:23:16 PM UTC, comment #3: 

Thanks. Should be fixed now in master.

Nikos Mavrogiannopoulos <nmav>
Group administrator
Sat 17 Sep 2011 07:11:21 PM UTC, comment #2: 

yes, that works, although with that out of the way I noticed a second leak; you need to add

+         gnutls_free (st2.cert.x509);

to the GNUTLS_CRT_X509 cleanup at the end of call_get_cert_callback(). (It's freeing the certs, but not the array containing them.)

Dan Winship <danw>
Sat 17 Sep 2011 04:31:59 PM UTC, comment #1: 

Thank you for the report. Does the attached patch fix the issue for you?

Nikos Mavrogiannopoulos <nmav>
Group administrator
Sat 17 Sep 2011 02:41:53 PM UTC, original submission:  

in auth_cert.c, call_get_cert_callback() passes a newly-allocated gnutls_privkey_t to _gnutls_selected_certs_set(), but later on, _gnutls_selected_certs_deinit() just sets the key to NULL without freeing it.

both 2.12 and git master

Dan Winship <danw>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #23984:  patch.txt added by nmav (431B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jas (Updated the item)
  • -email is unavailable- added by nmav (Posted a comment)
  • -email is unavailable- added by danw (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-09-21 jas Open/ClosedOpen Closed
    2011-09-17 nmav StatusNone Done
    2011-09-17 nmav Attached File- Added patch.txt, #23984
    2011-09-17 nmav Assigned toNone nmav

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code