summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2024-06-14upstream: clarify KEXAlgorithms supported vs available. Inspired bydjm@openbsd.org
bz3701 from Colin Watson. OpenBSD-Commit-ID: e698e69bea19bd52971d253f2b1094490c4701f7
2024-06-14upstream: ssh-keyscan -q man bitsdjm@openbsd.org
OpenBSD-Commit-ID: ba28d0e1ac609a4c99c453e57e86560c79079db1
2024-06-14skip penalty-expire test in valgrind test envDamien Miller
2024-06-14upstream: split the PerSourcePenalties test in two: one tests penaltydjm@openbsd.org
enforcement but not penalty expiry, the other tests penalty expiry. This lets us disable the expiry testing in certain CI test environments. OpenBSD-Regress-ID: f56811064f3e3cb52ee73a206b8c2a06af1c8791
2024-06-14add a sshd_config PamServiceName optionDamien Miller
Allows selecting which PAM service name to use when UsePAM is enabled. Defaults to "sshd" unless overridden at compile time by defining SSHD_PAM_SERVICE. bz2102, ok dtucker@
2024-06-14upstream: don't redirect stderr for ssh-keyscan we expect to succeeddjm@openbsd.org
OpenBSD-Regress-ID: 8878b8eb4e070ed2e343166d3eb86db4a08a216c
2024-06-14upstream: make host/banner comments go to stderr instead of stdout,djm@openbsd.org
so they are useful as comments without extra shell redirection and so they don't clutter actual errors on stderr. Add a -q flag to shut them up. ok dtucker@ OpenBSD-Commit-ID: bec813de56a71adb5c1a76adcf49621130d24264
2024-06-14upstream: separate keywords with commanaddy@openbsd.org
OpenBSD-Commit-ID: d65a99666202a8188c4991c18d14374a229f7be5
2024-06-14upstream: specify an algorithm for ssh-keyscan, otherwise it will makedjm@openbsd.org
multiple attempts simultaneously and confuse the test OpenBSD-Regress-ID: 6e910f3315c4345053db1bf5cbf61826b194d0b9
2024-06-13sshd: don't use argv[0] as PAM service nameDamien Miller
sshd would implicitly use argv[0] as the PAM service name to allow people to select different PAM service names by making differently-named copies/links to the sshd binary. Splitting sshd into sshd/sshd-session broke this, as the process that starts PAM is always sshd-session and the user has no control over this. Hardcode "sshd" as the default PAM service name unless/until we figure out a better way. Should unbreak OSX integration tests.
2024-06-13prepare for checking in autogenerated filesDamien Miller
We plan to check in automatically generated files (config.h.in, etc) on release branches. These files are normally ignored by .gitignore, but this shuffles the contents of this file to make it easy to un-ignore them.
2024-06-13typo in commentDamien Miller
2024-06-13fix PTY allocation on Cygwin, broken by sshd splitDamien Miller
Cygwin doesn't support FD passing and so used to disable post-auth privilege separation entirely because privsep requires PTY allocation to happen in the privileged monitor process with the PTY file descriptors being passed back to the unprivileged process. This brings back a minimal version of the previous special treatment for Cygwin (and any other platform that sets DISABLE_FD_PASSING): privilege separation remains enabled, but PTY allocation happens in the post-auth user process rather than the monitor. This either requires PTY allocation to not need privilege to begin with (this appears to be the case on Cygwin), or the post-auth privsep process retain privilege (other platforms that set the DISABLE_FD_PASSING option). Keeping privileges here is bad, but the non-Cygwin systems that set DISABLE_FD_PASSING are so deeply legacy that this is likely to be the least of their problems.
2024-06-13delay lookup of privsep user until config loadedDamien Miller
sshd-session attempting to use options.kerberos_authentication to decide whether it needed to lookup the privsep user before the configuration was loaded. This caused it to get a placeholder value that caused it always to try to lookup the privsep user, breaking at least one test environment.
2024-06-13missing file for PerSourcePenalties regress testDamien Miller
2024-06-13upstream: split PerSourcePenalties address tracking. Previously itdjm@openbsd.org
used one shared table and overflow policy for IPv4 and IPv6 addresses, now it will use separate tables and optionally different overflow policies. This prevents misbehaviour from IPv6 addresses (which are vastly easier to obtain many of) from affecting IPv4 connections and may allow for stricter overflow policies. ok deraadt@ OpenBSD-Commit-ID: 12637ed0aa4d5f1f3e702da42ea967cbd8bfdfd9
2024-06-13upstream: do not mark up "(default: 20ms)";jmc@openbsd.org
OpenBSD-Commit-ID: 54151ecdecfa1b67dcdda4fd24826ef6e2148ad4
2024-06-11upstream: reap preauth net child if it hangs up during privsep messagedjm@openbsd.org
send, not just message receive OpenBSD-Commit-ID: 02a093f4ab4f8f83f0cd1ea2bb35b9ca420448f0
2024-06-11upstream: fix PIDFILE handling, broken for SUDO=doas in last commitdjm@openbsd.org
here OpenBSD-Regress-ID: 96fec579af228f87a036e94801eb294af9074625
2024-06-11upstream: reap the pre-auth [net] child if it hangs up during privsepdjm@openbsd.org
message sending, not just receiving OpenBSD-Commit-ID: f7341605bf08c4c15830910446e6775323f2f8cb
2024-06-11upstream: a little more RB_TREE paranoiadjm@openbsd.org
OpenBSD-Commit-ID: 8dc2fd21eebd8830c4a4d25461ac4fe228e11156
2024-06-11upstream: fix off-by-one comparison for PerSourcePenaltydjm@openbsd.org
OpenBSD-Commit-ID: af4f5d01c41ef870b23e55655bfbf73474a6c02b
2024-06-11upstream: move tree init before possible early returndjm@openbsd.org
OpenBSD-Commit-ID: 72e2c5b69f151c08a7c5bf5ad929b97a92c273df
2024-06-11upstream: update to mention that PerSourcePenalties default todjm@openbsd.org
being enabled and document the default values for each parameter. OpenBSD-Commit-ID: b981288bddfb097aad269f62df4081c688ce0034
2024-06-11upstream: reap the [net] child if it hangs up while writing privsepdjm@openbsd.org
message payloads, not just the message header OpenBSD-Commit-ID: 24dbd400aa381ac96be7ed2dd49018487dfef6ce
2024-06-11upstream: log waitpid() status for abnormal exitsdjm@openbsd.org
OpenBSD-Commit-ID: b317930e06b51819c1a2bc6a4359764fecfb1c2d
2024-06-11upstream: correct error messagedjm@openbsd.org
OpenBSD-Commit-ID: 581f60f73099083392887206860229ab104620ed
2024-06-11upstream: avoid shadowing issues which some compilers won't acceptderaadt@openbsd.org
ok djm OpenBSD-Commit-ID: 1e89572397dda83433d58c4fa6333a08f51170d4
2024-06-11upstream: escape the final dot at eol in "e.g." to avoid doublejmc@openbsd.org
spacing; OpenBSD-Commit-ID: 0a9fb10bc9f7d577afe2da3f498a08bc431115b9
2024-06-07upstream: enable PerSourcePenalties by default.djm@openbsd.org
ok markus NB. if you run a sshd that accepts connections from behind large NAT blocks, proxies or anything else that aggregates many possible users behind few IP addresses, then this change may cause legitimate traffic to be denied. Please read the PerSourcePenalties, PerSourcePenaltyExemptList and PerSourceNetBlockSize options in sshd_config(5) for how to tune your sshd(8) for your specific circumstances. OpenBSD-Commit-ID: 24a0e5c23d37e5a63e16d2c6da3920a51078f6ce
2024-06-07upstream: mention that PerSourcePenalties don't affect concurrentdjm@openbsd.org
in-progress connections. OpenBSD-Commit-ID: 20389da6264f2c97ac3463edfaa1182c212d420c
2024-06-07upstream: regress test for PerSourcePenaltiesdjm@openbsd.org
OpenBSD-Regress-ID: a1af13d411b25a727742644459d26480b9a1b0f1
2024-06-07upstream: make sure logs are saved from sshd run via start_sshddjm@openbsd.org
OpenBSD-Regress-ID: de4ef0e32e3ab85ff3a6c36eb08d1909c0dd1b4a
2024-06-07upstream: simplifydjm@openbsd.org
OpenBSD-Regress-ID: 50316e0d1ae0c0a057a45af042253e54ce23d11c
2024-06-07upstream: prepare for PerSourcePenalties being enabled by defaultdjm@openbsd.org
in future OpenBSD-Regress-ID: 5236c6d1c823997aac5a35e2915da30f1903bec7
2024-06-07upstream: disable stderr redirection before closing fdsdjm@openbsd.org
OpenBSD-Commit-ID: d42cb895ee4542098050367fc35321c9303f003a
2024-06-07upstream: Add a facility to sshd(8) to penalise particulardjm@openbsd.org
problematic client behaviours, controlled by two new sshd_config(5) options: PerSourcePenalties and PerSourcePenaltyExemptList. When PerSourcePenalties are enabled, sshd(8) will monitor the exit status of its child pre-auth session processes. Through the exit status, it can observe situations where the session did not authenticate as expected. These conditions include when the client repeatedly attempted authentication unsucessfully (possibly indicating an attack against one or more accounts, e.g. password guessing), or when client behaviour caused sshd to crash (possibly indicating attempts to exploit sshd). When such a condition is observed, sshd will record a penalty of some duration (e.g. 30 seconds) against the client's address. If this time is above a minimum threshold specified by the PerSourcePenalties, then connections from the client address will be refused (along with any others in the same PerSourceNetBlockSize CIDR range). Repeated offenses by the same client address will accrue greater penalties, up to a configurable maximum. A PerSourcePenaltyExemptList option allows certain address ranges to be exempt from all penalties. We hope these options will make it significantly more difficult for attackers to find accounts with weak/guessable passwords or exploit bugs in sshd(8) itself. PerSourcePenalties is off by default, but we expect to enable it automatically in the near future. much feedback markus@ and others, ok markus@ OpenBSD-Commit-ID: 89ded70eccb2b4926ef0366a4d58a693de366cca
2024-06-07whitespaceDamien Miller
2024-06-07upstream: enable -fret-clean on amd64, for libc libcrypto ld.soderaadt@openbsd.org
kernel, and all the ssh tools. The dynamic objects are entirely ret-clean, static binaries will contain a blend of cleaning and non-cleaning callers. OpenBSD-Commit-ID: 112aacedd3b61cc5c34b1fa6d9fb759214179172
2024-06-05remove PRIVSEP macros for osxDamien Miller
2024-06-01upstream: be really strict with fds reserved for communication with thedjm@openbsd.org
separate sshd-session process - reserve them early and fatal if we can't dup2(2) them later. The pre-split fallback to re-reading the configuration files is not possible, so sshd-session absolutely requires the fd the configuration is passed over to be in order. ok deraadt@ OpenBSD-Commit-ID: 308a98ef3c8a6665ebf92c7c9a0fc9600ccd7065
2024-05-31dependDamien Miller
2024-05-31rename need_privsep to need_chrootDamien Miller
privsep is mandatory, chroot is optional (disabled when running sshd as non-root)
2024-05-31remove remaining use_privsep mentionDamien Miller
2024-05-31upstream: warn when -r (deprecated option to disable re-exec) isdjm@openbsd.org
passed OpenBSD-Commit-ID: 73145ef5150edbe3ce7889f0844ed8fa6155f551
2024-05-31upstream: typosdjm@openbsd.org
OpenBSD-Commit-ID: edfa72eb06bfa65da30fabf7d2fe76d2d33f77bf
2024-05-27upstream: don't need sys/queue.h heredjm@openbsd.org
OpenBSD-Commit-ID: dd137396828171eb19e4911581812ca58de6c578
2024-05-27upstream: remove references to SSH1 and DSA server keysnaddy@openbsd.org
OpenBSD-Commit-ID: 57cc1c98d4f998981473734f144b904af7d178a2
2024-05-27upstream: remove unused struct fwd_perm_list, no decl with completejsg@openbsd.org
type ok djm@ OpenBSD-Commit-ID: 416fb3970b7e73c76d2963c4f00cf96f2b2ee2fb
2024-05-27upstream: Do not pass -Werror twice when building with clang.naddy@openbsd.org
OpenBSD-Commit-ID: 5f378c38ad8976d507786dc4db9283a879ec8cd0