Bug 2236

Summary: ssh-agent: fix unintended UNIX-domain socket removal
Product: Portable OpenSSH Reporter: Dmitry V. Levin <ldv>
Component: ssh-agentAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: djm
Priority: P5    
Version: 6.6p1   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 2226    
Attachments:
Description Flags
proposed fix none

Description Dmitry V. Levin 2014-04-25 06:39:50 AEST
Created attachment 2432 [details]
proposed fix

ssh-agent sometimes forks child processes.  For example,
ask_permission() may fork a child process to execute an askpass program.
If it fails to execute, the child process exits using fatal(), which in
turn calls cleanup_exit(), and the latter calls cleanup_socket().  As
result, an error in child process causes unintended UNIX-domain socket
removal.  The fix is to record pid of the process that is responsible
for socket cleanup, and skip this cleanup for other processes.
Comment 1 Damien Miller 2014-07-03 13:11:45 AEST
patch applied - this will be in OpenSSH 6.7 - thanks!
Comment 2 Damien Miller 2014-10-08 08:00:39 AEDT
Close all bugs left open from 6.6 and 6.7 releases.