]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
16 months agoupstream: penalty test is still a bit racy
djm@openbsd.org [Sun, 16 Jun 2024 08:18:06 +0000 (08:18 +0000)] 
upstream: penalty test is still a bit racy

OpenBSD-Regress-ID: 90c9ac224db454637baf1ebee5857e007321e824

16 months agoupstream: crank up penalty timeouts so this should work on even the
djm@openbsd.org [Sat, 15 Jun 2024 03:59:10 +0000 (03:59 +0000)] 
upstream: crank up penalty timeouts so this should work on even the

slowest of test builders

OpenBSD-Regress-ID: 70bda39c83e3fc9d0f3c1fad4542ed33e173d468

16 months agoupstream: sort -q in the options list;
jmc@openbsd.org [Fri, 14 Jun 2024 05:20:34 +0000 (05:20 +0000)] 
upstream: sort -q in the options list;

OpenBSD-Commit-ID: 6839b38378f38f754de638a5e988c13b4164cc7c

16 months agoupstream: clarify KEXAlgorithms supported vs available. Inspired by
djm@openbsd.org [Fri, 14 Jun 2024 05:01:22 +0000 (05:01 +0000)] 
upstream: clarify KEXAlgorithms supported vs available. Inspired by

bz3701 from Colin Watson.

OpenBSD-Commit-ID: e698e69bea19bd52971d253f2b1094490c4701f7

16 months agoupstream: ssh-keyscan -q man bits
djm@openbsd.org [Fri, 14 Jun 2024 05:00:42 +0000 (05:00 +0000)] 
upstream: ssh-keyscan -q man bits

OpenBSD-Commit-ID: ba28d0e1ac609a4c99c453e57e86560c79079db1

16 months agoskip penalty-expire test in valgrind test env
Damien Miller [Fri, 14 Jun 2024 04:46:35 +0000 (14:46 +1000)] 
skip penalty-expire test in valgrind test env

16 months agoupstream: split the PerSourcePenalties test in two: one tests penalty
djm@openbsd.org [Fri, 14 Jun 2024 04:43:11 +0000 (04:43 +0000)] 
upstream: split the PerSourcePenalties test in two: one tests penalty

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

16 months agoadd a sshd_config PamServiceName option
Damien Miller [Fri, 14 Jun 2024 04:19:23 +0000 (14:19 +1000)] 
add a sshd_config PamServiceName option

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@

16 months agoupstream: don't redirect stderr for ssh-keyscan we expect to succeed
djm@openbsd.org [Fri, 14 Jun 2024 00:26:12 +0000 (00:26 +0000)] 
upstream: don't redirect stderr for ssh-keyscan we expect to succeed

OpenBSD-Regress-ID: 8878b8eb4e070ed2e343166d3eb86db4a08a216c

16 months agoupstream: make host/banner comments go to stderr instead of stdout,
djm@openbsd.org [Fri, 14 Jun 2024 00:25:25 +0000 (00:25 +0000)] 
upstream: make host/banner comments go to stderr instead of stdout,

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

16 months agoupstream: separate keywords with comma
naddy@openbsd.org [Thu, 13 Jun 2024 15:06:33 +0000 (15:06 +0000)] 
upstream: separate keywords with comma

OpenBSD-Commit-ID: d65a99666202a8188c4991c18d14374a229f7be5

16 months agoupstream: specify an algorithm for ssh-keyscan, otherwise it will make
djm@openbsd.org [Fri, 14 Jun 2024 00:23:55 +0000 (00:23 +0000)] 
upstream: specify an algorithm for ssh-keyscan, otherwise it will make

multiple attempts simultaneously and confuse the test

OpenBSD-Regress-ID: 6e910f3315c4345053db1bf5cbf61826b194d0b9

16 months agosshd: don't use argv[0] as PAM service name
Damien Miller [Thu, 13 Jun 2024 06:41:29 +0000 (16:41 +1000)] 
sshd: don't use argv[0] as PAM service name

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.

16 months agoprepare for checking in autogenerated files
Damien Miller [Thu, 13 Jun 2024 05:00:28 +0000 (15:00 +1000)] 
prepare for checking in autogenerated files

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.

