Bug 2043

Summary: memleak in import_environments
Product: Portable OpenSSH Reporter: Arthur Mesh <arthurmesh>
Component: sshdAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WONTFIX    
Severity: trivial CC: djm
Priority: P5    
Version: 6.1p1   
Hardware: All   
OS: All   
Attachments:
Description Flags
fix none

Description Arthur Mesh 2012-09-25 03:14:55 AEST
Created attachment 2189 [details]
fix

Potential fix attached.
Comment 1 Damien Miller 2020-06-26 16:08:11 AEST
Unfortunately, it's not possible to safely free this here as pam_putenv() is underspecified: it is not guaranteed to either copy the environment it is setting or take over ownership of it. The safest behaviour here is just to accept the one-time leak :(

I have added a comment to explain this in auth-pam.c
Comment 2 Damien Miller 2021-03-04 09:54:42 AEDT
close bugs that were resolved in OpenSSH 8.5 release cycle