Bug 2236 - ssh-agent: fix unintended UNIX-domain socket removal
Summary: ssh-agent: fix unintended UNIX-domain socket removal
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-agent (show other bugs)
Version: 6.6p1
Hardware: All All
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_6_7
  Show dependency treegraph
 
Reported: 2014-04-25 06:39 AEST by Dmitry V. Levin
Modified: 2014-10-08 08:00 AEDT (History)
1 user (show)

See Also:


Attachments
proposed fix (1.51 KB, patch)
2014-04-25 06:39 AEST, Dmitry V. Levin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.