• Alexey Borzenkov's avatar
    syscall: workaround accept() bug on Darwin · 5197fa80
    Alexey Borzenkov authored
    Darwin kernels have a bug in accept() where error result from
    an internal call is not checked and socket is accepted instead
    of ECONNABORTED error. However, such sockets have no sockaddr,
    which results in EAFNOSUPPORT error from anyToSockaddr, making
    Go http servers running on Mac OS X easily susceptible to
    denial of service from simple port scans with nmap.
    Fixes #3849.
    
    R=golang-dev, adg, mikioh.mikioh
    CC=golang-dev
    https://golang.org/cl/6456045
    5197fa80
syscall_bsd.go 16 KB