Bug 2898 - Memory leak in userauth_pubkey
Summary: Memory leak in userauth_pubkey
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: -current
Hardware: Other Linux
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_7_8
  Show dependency treegraph
 
Reported: 2018-08-21 20:24 AEST by Colin Watson
Modified: 2018-10-19 17:17 AEDT (History)
1 user (show)

See Also:


Attachments
Fix memory leak in userauth_pubkey (986 bytes, patch)
2018-08-21 20:24 AEST, Colin Watson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Watson 2018-08-21 20:24:02 AEST
Created attachment 3171 [details]
Fix memory leak in userauth_pubkey

While reviewing a backport of commit 74287f5df9966a0648b4a68417451dd18f079ab8 (OpenBSD b4891882fbe413f230fe8ac8a37349b03bd0b70d; the "delay bailout for invalid authenticating user" patch), I noticed that the change to initialise b to NULL didn't seem to be paired with corresponding cleanup code in the way that I'd expect.  I think there's a memory leak on one error path.  Patch attached (only compile-tested).
Comment 1 Damien Miller 2018-09-21 13:33:59 AEST
This was committed back in August and made the openssh-7.8 release
Comment 2 Damien Miller 2018-10-19 17:17:24 AEDT
Close RESOLVED bugs with the release of openssh-8.0