| Summary: | [Patch] memory leak in sftp-client.c | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Loganaden Velvindron <loganaden> | ||||
| Component: | sftp | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | trivial | CC: | ajay.ramjatan, djm | ||||
| Priority: | P2 | ||||||
| Version: | -current | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 1930 | ||||||
| Attachments: |
|
||||||
Patches, compiles and works on Linux x86, gcc 4.5.2 OpenSSH_5.8p2, OpenSSL 1.0.0d 8 Feb 2011 (In reply to comment #0) > Created attachment 2071 [details] > Fix for memory leak in sftp-client.c > > in do_hardlink(), buffer_init(&msg) may be unfreed > if the server does not support hardlink condition is met. > > Jonathan Armani (armani@) advises moving it down. > > Same thing happens in do_readlink(): if it's unable > to readlink(), the function returns without freeing > msg. > > I've attached a patch. This runs on both openbsd -current > & portable openssh -current. > > The attached patch concerns portable OpenSSH. > > Thanks & Regards, > //Logan > C-x-C-c My mistake. I sent another patch for OpenSSH on openbsd. http://marc.info/?l=openbsd-tech&m=131131952504707&w=2 Markus applied these, they will be in OpenSSH-6.0 Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1 |
Created attachment 2071 [details] Fix for memory leak in sftp-client.c in do_hardlink(), buffer_init(&msg) may be unfreed if the server does not support hardlink condition is met. Jonathan Armani (armani@) advises moving it down. Same thing happens in do_readlink(): if it's unable to readlink(), the function returns without freeing msg. I've attached a patch. This runs on both openbsd -current & portable openssh -current. The attached patch concerns portable OpenSSH. Thanks & Regards, //Logan C-x-C-c