16 months agotypo in comment
Damien Miller [Thu, 13 Jun 2024 04:41:33 +0000 (14:41 +1000)] 
typo in comment

16 months agofix PTY allocation on Cygwin, broken by sshd split
Damien Miller [Thu, 13 Jun 2024 04:35:25 +0000 (14:35 +1000)] 
fix PTY allocation on Cygwin, broken by sshd split

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.

16 months agodelay lookup of privsep user until config loaded
Damien Miller [Thu, 13 Jun 2024 01:33:09 +0000 (11:33 +1000)] 
delay lookup of privsep user until config loaded

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.

16 months agomissing file for PerSourcePenalties regress test
Damien Miller [Thu, 13 Jun 2024 01:16:57 +0000 (11:16 +1000)] 
missing file for PerSourcePenalties regress test

16 months agoupstream: split PerSourcePenalties address tracking. Previously it
djm@openbsd.org [Wed, 12 Jun 2024 22:36:00 +0000 (22:36 +0000)] 
upstream: split PerSourcePenalties address tracking. Previously it

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

16 months agoupstream: do not mark up "(default: 20ms)";
jmc@openbsd.org [Tue, 11 Jun 2024 05:24:39 +0000 (05:24 +0000)] 
upstream: do not mark up "(default: 20ms)";

OpenBSD-Commit-ID: 54151ecdecfa1b67dcdda4fd24826ef6e2148ad4

16 months agoupstream: reap preauth net child if it hangs up during privsep message
djm@openbsd.org [Tue, 11 Jun 2024 02:54:51 +0000 (02:54 +0000)] 
upstream: reap preauth net child if it hangs up during privsep message

send, not just message receive

OpenBSD-Commit-ID: 02a093f4ab4f8f83f0cd1ea2bb35b9ca420448f0

16 months agoupstream: fix PIDFILE handling, broken for SUDO=doas in last commit
djm@openbsd.org [Tue, 11 Jun 2024 01:58:27 +0000 (01:58 +0000)] 
upstream: fix PIDFILE handling, broken for SUDO=doas in last commit

here

OpenBSD-Regress-ID: 96fec579af228f87a036e94801eb294af9074625

16 months agoupstream: reap the pre-auth [net] child if it hangs up during privsep
djm@openbsd.org [Tue, 11 Jun 2024 02:00:30 +0000 (02:00 +0000)] 
upstream: reap the pre-auth [net] child if it hangs up during privsep

message sending, not just receiving

OpenBSD-Commit-ID: f7341605bf08c4c15830910446e6775323f2f8cb

16 months agoupstream: a little more RB_TREE paranoia
djm@openbsd.org [Tue, 11 Jun 2024 01:23:25 +0000 (01:23 +0000)] 
upstream: a little more RB_TREE paranoia

OpenBSD-Commit-ID: 8dc2fd21eebd8830c4a4d25461ac4fe228e11156

16 months agoupstream: fix off-by-one comparison for PerSourcePenalty
djm@openbsd.org [Tue, 11 Jun 2024 01:22:25 +0000 (01:22 +0000)] 
upstream: fix off-by-one comparison for PerSourcePenalty

OpenBSD-Commit-ID: af4f5d01c41ef870b23e55655bfbf73474a6c02b

16 months agoupstream: move tree init before possible early return
djm@openbsd.org [Tue, 11 Jun 2024 01:21:41 +0000 (01:21 +0000)] 
upstream: move tree init before possible early return

OpenBSD-Commit-ID: 72e2c5b69f151c08a7c5bf5ad929b97a92c273df

16 months agoupstream: update to mention that PerSourcePenalties default to
djm@openbsd.org [Tue, 11 Jun 2024 01:07:35 +0000 (01:07 +0000)] 
upstream: update to mention that PerSourcePenalties default to

being enabled and document the default values for each parameter.

OpenBSD-Commit-ID: b981288bddfb097aad269f62df4081c688ce0034

16 months agoupstream: reap the [net] child if it hangs up while writing privsep
djm@openbsd.org [Tue, 11 Jun 2024 00:44:52 +0000 (00:44 +0000)] 
upstream: reap the [net] child if it hangs up while writing privsep

message payloads, not just the message header

OpenBSD-Commit-ID: 24dbd400aa381ac96be7ed2dd49018487dfef6ce

