Bug 1582

Summary: memory leak in do_ssh2_kex() routine (sshd.c)
Product: Portable OpenSSH Reporter: Miguel Sanders <miguel.sanders>
Component: sshdAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WONTFIX    
Severity: normal CC: djm, miguel.sanders
Priority: P2    
Version: 5.2p1   
Hardware: All   
OS: All   
Attachments:
Description Flags
Fix for memory leak none

Description Miguel Sanders 2009-04-02 06:17:40 AEDT
Created attachment 1620 [details]
Fix for memory leak

There is small memory leak in the do_ssh2_kex() routine in sshd.c.
Line 2195 in sshd.c states:
myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();
Where list_hostkey_types() returns a pointer allocated by the xstrdup call (line 735). This pointer should be freed in the calling routine do_ssh2_kex().
Comment 1 Damien Miller 2009-04-02 09:02:42 AEDT
I don't think this is worth fixing: myproposal is filled in once (i.e. this leak will not grow in time) and it is useful to have this structure populated.
Comment 2 Damien Miller 2009-07-31 10:49:02 AEST
actually, I think we do need this structure around for key re-exchange. Either way, we don't intend to fix this.
Comment 3 Damien Miller 2009-10-06 15:02:10 AEDT
Mass move of RESOLVED bugs to CLOSED now that 5.3 is out.