https://bugzilla.mindrot.org/show_bug.cgi?id=3403 Bug ID: 3403 Summary: Memory leak Product: Portable OpenSSH Version: 8.9p1 Hardware: Other OS: Windows 10 Status: NEW Severity: enhancement Priority: P5 Component: scp Assignee: unassigned-bugs at mindrot.org Reporter: balu.gajjala at gmail.com In the else loop, the args.list is set to NULL without releasing memory resulting in a memory leak. static struct sftp_conn * do_sftp_connect(char *host, char *user, int port, char *sftp_direct, int *reminp, int *remoutp, int *pidp) { if (sftp_direct == NULL) { if (do_cmd(ssh_program, host, user, port, 1, "sftp", reminp, remoutp, pidp) < 0) return NULL; } else { args.list = NULL; addargs(&args, "sftp-server"); if (do_cmd(sftp_direct, host, NULL, -1, 0, "sftp", reminp, remoutp, pidp) < 0) return NULL; } return do_init(*reminp, *remoutp, 32768, 64, limit_kbps); } -- You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.mindrot.org/show_bug.cgi?id=3403 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |djm at mindrot.org, | |dtucker at dtucker.net Status|NEW |ASSIGNED Assignee|unassigned-bugs at mindrot.org |djm at mindrot.org Attachment #3585| |ok?(dtucker at dtucker.net) Flags| | --- Comment #1 from Damien Miller <djm at mindrot.org> --- Created attachment 3585 --> https://bugzilla.mindrot.org/attachment.cgi?id=3585&action=edit use freeargs(), more addargs(), etc paranoia -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
https://bugzilla.mindrot.org/show_bug.cgi?id=3403 Darren Tucker <dtucker at dtucker.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3585|ok?(dtucker at dtucker.net) |ok+ Flags| | -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
https://bugzilla.mindrot.org/show_bug.cgi?id=3403 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Blocks| |3395 --- Comment #2 from Damien Miller <djm at mindrot.org> --- Thanks - fix has been applied and will be in OpenSSH 9.0 commit 16ea8b85838dd7a4dbeba4e51ac4f43fd68b1e5b (HEAD -> master, origin/master, origin/HEAD) Author: djm at openbsd.org <djm at openbsd.org> Date: Sun Mar 20 08:52:17 2022 +0000 upstream: don't leak argument list; bz3404, reported by Balu Gajjala ok dtucker@ OpenBSD-Commit-ID: fddc32d74e5dd5cff1a49ddd6297b0867eae56a6 Referenced Bugs: https://bugzilla.mindrot.org/show_bug.cgi?id=3395 [Bug 3395] Tracking bug for openssh-9.0 -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.