[Bug 2167] New: Connection remains when fork() fails.
    bugzilla-daemon at natsu.mindrot.org 
    bugzilla-daemon at natsu.mindrot.org
       
    Thu Oct 31 17:43:56 EST 2013
    
    
  
https://bugzilla.mindrot.org/show_bug.cgi?id=2167
            Bug ID: 2167
           Summary: Connection remains when fork() fails.
           Product: Portable OpenSSH
           Version: 5.3p1
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: sshd
          Assignee: unassigned-bugs at mindrot.org
          Reporter: penguin-kernel at I-love.SAKURA.ne.jp
Created attachment 2368
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2368&action=edit
A patch which seems to solve this problem.
I got "sshd[$pid]: fatal: fork of unprivileged child failed" in
/var/log/secure but the connection with ssh client remained.
I examined the cause and found that this problem happens when fork() in
privsep_preauth()/privsep_postauth() fails. You can easily reproduce
this problem by replacing fork() in
privsep_preauth()/privsep_postauth()
with -1.
I don't know what is the right fix, but at least forcibly closing
all sockets before exit() seems to solve this problem.
I'm using RHEL 6.4's openssh-5.3p1-84.1.el6.src.rpm , but I think
this problem exists in any versions which have
privsep_preauth()/privsep_postauth() .
Regards.
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
    
    
More information about the openssh-bugs
mailing list