16 months agoupstream: log waitpid() status for abnormal exits
djm@openbsd.org [Tue, 11 Jun 2024 00:40:21 +0000 (00:40 +0000)] 
upstream: log waitpid() status for abnormal exits

OpenBSD-Commit-ID: b317930e06b51819c1a2bc6a4359764fecfb1c2d

16 months agoupstream: correct error message
djm@openbsd.org [Tue, 11 Jun 2024 00:36:20 +0000 (00:36 +0000)] 
upstream: correct error message

OpenBSD-Commit-ID: 581f60f73099083392887206860229ab104620ed

16 months agoupstream: avoid shadowing issues which some compilers won't accept
deraadt@openbsd.org [Fri, 7 Jun 2024 13:23:30 +0000 (13:23 +0000)] 
upstream: avoid shadowing issues which some compilers won't accept

ok djm

OpenBSD-Commit-ID: 1e89572397dda83433d58c4fa6333a08f51170d4

16 months agoupstream: escape the final dot at eol in "e.g." to avoid double
jmc@openbsd.org [Thu, 6 Jun 2024 21:14:49 +0000 (21:14 +0000)] 
upstream: escape the final dot at eol in "e.g." to avoid double

spacing;

OpenBSD-Commit-ID: 0a9fb10bc9f7d577afe2da3f498a08bc431115b9

16 months agoupstream: enable PerSourcePenalties by default.
djm@openbsd.org [Thu, 6 Jun 2024 20:25:48 +0000 (20:25 +0000)] 
upstream: enable PerSourcePenalties by default.

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

16 months agoupstream: mention that PerSourcePenalties don't affect concurrent
djm@openbsd.org [Thu, 6 Jun 2024 20:20:42 +0000 (20:20 +0000)] 
upstream: mention that PerSourcePenalties don't affect concurrent

in-progress connections.

OpenBSD-Commit-ID: 20389da6264f2c97ac3463edfaa1182c212d420c

16 months agoupstream: regress test for PerSourcePenalties
djm@openbsd.org [Thu, 6 Jun 2024 19:49:25 +0000 (19:49 +0000)] 
upstream: regress test for PerSourcePenalties

OpenBSD-Regress-ID: a1af13d411b25a727742644459d26480b9a1b0f1

16 months agoupstream: make sure logs are saved from sshd run via start_sshd
djm@openbsd.org [Thu, 6 Jun 2024 19:48:40 +0000 (19:48 +0000)] 
upstream: make sure logs are saved from sshd run via start_sshd

OpenBSD-Regress-ID: de4ef0e32e3ab85ff3a6c36eb08d1909c0dd1b4a

16 months agoupstream: simplify
djm@openbsd.org [Thu, 6 Jun 2024 19:47:48 +0000 (19:47 +0000)] 
upstream: simplify

OpenBSD-Regress-ID: 50316e0d1ae0c0a057a45af042253e54ce23d11c

16 months agoupstream: prepare for PerSourcePenalties being enabled by default
djm@openbsd.org [Thu, 6 Jun 2024 18:48:13 +0000 (18:48 +0000)] 
upstream: prepare for PerSourcePenalties being enabled by default

in future

OpenBSD-Regress-ID: 5236c6d1c823997aac5a35e2915da30f1903bec7

16 months agoupstream: disable stderr redirection before closing fds
djm@openbsd.org [Thu, 6 Jun 2024 19:50:01 +0000 (19:50 +0000)] 
upstream: disable stderr redirection before closing fds

OpenBSD-Commit-ID: d42cb895ee4542098050367fc35321c9303f003a

16 months agoupstream: Add a facility to sshd(8) to penalise particular
djm@openbsd.org [Thu, 6 Jun 2024 17:15:25 +0000 (17:15 +0000)] 
upstream: Add a facility to sshd(8) to penalise particular

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

16 months agowhitespace
Damien Miller [Thu, 6 Jun 2024 17:31:02 +0000 (03:31 +1000)] 
whitespace

16 months agoupstream: enable -fret-clean on amd64, for libc libcrypto ld.so
deraadt@openbsd.org [Tue, 4 Jun 2024 15:14:45 +0000 (15:14 +0000)] 
upstream: enable -fret-clean on amd64, for libc libcrypto ld.so

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

