Bug 1582 - memory leak in do_ssh2_kex() routine (sshd.c)
Summary: memory leak in do_ssh2_kex() routine (sshd.c)
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 5.2p1
Hardware: All All
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-02 06:17 AEDT by Miguel Sanders
Modified: 2009-10-06 15:02 AEDT (History)
2 users (show)

See Also:


Attachments
Fix for memory leak (517 bytes, patch)
2009-04-02 06:17 AEDT, Miguel Sanders
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.