Bug 2052 - Memory leak when SSH login and logout
Summary: Memory leak when SSH login and logout
Status: CLOSED INVALID
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 6.1p1
Hardware: MIPS Linux
: P5 major
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 02:06 AEDT by vijay
Modified: 2022-02-25 13:56 AEDT (History)
2 users (show)

See Also:


Attachments
Memory allocation and deallocation information (31.00 KB, application/msword)
2012-12-18 02:06 AEDT, vijay
no flags Details
functions allocating and deallocating memory. (39.50 KB, application/msword)
2012-12-18 02:08 AEDT, vijay
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description vijay 2012-12-18 02:06:12 AEDT
Created attachment 2200 [details]
Memory allocation and deallocation information

We are using openSSH version release-5.1.
When we do ssh login and logout we notice memory leak, we noticed this memory leak in the following functions.

1, match_list (from Line no 287) function allocated memory using xstrdup call and this was not freeed.

2, In function input_userauth_request(from line no 299) we allocate memory using xstrdup call and this was not freeed.

3, In Function list_hostkey_types (from line no 825) we allocate memory using xstrdup call and this was not freeed.

4, In function kex_setup (line no : 246) we allocate memory using buffer_init call and this was not freeed.

5, In Function channel_new (line no :332) allocate memory using xstrdup call and this was not freeed.

6, In function channel_new (line no:317) we allocate memory using buffer_init call and this was not freeed.

If this issue was fixed in the later release, can you please help us with the patch.
I am attaching the logs for you reference.
Comment 1 vijay 2012-12-18 02:08:41 AEDT
Created attachment 2201 [details]
functions allocating and deallocating memory.
Comment 2 Darren Tucker 2013-06-05 10:58:33 AEST
We can take a look, however since the sshd process goes away once the session is complete the OS should return all resources allocated by the process.
Comment 3 Damien Miller 2013-07-25 12:18:15 AEST
Retarget to openssh-6.4
Comment 4 Damien Miller 2013-07-25 12:21:17 AEST
Retarget 6.3 -> 6.4
Comment 5 Damien Miller 2014-02-06 10:18:22 AEDT
Retarget incomplete bugs / feature requests to 6.6 release
Comment 6 Damien Miller 2014-02-06 10:20:35 AEDT
Retarget incomplete bugs / feature requests to 6.6 release
Comment 7 Damien Miller 2014-04-12 14:48:43 AEST
Retarget to 6.7 release, since 6.6 was mostly bugfixing.
Comment 8 Damien Miller 2014-04-12 14:54:53 AEST
Remove from 6.6 tracking bug
Comment 9 Damien Miller 2014-08-30 04:38:43 AEST
Retarget incomplete bugs to 6.8 release.
Comment 10 Damien Miller 2014-08-30 04:39:37 AEST
These bugs are no longer targeted at the imminent 6.7 release
Comment 11 Damien Miller 2015-03-03 07:59:46 AEDT
OpenSSH 6.8 is approaching release and closed for major work. Retarget these bugs for the next release.
Comment 12 Damien Miller 2015-03-03 08:01:33 AEDT
Retarget to 6.9
Comment 13 Damien Miller 2015-06-05 14:41:56 AEST
detarget for 6.9 release, until we do the massive valgrind memleak cleanup
Comment 14 Damien Miller 2022-01-14 15:37:35 AEDT
closing a very stale bug. We've done a fair bit of work on leaks since 2012. If you have a more recent report then feel free to reopen
Comment 15 Damien Miller 2022-02-25 13:56:10 AEDT
closing bugs resolved before openssh-8.9