16 months agoremove PRIVSEP macros for osx
Damien Miller [Tue, 4 Jun 2024 16:21:30 +0000 (02:21 +1000)] 
remove PRIVSEP macros for osx

16 months agoupstream: be really strict with fds reserved for communication with the
djm@openbsd.org [Sat, 1 Jun 2024 07:03:37 +0000 (07:03 +0000)] 
upstream: be really strict with fds reserved for communication with the

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

16 months agodepend
Damien Miller [Fri, 31 May 2024 09:12:26 +0000 (19:12 +1000)] 
depend

16 months agorename need_privsep to need_chroot
Damien Miller [Fri, 31 May 2024 09:11:14 +0000 (19:11 +1000)] 
rename need_privsep to need_chroot

privsep is mandatory, chroot is optional (disabled when running
sshd as non-root)

16 months agoremove remaining use_privsep mention
Damien Miller [Fri, 31 May 2024 09:05:34 +0000 (19:05 +1000)] 
remove remaining use_privsep mention

16 months agoupstream: warn when -r (deprecated option to disable re-exec) is
djm@openbsd.org [Fri, 31 May 2024 09:01:08 +0000 (09:01 +0000)] 
upstream: warn when -r (deprecated option to disable re-exec) is

passed

OpenBSD-Commit-ID: 73145ef5150edbe3ce7889f0844ed8fa6155f551

16 months agoupstream: typos
djm@openbsd.org [Fri, 31 May 2024 08:49:35 +0000 (08:49 +0000)] 
upstream: typos

OpenBSD-Commit-ID: edfa72eb06bfa65da30fabf7d2fe76d2d33f77bf

17 months agoupstream: don't need sys/queue.h here
djm@openbsd.org [Mon, 27 May 2024 01:52:26 +0000 (01:52 +0000)] 
upstream: don't need sys/queue.h here

OpenBSD-Commit-ID: dd137396828171eb19e4911581812ca58de6c578

17 months agoupstream: remove references to SSH1 and DSA server keys
naddy@openbsd.org [Sun, 26 May 2024 20:35:12 +0000 (20:35 +0000)] 
upstream: remove references to SSH1 and DSA server keys

OpenBSD-Commit-ID: 57cc1c98d4f998981473734f144b904af7d178a2

17 months agoupstream: remove unused struct fwd_perm_list, no decl with complete
jsg@openbsd.org [Thu, 23 May 2024 23:47:16 +0000 (23:47 +0000)] 
upstream: remove unused struct fwd_perm_list, no decl with complete

type ok djm@

OpenBSD-Commit-ID: 416fb3970b7e73c76d2963c4f00cf96f2b2ee2fb

17 months agoupstream: Do not pass -Werror twice when building with clang.
naddy@openbsd.org [Wed, 22 May 2024 15:24:55 +0000 (15:24 +0000)] 
upstream: Do not pass -Werror twice when building with clang.

OpenBSD-Commit-ID: 5f378c38ad8976d507786dc4db9283a879ec8cd0

17 months agoupstream: Do not pass -Werror if building with gcc 3, for asn1.h
miod@openbsd.org [Wed, 22 May 2024 11:49:36 +0000 (11:49 +0000)] 
upstream: Do not pass -Werror if building with gcc 3, for asn1.h

and bio.h cause (admittedly bogus) warnings with gcc 3.

OpenBSD-Commit-ID: fb39324748824cb0387e9d67c41d1bef945c54ea

17 months agoupstream: this test has been broken since 2014, and has been
djm@openbsd.org [Wed, 22 May 2024 04:20:00 +0000 (04:20 +0000)] 
upstream: this test has been broken since 2014, and has been

testing the same key exchange algorithm repeatedly instead of testing all of
them. Spotted by nreilly AT blackberry.com in bz3692

Who broke the test? me.

OpenBSD-Regress-ID: 48f4f5946276f975667141957d25441b3c9a50e2

17 months agoupstream: Add missing kex-names.c source file required since the
anton@openbsd.org [Sun, 19 May 2024 19:10:01 +0000 (19:10 +0000)] 
upstream: Add missing kex-names.c source file required since the

ssh split.

