[Bug 2953] New: Race during daemon reload may cause to fail to listen on configured ports
    bugzilla-daemon at bugzilla.mindrot.org 
    bugzilla-daemon at bugzilla.mindrot.org
       
    Thu Jan 10 00:46:32 AEDT 2019
    
    
  
https://bugzilla.mindrot.org/show_bug.cgi?id=2953
            Bug ID: 2953
           Summary: Race during daemon reload may cause to fail to listen
                    on configured ports
           Product: Portable OpenSSH
           Version: 7.2p2
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: sshd
          Assignee: unassigned-bugs at mindrot.org
          Reporter: mkoutny at suse.com
Created attachment 3222
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3222&action=edit
Prevent restarting while children are listening
This was observed on 7.2p2 on SLES 12 SP2 (4.4.121-92.98-default) but
based
on the code review, I expect the current version is affected too.
There is a short window when forked children are still referencing the
listen
socket after a new client connects. When the parent handles SIGHUP and
reloads
itself, it may fail to bind the new sockets if it hits this window.
Linux manual page socket(7) on SO_REUSEADDR:
> For AF_INET sockets this means that a socket may bind, except when
> there is an active listening socket bound to the address.
I'm attaching a patch (against master, 4a526941) that tackles this
(verified on
reproducer on the system mentioned above).
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
    
    
More information about the openssh-bugs
mailing list