OpenBSD CVS

CVS log for src/usr.bin/ssh/sshd.c


[BACK] Up to [local] / src / usr.bin / ssh

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_6_5_BASE


Revision 1.533 / (download) - annotate - [select for diffs], Fri Mar 1 02:32:39 2019 UTC (5 years, 3 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.532: +86 -28 lines
Diff to previous 1.532 (unified)

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@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.