OpenBSD-Regress-ID: ca666223f828fc4b069cb9016bff1eb50faf9fbb

17 months agoupstream: remove duplicate copy of relink kit for sshd-session
naddy@openbsd.org [Fri, 17 May 2024 14:42:00 +0000 (14:42 +0000)] 
upstream: remove duplicate copy of relink kit for sshd-session

OpenBSD-Commit-ID: 6d2ded4cd91d4d727c2b26e099b91ea935bed504

17 months agoupstream: remove prototypes with no matching function; ok djm@
jsg@openbsd.org [Fri, 17 May 2024 06:42:04 +0000 (06:42 +0000)] 
upstream: remove prototypes with no matching function; ok djm@

OpenBSD-Commit-ID: 6d9065dadea5f14a01bece0dbfe2fba1be31c693

17 months agoupstream: remove externs for removed vars; ok djm@
jsg@openbsd.org [Fri, 17 May 2024 06:38:00 +0000 (06:38 +0000)] 
upstream: remove externs for removed vars; ok djm@

OpenBSD-Commit-ID: f51ea791d45c15d4927eb4ae7d877ccc1e5a2aab

17 months agoupstream: -Werror was turned on (probably just for development),
deraadt@openbsd.org [Fri, 17 May 2024 06:11:17 +0000 (06:11 +0000)] 
upstream: -Werror was turned on (probably just for development),

and this is a simple way to satisfy older gcc.

OpenBSD-Commit-ID: 7f698df54384b437ce33ab7405f0b86c87019e86

17 months agoattempt at updating RPM specs for sshd-session
Damien Miller [Fri, 17 May 2024 04:50:43 +0000 (14:50 +1000)] 
attempt at updating RPM specs for sshd-session

17 months agoupstream: g/c unused variable
djm@openbsd.org [Fri, 17 May 2024 04:42:13 +0000 (04:42 +0000)] 
upstream: g/c unused variable

OpenBSD-Commit-ID: aa6ef0778a1f1bde0d73efba72a777c48d2bd010

17 months agoupstream: spelling; ok djm@
jsg@openbsd.org [Fri, 17 May 2024 02:39:11 +0000 (02:39 +0000)] 
upstream: spelling; ok djm@

OpenBSD-Commit-ID: bdea29bb3ed2a5a7782999c4c663b219d2270483

17 months agoupstream: allow overriding the sshd-session binary path
djm@openbsd.org [Fri, 17 May 2024 01:45:22 +0000 (01:45 +0000)] 
upstream: allow overriding the sshd-session binary path

OpenBSD-Regress-ID: 5058cd1c4b6ca1a15474e33546142931d9f964da

17 months agoupstream: Since ssh-agent(1) is only readable by root by now, use
anton@openbsd.org [Wed, 3 Apr 2024 06:01:11 +0000 (06:01 +0000)] 
upstream: Since ssh-agent(1) is only readable by root by now, use

ssh(1) while generating data in tests.

OpenBSD-Regress-ID: 24eb40de2e6b0ace185caaba35e2d470331ffe68

17 months agoupstream: fix incorrect debug option name introduce in previous
djm@openbsd.org [Fri, 17 May 2024 01:17:40 +0000 (01:17 +0000)] 
upstream: fix incorrect debug option name introduce in previous

commit

OpenBSD-Commit-ID: 66d69e22b1c072c694a7267c847f212284614ed3

17 months agoupstream: construct and install a relink-kit for sshd-session ok
deraadt@openbsd.org [Fri, 17 May 2024 00:33:25 +0000 (00:33 +0000)] 
upstream: construct and install a relink-kit for sshd-session ok

djm

OpenBSD-Commit-ID: 8b3820adb4da4e139c4b3cffbcc0bde9f08bf0c6

17 months agoMakefile support for sshd-session
Damien Miller [Fri, 17 May 2024 02:21:27 +0000 (12:21 +1000)] 
Makefile support for sshd-session

17 months agoupstream: missing files from previous
djm@openbsd.org [Fri, 17 May 2024 00:32:32 +0000 (00:32 +0000)] 
upstream: missing files from previous

OpenBSD-Commit-ID: 4b7be4434d8799f02365552b641a7a70a7ebeb2f

