djm@openbsd.org 76a24b3fa1 upstream: Fix two race conditions in sshd relating to SIGHUP:
1. Recently-forked child processes will briefly remain listening to
  listen_socks. If the main server sshd process completes its restart
  via execv() before these sockets are closed by the child processes
  then it can fail to listen at the desired addresses/ports and/or
  fail to restart.

2. When a SIGHUP is received, there may be forked child processes that
  are awaiting their reexecution state. If the main server sshd
  process restarts before passing this state, these child processes
  will yield errors and use a fallback path of reading the current
  sshd_config from the filesystem rather than use the one that sshd
  was started with.

To fix both of these cases, we reuse the startup_pipes that are shared
between the main server sshd and forked children. Previously this was
used solely to implement tracking of pre-auth child processes for
MaxStartups, but this extends the messaging over these pipes to include
a child->parent message that the parent process is safe to restart. This
message is sent from the child after it has completed its preliminaries:
closing listen_socks and receiving its reexec state.

bz#2953, reported by Michal Koutný; ok markus@ dtucker@

OpenBSD-Commit-ID: 7df09eacfa3ce13e9a7b1e9f17276ecc924d65ab
2019-03-01 13:34:00 +11:00
2019-02-22 15:02:31 +11:00
2018-07-31 12:59:30 +10:00
2018-10-11 11:29:35 +11:00
2015-01-09 00:17:12 +11:00
2017-10-20 12:58:35 +11:00
2017-10-20 12:58:35 +11:00
2016-10-21 06:55:58 +11:00
2016-03-08 06:20:35 +11:00
2016-03-08 06:20:35 +11:00
2016-08-29 11:20:28 +10:00
2016-08-09 09:06:52 +10:00
2018-09-13 12:13:50 +10:00
2018-07-31 12:59:30 +10:00
2017-05-10 11:41:21 +10:00
2017-05-10 11:41:21 +10:00
2018-11-23 14:11:20 +11:00
2015-02-17 09:32:31 +11:00
2018-01-23 16:35:07 +11:00
2015-03-27 12:00:47 +11:00
2015-02-17 09:32:31 +11:00
2019-01-22 10:50:40 +11:00
2017-05-01 10:05:04 +10:00
2017-05-10 11:41:21 +10:00
2016-07-08 13:50:03 +10:00
2018-10-31 22:21:03 +11:00
2016-03-04 15:12:17 +11:00
2015-01-15 21:39:14 +11:00
2017-10-01 10:32:25 +11:00
2018-10-12 09:48:05 +11:00
2018-02-15 22:28:14 +11:00
2015-03-23 17:08:12 +11:00
2016-09-12 13:46:29 +10:00
2017-09-12 17:37:02 +10:00
2019-01-24 10:07:03 +11:00
2015-01-15 02:22:18 +11:00
2015-01-15 02:22:18 +11:00
2014-12-11 19:17:24 +11:00
2019-01-22 22:42:01 +11:00
2016-05-19 17:48:34 +10:00
2016-11-30 19:44:25 +11:00
2018-09-13 12:13:50 +10:00
2016-04-21 16:30:11 +10:00
2016-02-18 09:24:40 +11:00
2018-09-13 12:13:50 +10:00
2017-06-01 14:55:23 +10:00
2016-05-02 20:35:04 +10:00
2018-02-15 20:04:02 +11:00
2016-11-29 16:51:27 +11:00
2018-07-31 12:59:30 +10:00
2017-05-01 10:05:04 +10:00
2018-02-09 20:00:18 +11:00
2015-04-29 18:15:24 +10:00
2018-10-11 11:03:53 +11:00
2017-06-01 14:55:22 +10:00
2017-06-01 14:55:22 +10:00
2018-03-05 10:22:32 +11:00

See https://www.openssh.com/releasenotes.html#7.9p1 for the release notes.

Please read https://www.openssh.com/report.html for bug reporting
instructions and note that we do not use Github for bug reporting or
patch/pull-request management.

This is the port of OpenBSD's excellent OpenSSH[0] to Linux and other
Unices.

OpenSSH is based on the last free version of Tatu Ylonen's sample
implementation with all patent-encumbered algorithms removed (to
external libraries), all known security bugs fixed, new features
reintroduced and many other clean-ups.  OpenSSH has been created by
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt,
and Dug Song. It has a homepage at https://www.openssh.com/

This port consists of the re-introduction of autoconf support, PAM
support, EGD[1]/PRNGD[2] support and replacements for OpenBSD library
functions that are (regrettably) absent from other unices. This port
has been best tested on AIX, Cygwin, HP-UX, Linux, MacOS/X,
FreeBSD, NetBSD, OpenBSD, OpenServer, Solaris and UnixWare.

This version actively tracks changes in the OpenBSD CVS repository.

The PAM support is now more functional than the popular packages of
commercial ssh-1.2.x. It checks "account" and "session" modules for
all logins, not just when using password authentication.

OpenSSH depends on Zlib[3], OpenSSL[4], and optionally PAM[5] and
libedit[6]

There is now several mailing lists for this port of OpenSSH. Please
refer to https://www.openssh.com/list.html for details on how to join.

Please send bug reports and patches to the mailing list
openssh-unix-dev@mindrot.org. The list is open to posting by unsubscribed
users.  Code contribution are welcomed, but please follow the OpenBSD
style guidelines[7].

Please refer to the INSTALL document for information on how to install
OpenSSH on your system.

Damien Miller <djm@mindrot.org>

Miscellania -

This version of OpenSSH is based upon code retrieved from the OpenBSD
CVS repository which in turn was based on the last free sample
implementation released by Tatu Ylonen.

References -

[0] https://www.openssh.com/
[1] http://www.lothar.com/tech/crypto/
[2] http://prngd.sourceforge.net/
[3] https://www.zlib.net/
[4] https://www.openssl.org/
[5] https://www.openpam.org
    https://www.kernel.org/pub/linux/libs/pam/
    (PAM also is standard on Solaris and HP-UX 11)
[6] https://thrysoee.dk/editline/ (portable version)
[7] https://man.openbsd.org/style.9
Description
Portable OpenSSH, all Win32-OpenSSH releases and wiki are managed at https://github.com/powershell/Win32-OpenSSH
Readme 84 MiB
Languages
C 78.3%
Shell 6.7%
PowerShell 5.3%
Roff 4.9%
M4 2.4%
Other 2.4%