17 months agoupstream: Start the process of splitting sshd into separate
djm@openbsd.org [Fri, 17 May 2024 00:30:23 +0000 (00:30 +0000)] 
upstream: Start the process of splitting sshd into separate

binaries. This step splits sshd into a listener and a session binary. More
splits are planned.

After this changes, the listener binary will validate the configuration,
load the hostkeys, listen on port 22 and manage MaxStartups only. All
session handling will be performed by a new sshd-session binary that the
listener fork+execs.

This reduces the listener process to the minimum necessary and sets us
up for future work on the sshd-session binary.

feedback/ok markus@ deraadt@

NB. if you're updating via source, please restart sshd after installing,
otherwise you run the risk of locking yourself out.

OpenBSD-Commit-ID: 43c04a1ab96cdbdeb53d2df0125a6d42c5f19934

17 months agoupstream: simplify exit message handling, which was more complicated
djm@openbsd.org [Thu, 9 May 2024 09:46:47 +0000 (09:46 +0000)] 
upstream: simplify exit message handling, which was more complicated

than it needed to be because of unexpunged ssh1 remnants. ok markus@

OpenBSD-Commit-ID: 8b0cd2c0dee75fb053718f442aa89510b684610b

17 months agoupstream: remove SSH1 leftovers
tobias@openbsd.org [Mon, 6 May 2024 19:26:17 +0000 (19:26 +0000)] 
upstream: remove SSH1 leftovers

Authored with Space Meyer <git at the-space dot agency>

ok djm

OpenBSD-Commit-ID: 81db602e4cb407baae472689db1c222ed7b2afa3

17 months agoupstream: never close stdin
tobias@openbsd.org [Tue, 30 Apr 2024 15:40:43 +0000 (15:40 +0000)] 
upstream: never close stdin

The sanitise_stdfd call makes sure that standard file descriptors are
open (if they were closed, they are connected with /dev/null).

Do not close stdin in any case to prevent error messages when stdin is
read multiple times and to prevent later usage of fd 0 for connections,
e.g.

echo localhost | ssh-keyscan -f - -f -

While at it, make stdin-related error messages nicer.

Authored with Max Kunzelmann <maxdev at posteo dot de>

ok djm

OpenBSD-Commit-ID: 48e9b7938e2fa2f9bd47e6de6df66a31e0b375d3

17 months agosync getrrsetbyname.c with recent upstream changes
Damien Miller [Tue, 7 May 2024 23:43:59 +0000 (09:43 +1000)] 
sync getrrsetbyname.c with recent upstream changes

17 months agoupstream: fix home-directory extension implementation, it always
djm@openbsd.org [Tue, 30 Apr 2024 06:23:51 +0000 (06:23 +0000)] 
upstream: fix home-directory extension implementation, it always

returned the current user's home directory contrary to the spec.

Patch from Jakub Jelen via GHPR477

OpenBSD-Commit-ID: 5afd775eab7f9cbe222d7fbae4c793de6c3b3d28

17 months agoupstream: flush stdout after writing "sftp>" prompt when not using
djm@openbsd.org [Tue, 30 Apr 2024 06:16:55 +0000 (06:16 +0000)] 
upstream: flush stdout after writing "sftp>" prompt when not using

editline.

From Alpine Linux via GHPR480

OpenBSD-Commit-ID: 80bdc7ffe0358dc090eb9b93e6dedb2b087b24cd

17 months agoupstream: stricter validation of messaging socket fd number; disallow
djm@openbsd.org [Tue, 30 Apr 2024 05:53:03 +0000 (05:53 +0000)] 
upstream: stricter validation of messaging socket fd number; disallow

usage of stderr. Based on GHPR492 by RealHurrison

OpenBSD-Commit-ID: 73dbbe82ea16f73ce1d044d3232bc869ae2f2ce8

17 months agoupstream: add missing reserved fields to key constraint protocol
djm@openbsd.org [Tue, 30 Apr 2024 05:45:56 +0000 (05:45 +0000)] 
upstream: add missing reserved fields to key constraint protocol

documentation.

from Wiktor Kwapisiewicz via GHPR487

OpenBSD-Commit-ID: 0dfb69998cfdb3fa00cbb0e7809e7d2f6126e3df

17 months agodepend
Damien Miller [Tue, 30 Apr 2024 02:39:34 +0000 (12:39 +1000)] 
depend

17 months agoupstream: correctly restore sigprocmask around ppoll() reported
djm@openbsd.org [Tue, 30 Apr 2024 02:14:10 +0000 (02:14 +0000)] 
upstream: correctly restore sigprocmask around ppoll() reported

by Tõivo Leedjärv; ok deraadt@

OpenBSD-Commit-ID: c0c0f89de5294a166578f071eade2501929c4686

17 months agoupstream: add explict check for server hostkey type against
djm@openbsd.org [Tue, 30 Apr 2024 02:10:49 +0000 (02:10 +0000)] 
upstream: add explict check for server hostkey type against

HostkeyAlgorithms. Allows HostkeyAlgorithms to disable implicit fallback from
certificate keys to plain keys. ok markus@

OpenBSD-Commit-ID: 364087e4a395ff9b2f42bf3aefdb2090bb23643a

17 months agoupstream: correct indentation; no functional change ok tb@
jsg@openbsd.org [Tue, 23 Apr 2024 13:34:50 +0000 (13:34 +0000)] 
upstream: correct indentation; no functional change ok tb@

OpenBSD-Commit-ID: dd9702fd43de546bc6a3f4f025c74d6f3692a0d4

17 months agoupstream: set right mode on ssh-agent at boot-time
semarie@openbsd.org [Thu, 4 Apr 2024 16:00:51 +0000 (16:00 +0000)] 
upstream: set right mode on ssh-agent at boot-time

which sthen@
ok deraadt@

OpenBSD-Commit-ID: 662b5056a2c6171563e1626f9c69f27862b5e7af

17 months agoupstream: Oops, incorrect hex conversion spotted by claudio.
deraadt@openbsd.org [Tue, 2 Apr 2024 12:22:38 +0000 (12:22 +0000)] 
upstream: Oops, incorrect hex conversion spotted by claudio.

While here try to improve how it reads a bit better.  Surprising the
regression tests didn't spot this error, maybe it fails to roundtrip the
values.

OpenBSD-Commit-ID: 866cfcc1955aef8f3fc32da0b70c353a1b859f2e

17 months agoupstream: for parse_ipqos(), use strtonum() instead of mostly
deraadt@openbsd.org [Tue, 2 Apr 2024 10:02:08 +0000 (10:02 +0000)] 
upstream: for parse_ipqos(), use strtonum() instead of mostly

idiomatic strtoul(), but wow it's so gross. ok djm

OpenBSD-Commit-ID: cec14a76af2eb7b225300c80fc0e21052be67b05

17 months agoupstream: can shortcut by returning strtonum() value directly; ok
deraadt@openbsd.org [Tue, 2 Apr 2024 09:56:58 +0000 (09:56 +0000)] 
upstream: can shortcut by returning strtonum() value directly; ok

djm

OpenBSD-Commit-ID: 7bb2dd3d6d1f288dac14247d1de446e3d7ba8b8e

17 months agoupstream: rewrite convtime() to use a isdigit-scanner and
deraadt@openbsd.org [Tue, 2 Apr 2024 09:52:14 +0000 (09:52 +0000)] 
upstream: rewrite convtime() to use a isdigit-scanner and

strtonum() instead of strange strtoul can might be fooled by garage
characters. passes regress/usr.bin/ssh/unittests/misc ok djm

OpenBSD-Commit-ID: 4b1ef826bb16047aea3f3bdcb385b72ffd450abc

17 months agoupstream: Remove unused ptr[3] char array in pkcs11_decode_hex.
claudio@openbsd.org [Tue, 2 Apr 2024 09:48:24 +0000 (09:48 +0000)] 
upstream: Remove unused ptr[3] char array in pkcs11_decode_hex.

OK deraadt@

OpenBSD-Commit-ID: 3d14433e39fd558f662d3b0431c4c555ef920481

17 months agoupstream: Replace non-idiomatic strtoul(, 16) to parse a region
deraadt@openbsd.org [Tue, 2 Apr 2024 09:32:28 +0000 (09:32 +0000)] 
upstream: Replace non-idiomatic strtoul(, 16) to parse a region

of 2-character hex sequences with a low-level replacement designed just for
the task. ok djm

OpenBSD-Commit-ID: 67bab8b8a4329a19a0add5085eacd6f4cc215e85

17 months agoupstream: Use strtonum() instead of severely non-idomatic
deraadt@openbsd.org [Tue, 2 Apr 2024 09:29:31 +0000 (09:29 +0000)] 
upstream: Use strtonum() instead of severely non-idomatic

strtoul() In particular this will now reject trailing garbage, ie.
'12garbage'. ok djm

OpenBSD-Commit-ID: c82d95e3ccbfedfc91a8041c2f8bf0cf987d1501

17 months agoupstream: also create a relink kit for ssh-agent, since it is a
deraadt@openbsd.org [Mon, 1 Apr 2024 15:50:17 +0000 (15:50 +0000)] 
upstream: also create a relink kit for ssh-agent, since it is a

long-running setgid program carrying keys with some (not very powerful)
communication channels. solution for testing the binary from dtucker.
agreement from djm. Will add it into /etc/rc in a few days.

OpenBSD-Commit-ID: 2fe8d707ae35ba23c7916adcb818bb5b66837ba0

17 months agoupstream: new-style relink kit for sshd. The old scheme created
deraadt@openbsd.org [Mon, 1 Apr 2024 15:48:16 +0000 (15:48 +0000)] 
upstream: new-style relink kit for sshd. The old scheme created

a Makefile by concatenating two Makefiles and was incredibly fragile.  In the
new way a narrow-purposed install.sh script is created and shipped with the
objects. A recently commited /etc/rc script understands these files.

OpenBSD-Commit-ID: ef9341d5a50f0d33e3a6fbe995e92964bc7ef2d3

18 months agoShell syntax fix (leftover from a sync).
renmingshuai [Fri, 12 Apr 2024 02:20:49 +0000 (10:20 +0800)] 
Shell syntax fix (leftover from a sync).

Signed-off-by: renmingshuai <renmingshuai@huawei.com>
18 months agoMerge flags for OpenSSL 3.x versions.
Darren Tucker [Thu, 25 Apr 2024 03:20:19 +0000 (13:20 +1000)] 
Merge flags for OpenSSL 3.x versions.

OpenSSL has moved to 3.4 which we don't currently accept.  Based on
the OpenSSL versioning policy[0] it looks like all of the 3.x versions
should work with OpenSSH, so remove the distinction in configure and
accept all of them.

[0] https://openssl.org/policies/general/versioning-policy.html

18 months agoRemove 9.6 branch from status page.
Darren Tucker [Thu, 25 Apr 2024 03:19:03 +0000 (13:19 +1000)] 
Remove 9.6 branch from status page.

18 months agoUpdate LibreSSL and OpenSSL versions tested.
Darren Tucker [Thu, 25 Apr 2024 03:16:58 +0000 (13:16 +1000)] 
Update LibreSSL and OpenSSL versions tested.

Update LibreSSL versions to current releases (3.8.4 & 3.9.1).
Add newly-released OpenSSL 3.3.0, and add tests against the 3.1 and
3.3 branches.

18 months agoFix missing header for systemd notification 444/head
90 [Fri, 5 Apr 2024 18:36:06 +0000 (19:36 +0100)] 
Fix missing header for systemd notification

18 months agonotify systemd on listen and reload
Damien Miller [Wed, 3 Apr 2024 03:40:32 +0000 (14:40 +1100)] 
notify systemd on listen and reload

Standalone implementation that does not depend on libsystemd.
With assistance from Luca Boccassi, and feedback/testing from Colin
Watson. bz2641

18 months agoPort changes from selfhosted to upstream tests.
Darren Tucker [Sun, 31 Mar 2024 10:51:57 +0000 (21:51 +1100)] 
Port changes from selfhosted to upstream tests.

Should get them working again.

18 months agoCheck if OpenSSL implementation supports DSA.
Darren Tucker [Sat, 30 Mar 2024 07:20:16 +0000 (18:20 +1100)] 
Check if OpenSSL implementation supports DSA.

If --enable/disable-dsa-keys is not specified, set based on what OpenSSL
supports.  If specified as enabled, but not supported by OpenSSL error
out.  ok djm@