Commit Graph

669 Commits

Author SHA1 Message Date
Ed Maste
e600fc7295 ssh: remove deprecated client VersionAddendum
Support for a client VersionAddendum was removed in bffe60ead0, but
the option was retained (as oDeprecated) as a transition aid.
Sufficient time has passed that it can be removed.

Sponsored by:	The FreeBSD Foundation
2024-03-18 10:20:18 -04:00
Ed Maste
a91a246563 ssh: Update to OpenSSH 9.7p1
This release contains mostly bugfixes.

It also makes support for the DSA signature algorithm a compile-time
option, with plans to disable it upstream later this year and remove
support entirely in 2025.

Full release notes at https://www.openssh.com/txt/release-9.7

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2024-03-18 10:00:57 -04:00
Ed Maste
069ac18495 ssh: Update to OpenSSH 9.6p1
From the release notes,

> This release contains a number of security fixes, some small features
> and bugfixes.

The most significant change in 9.6p1 is a set of fixes for a newly-
discovered weakness in the SSH transport protocol.  The fix was already
merged into FreeBSD and released as FreeBSD-SA-23:19.openssh.

Full release notes at https://www.openssh.com/txt/release-9.6

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2024-01-04 22:16:30 -05:00
Gordon Tetlow
92f58c69a1
Implement "strict key exchange" in ssh and sshd.
This adds a protocol extension to improve the integrity of the SSH
transport protocol, particular in and around the initial key exchange
(KEX) phase.

Full details of the extension are in the PROTOCOL file.

OpenBSD-Commit-ID: 2a66ac962f0a630d7945fee54004ed9e9c439f14

Approved by:	so (implicit)
Obtained from:	https://anongit.mindrot.org/openssh.git/patch/?id=1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5
Security:	CVE-2023-48795
2023-12-18 08:22:22 -08:00
Ed Maste
edf8578117 ssh: Update to OpenSSH 9.5p1
Excerpts from the release notes:

Potentially incompatible changes
--------------------------------

 * ssh-keygen(1): generate Ed25519 keys by default.
   [NOTE: This change was already merged into FreeBSD.]

 * sshd(8): the Subsystem directive now accurately preserves quoting of
   subsystem commands and arguments.

New features
------------

 * ssh(1): add keystroke timing obfuscation to the client.

 * ssh(1), sshd(8): Introduce a transport-level ping facility.

 * sshd(8): allow override of Sybsystem directives in sshd Match blocks.

Full release notes at https://www.openssh.com/txt/release-9.5

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2023-10-09 13:28:17 -04:00
Ed Maste
c9315099f6 ssh-keygen: Generate Ed25519 keys when invoked without arguments
Ed25519 keys are convenient because they're much smaller, and the next
OpenSSH release (9.5) will switch to them by default.  Apply the change
to FreeBSD main now, to help identify issues as early as possible.

Reviewed by:	kevans, karels, des
Relnotes:	Yes
Obtained from:	OpenBSD 9de458a24986
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41773
2023-09-07 13:34:21 -04:00
Ed Maste
1b91d634a5 ssh: fix OpenSSH 9.4 regression with multiplexed sessions
Upstream commit message:
upstream: fix regression in OpenSSH 9.4 (mux.c r1.99) that caused
multiplexed sessions to ignore SIGINT under some circumstances.
Reported by / feedback naddy@, ok dtucker@

OpenBSD-Commit-ID: 4d5c6c894664f50149153fd4764f21f43e7d7e5a

Fixes: 535af610a4 ("ssh: Update to OpenSSH 9.4p1")
Obtained from:	OpenSSH 803e22eabd3b
Sponsored by:	The FreeBSD Foundation
2023-08-20 15:20:49 -04:00
Ed Maste
14e78a3656 ssh: Remove note about memory leak now resolved upstream
OpenSSH 9.4p1 (updated in commit 535af610a4) includes the memory leak
fix that we originally applied in 69c72a57af ("sftp: avoid leaking
path arg in calls to make_absolute_pwd_glob.").

Sponsored by:	The FreeBSD Foundation
2023-08-15 11:56:08 -04:00
Ed Maste
33a23ef287 ssh: correct VersionAddendum date
Reported by:	Herbert J. Skuhra <herbert@gojira.at>
Fixes:		535af610a4 ("ssh: Update to OpenSSH 9.4p1")
Sponsored by:	The FreeBSD Foundation
2023-08-15 09:30:31 -04:00
Ed Maste
535af610a4 ssh: Update to OpenSSH 9.4p1
Excerpts from the release notes:

 * ssh-agent(1): PKCS#11 modules must now be specified by their full
   paths. Previously dlopen(3) could search for them in system
   library directories.

 * ssh(1): allow forwarding Unix Domain sockets via ssh -W.

 * ssh(1): add support for configuration tags to ssh(1).
   This adds a ssh_config(5) "Tag" directive and corresponding
   "Match tag" predicate that may be used to select blocks of
   configuration similar to the pf.conf(5) keywords of the same
   name.

 * ssh(1): add a "match localnetwork" predicate. This allows matching
   on the addresses of available network interfaces and may be used to
   vary the effective client configuration based on network location.

 * ssh-agent(1): improve isolation between loaded PKCS#11 modules
   by running separate ssh-pkcs11-helpers for each loaded provider.

 * ssh-agent(1), ssh(1): improve defences against invalid PKCS#11
   modules being loaded by checking that the requested module
   contains the required symbol before loading it.

 * ssh(1): don't incorrectly disable hostname canonicalization when
   CanonicalizeHostname=yes and ProxyJump was expicitly set to
   "none". bz3567

Full release notes at https://www.openssh.com/txt/release-9.4

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2023-08-10 23:10:18 -04:00
Ed Maste
348bea10b6 openssh: retire HPN option handling
The HPN patch set was removed from base system SSH in January 2016, in
commit 60c59fad88.  We retained the option parsing (using OpenSSH's
support for deprecated options) to avoid breaking existing installations
upon upgrade, but sufficient time has now passed that we can remove this
special case.

Approved by:	des
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41291
2023-08-04 13:29:04 -04:00
Ed Maste
a93cbba2de ssh: comment deprecated option handling for retired local patches
Older versions of FreeBSD included the HPN patch set and provided
client-side VersionAddendum.  Both of these changes have been retired
but we've retained the option parsing for backwards compatibility to
avoid breaking upgrades.  Add comment references to the relevant
commits.

Sponsored by:	The FreeBSD Foundation
2023-08-02 10:21:34 -04:00
Gleb Smirnoff
9ff45b8ed8 sshd: do not resolve refused client hostname
This is a compromise between POLA and practical reasoning.  We don't
want to block the main server loop in an attempt to resolve.  But we
need to keep the format of the logged message as is, for sake of
sshguard and other scripts.  So let's print just the IP address twice,
this is what libwrap's refuse() would do if it failed to resolve.

Reviewed by:		philip
PR:			269456
Differential revision:	https://reviews.freebsd.org/D40069
2023-07-20 14:56:20 -07:00
Gleb Smirnoff
90f10db8a9 sshd: remove unneeded initialization of libwrap logging severities
This part of ca573c9a17 proved to be unnecessary.  As the removed
comment says, we set them merely for logging syntax errors, as we log
refusals ourselves.  However, inside the libwrap the parser logs any
syntax errors with tcpd_warn() which has hardcoded LOG_WARNING inside.

Reviewed by:		philip, emaste
Differential revision:	https://reviews.freebsd.org/D40068
2023-07-20 14:56:20 -07:00
Ed Maste
66fd12cf48 ssh: Update to OpenSSH 9.3p2
From the release notes:

Changes since OpenSSH 9.3
=========================

This release fixes a security bug.

Security
========

Fix CVE-2023-38408 - a condition where specific libaries loaded via
ssh-agent(1)'s PKCS#11 support could be abused to achieve remote
code execution via a forwarded agent socket if the following
conditions are met:

* Exploitation requires the presence of specific libraries on
  the victim system.
* Remote exploitation requires that the agent was forwarded
  to an attacker-controlled system.

Exploitation can also be prevented by starting ssh-agent(1) with an
empty PKCS#11/FIDO allowlist (ssh-agent -P '') or by configuring
an allowlist that contains only specific provider libraries.

This vulnerability was discovered and demonstrated to be exploitable
by the Qualys Security Advisory team.

In addition to removing the main precondition for exploitation,
this release removes the ability for remote ssh-agent(1) clients
to load PKCS#11 modules by default (see below).

Potentially-incompatible changes
--------------------------------

 * ssh-agent(8): the agent will now refuse requests to load PKCS#11
   modules issued by remote clients by default. A flag has been added
   to restore the previous behaviour "-Oallow-remote-pkcs11".

   Note that ssh-agent(8) depends on the SSH client to identify
   requests that are remote. The OpenSSH >=8.9 ssh(1) client does
   this, but forwarding access to an agent socket using other tools
   may circumvent this restriction.

CVE:		CVE-2023-38408
Sponsored by:	The FreeBSD Foundation
2023-07-19 13:02:33 -04:00
Ed Maste
d5e2d0f140 openssh: document a locally-applied workaround
We have a local hacky workaround for an issue caused by a hacky
upstream autoconf test.  Reported upstream on the OpenSSH mailing list:
https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-May/040242.html

PR:		209441
Sponsored by:	The FreeBSD Foundation
2023-07-18 12:27:02 -04:00
Ed Maste
170511589e openssh: Update configure for DISABLE_LASTLOG
PR:		209441
Sponsored by:	The FreeBSD Foundation
2023-04-20 18:08:16 -04:00
Ed Maste
43c6b7a60a openssh: restore PrintLastLog option
Upstream's autoconf sets DISABLE_LASTLOG if lastlog.ll_line does not
exist, but PrintLastLog also works with utmpx and other mechanisms.

Reported upstream at
https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-May/040242.html

PR:		209441
Sponsored by:	The FreeBSD Foundation
2023-04-19 21:17:59 -04:00
Ed Maste
9faa27f263 ssh: update FREEBSD-upgrade for upstream CheckHostIP default change
We changed the CheckHostIP default to "no" years ago.  Upstream has now
made the same change, so do not list it as a local change any longer.

I did not just remove the "Modified client-side defaults" section to
avoid having to renumber everything, and we may add a new local change
in the future.

Sponsored by:	The FreeBSD Foundation
2023-03-29 19:32:44 -04:00
Ed Maste
c888b3b228 sftp: add description of memory leak fix 2023-03-22 11:04:29 -04:00
Ed Maste
69c72a57af sftp: avoid leaking path arg in calls to make_absolute_pwd_glob
As Coverity reports:
    Overwriting tmp in tmp = make_absolute_pwd_glob(tmp, remote_path)
    leaks the storage that tmp points to.

Consume the first arg in make_absolute_pwd_glob, and add xstrdup() to
the one case which did not assign to the same variable that was passed
in. With this change make_absolute() and make_absolute_pwd_glob() have
the same semantics with respect to freeing the input string.

This change was reported to OpenSSH in
https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-November/040497.html
but was not acted on. It appears that OpenBSD subsequently received a
Coverity report for the same issue (their Coverity ID 405196) but fixed
only the specific instance reported by Coverity.

This change reverts OpenBSD's sftp.c 1.228 / OpenSSH-portable
commit 36c6c3eff5e4.

Reported by:	Coverity Scan
CID:		1500409
Reviewed by:	markj
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37253
2023-03-22 10:54:35 -04:00
Ed Maste
4d3fc8b057 ssh: Update to OpenSSH 9.3p1
This release fixes a number of security bugs and has minor new
features and bug fixes.  Security fixes, from the release notes
(https://www.openssh.com/txt/release-9.3):

This release contains fixes for a security problem and a memory
safety problem. The memory safety problem is not believed to be
exploitable, but we report most network-reachable memory faults as
security bugs.

 * ssh-add(1): when adding smartcard keys to ssh-agent(1) with the
   per-hop destination constraints (ssh-add -h ...) added in OpenSSH
   8.9, a logic error prevented the constraints from being
   communicated to the agent. This resulted in the keys being added
   without constraints. The common cases of non-smartcard keys and
   keys without destination constraints are unaffected. This problem
   was reported by Luci Stanescu.

 * ssh(1): Portable OpenSSH provides an implementation of the
   getrrsetbyname(3) function if the standard library does not
   provide it, for use by the VerifyHostKeyDNS feature. A
   specifically crafted DNS response could cause this function to
   perform an out-of-bounds read of adjacent stack data, but this
   condition does not appear to be exploitable beyond denial-of-
   service to the ssh(1) client.

   The getrrsetbyname(3) replacement is only included if the system's
   standard library lacks this function and portable OpenSSH was not
   compiled with the ldns library (--with-ldns). getrrsetbyname(3) is
   only invoked if using VerifyHostKeyDNS to fetch SSHFP records. This
   problem was found by the Coverity static analyzer.

Sponsored by:	The FreeBSD Foundation
2023-03-16 10:29:55 -04:00
Ed Maste
6834ca8a43 ssh: update FREEBSD-upgrade instructions
Make it clear that the 'freebsd-configure.sh' and 'freebsd-namespace.sh'
scripts are run from the crypto/openssh directory.

Sponsored by:	The FreeBSD Foundation
2023-03-15 13:37:49 -04:00
Ed Maste
19aba210e1 ssh: fix leak and apply style(9) to hostname canonicalization
Fixes:		bf2e2524a2 ("ssh: canonicize the host name before...")
Fixes:		3e74849a1e ("ssh: canonicize the host name before...")
Reviewed by:	rew
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38441
2023-03-14 13:16:57 -04:00
Ed Maste
41ff5ea22c ssh: default VerifyHostKeyDNS to no, following upstream
Revert to upstream's default.  Using VerifyHostKeyDNS may depend on a
trusted nameserver and network path.

This reverts commit 83c6a5242c.

Reported by:	David Leadbeater, G-Research
Reviewed by:	gordon
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38648
2023-03-01 09:19:07 -05:00
Ed Maste
1aa9a35f63 ssh: fix SIZEOF_TIME_T #define on i386
Reported by:	imp
Reviewed by:	imp
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38443
2023-02-08 18:34:09 -05:00
Ed Maste
232b4f33b4 ssh: add information on hostname canonicalization patch
We introduced hostname canonicalization in 2002, while upstream OpenSSH
added similar support in 2014.

It would be good to review our handling of CNAMEs in hostname
canonicalization.

Sponsored by:	The FreeBSD Foundation
2023-02-07 15:34:11 -05:00
Ed Maste
77934b7a13 ssh: default X11Forwarding to no, following upstream
Administrators can enable it if required.

Reviewed by:	bz, kevans
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37411
2023-02-06 18:41:10 -05:00
Ed Maste
f374ba41f5 ssh: update to OpenSSH 9.2p1
Release notes are available at https://www.openssh.com/txt/release-9.2

OpenSSH 9.2 contains fixes for two security problems and a memory safety
problem.  The memory safety problem is not believed to be exploitable.
These fixes have already been committed to OpenSSH 9.1 in FreeBSD.

Some other notable items from the release notes:

 * ssh(1): add a new EnableEscapeCommandline ssh_config(5) option that
   controls whether the client-side ~C escape sequence that provides a
   command-line is available. Among other things, the ~C command-line
   could be used to add additional port-forwards at runtime.

 * sshd(8): add support for channel inactivity timeouts via a new
   sshd_config(5) ChannelTimeout directive. This allows channels that
   have not seen traffic in a configurable interval to be
   automatically closed. Different timeouts may be applied to session,
   X11, agent and TCP forwarding channels.

 * sshd(8): add a sshd_config UnusedConnectionTimeout option to
   terminate client connections that have no open channels for a
   length of time. This complements the ChannelTimeout option above.
    
 * sshd(8): add a -V (version) option to sshd like the ssh client has.

 * scp(1), sftp(1): add a -X option to both scp(1) and sftp(1) to
   allow control over some SFTP protocol parameters: the copy buffer
   length and the number of in-flight requests, both of which are used
   during upload/download. Previously these could be controlled in
   sftp(1) only. This makes them available in both SFTP protocol
   clients using the same option character sequence.
    
 * ssh-keyscan(1): allow scanning of complete CIDR address ranges,
   e.g.  "ssh-keyscan 192.168.0.0/24". If a CIDR range is passed, then
   it will be expanded to all possible addresses in the range
   including the all-0s and all-1s addresses. bz#976

 * ssh(1): support dynamic remote port forwarding in escape
   command-line's -R processing. bz#3499

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2023-02-06 16:54:56 -05:00
Ed Maste
2e82822057 ssh: Be more paranoid with host/domain names coming from the
never write a name with bad characters to a known_hosts file.

replace recently-added valid_domain() check for hostnames going to
known_hosts with a more relaxed check for bad characters.

Obtained from:	OpenSSH-portable commit 445363433ba2
Obtained from:	OpenSSH-portable commit 3cae9f92a318
Sponsored by:	The FreeBSD Foundation
2023-02-06 12:06:26 -05:00
Ed Maste
94e21add45 ssh: fix bug in PermitRemoteOpen which caused it to ignore...
its first argument unless it was one of the special keywords "any" or
"none".

Obtained from:	OpenSSH-portable commit b3daa8dc5823
Sponsored by:	The FreeBSD Foundation
2023-02-06 11:33:38 -05:00
Ed Maste
fe1371e8f3 ssh: fix double-free caused by compat_kex_proposal()
Security:	CVE-2023-25136
Obtained from:	OpenSSH-portable commit 12da78233364
Sponsored by:	The FreeBSD Foundation
2023-02-06 11:31:18 -05:00
Ed Maste
c755a7cc1e ssh: remove old reference from update instructions
ssh_config and ssh_config.5 no longer contain the VersionAddendum,
so remove instructions to update these files.

Fixes:		bffe60ead0 ("ssh: retire client VersionAddendum")
Sponsored By:	The FreeBSD Foundation
2023-02-05 13:17:46 -05:00
Ed Maste
9b7eddfeed openssh: remove mention of now-unused svn:keywords
Reported by:	gshapiro
2023-01-16 10:56:27 -05:00
Ed Maste
8974fa4515 ssh: describe two additional changes present in base system ssh
Sponsored by:	The FreeBSD Foundation
2022-12-13 09:45:56 -05:00
Ed Maste
a752e011a8 ssh: remove note about local change to [Use]PrivilegeSeparation
We documented "[Use]PrivilegeSeparation defaults to sandbox" as one of
our modifications to ssh's server-side defaults, but this is not (any
longer) a difference from upstream.

Sponsored by:	The FreeBSD Foundation
2022-12-12 17:07:27 -05:00
Ed Maste
c72f259727 ssh: remove VersionAddendum from list of client side config changes
Fixes: bffe60ead0 ("ssh: retire client VersionAddendum")
Sponsored by:	The FreeBSD Foundation
2022-11-14 15:33:51 -05:00
Ed Maste
733bf3b108 ssh: update comment text to match upstream
Reported by:	bz
Obtained from:	OpenSSH dffa64480163
2022-11-09 11:32:47 -05:00
Ed Maste
4232f36eda sshd: sync tracing disable with upstream
Old versions of FreeBSD do not support using id 0 to refer to the
current pid for procctl, so pass getpid() explicitly.

Although this is not required in current FreeBSD branches I am merging
it to reduce differences with upstream.

Obtained from:	OpenSSH commit 0f7e1eba5525
2022-11-07 12:23:00 -05:00
Ed Maste
0657b2325d ssh: correct parse_cert_times case for hex "to" time
This appeared to be a copy-paste error from the "from" time case above.

Reported by:	Coverity Scan
CID:		1500407
Reviewed by:	markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37252
2022-11-03 10:10:28 -04:00
Ed Maste
38a52bd3b5 ssh: update to OpenSSH 9.1p1
Release notes are available at https://www.openssh.com/txt/release-9.1

9.1 contains fixes for three minor memory safety problems; these have
lready been merged to the copy of OpenSSH 9.0 that is in the FreeBSD base
system.

Some highlights copied from the release notes:

Potentially-incompatible changes
--------------------------------

 * ssh(1), sshd(8): SetEnv directives in ssh_config and sshd_config
   are now first-match-wins to match other directives. Previously
   if an environment variable was multiply specified the last set
   value would have been used. bz3438

 * ssh-keygen(8): ssh-keygen -A (generate all default host key types)
   will no longer generate DSA keys, as these are insecure and have
   not been used by default for some years.

New features
------------

 * ssh(1), sshd(8): add a RequiredRSASize directive to set a minimum
   RSA key length. Keys below this length will be ignored for user
   authentication and for host authentication in sshd(8).

 * sftp-server(8): add a "users-groups-by-id@openssh.com" extension
   request that allows the client to obtain user/group names that
   correspond to a set of uids/gids.

 * sftp(1): use "users-groups-by-id@openssh.com" sftp-server
   extension (when available) to fill in user/group names for
   directory listings.

 * sftp-server(8): support the "home-directory" extension request
   defined in draft-ietf-secsh-filexfer-extensions-00. This overlaps
   a bit with the existing "expand-path@openssh.com", but some other
   clients support it.

 * ssh-keygen(1), sshd(8): allow certificate validity intervals,
   sshsig verification times and authorized_keys expiry-time options
   to accept dates in the UTC time zone in addition to the default
   of interpreting them in the system time zone. YYYYMMDD and
   YYMMDDHHMM[SS] dates/times will be interpreted as UTC if suffixed
   with a 'Z' character.

   Also allow certificate validity intervals to be specified in raw
   seconds-since-epoch as hex value, e.g. -V 0x1234:0x4567890. This
   is intended for use by regress tests and other tools that call
   ssh-keygen as part of a CA workflow. bz3468

 * sftp(1): allow arguments to the sftp -D option, e.g. sftp -D
   "/usr/libexec/sftp-server -el debug3"

 * ssh-keygen(1): allow the existing -U (use agent) flag to work
   with "-Y sign" operations, where it will be interpreted to require
   that the private keys is hosted in an agent; bz3429

MFC after:	2 weeks
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2022-10-19 10:27:11 -04:00
Ed Maste
fca7ac55f8 ssh: remove pre- and post-merge update steps
We no longer use the pre- and post-merge scripts to strip/add RCS tags.
The tags have been removed from main, but persist on older branches.

While here renumber the steps in the update documentation using a more
conventional scheme.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36904
2022-10-12 13:54:08 -04:00
Ed Maste
a1e39f96d2 nanobsd: remove unmodified copies of ssh config files
Nanobsd included copies of ssh_config and sshd_config.  The former is
identical to the one provided by the base system, and the latter is
identical except for PermitRootLogin, which is updated by nanobsd's
cust_allow_ssh_root anyhow.  Remove nanobsd's copies and use the
existing base system ones.

Reported by:	Jose Luis Duran <jlduran@gmail.com> in D34937
Reviewed by:	Jose Luis Duran <jlduran@gmail.com>, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36933
2022-10-11 12:53:57 -04:00
Ed Maste
963c7b084b ssh-keysign: fix double free in error path
From OpenSSH-portable commit 141535b904b6, OpenBSD commit 3d21aa127b1f.

MFC after:		3 days
2022-10-04 16:34:37 -04:00
Ed Maste
666605ad2d ssh-keygen: fix double free in error path
From OpenSSH-portable commit 5062ad48814b, OpenBSD commit 39f35e16ba87.

MFC after:	3 days
2022-10-04 16:33:11 -04:00
Ed Maste
5e5ebbee81 ssh-keyscan: Strictly enforce the maximum allowed SSH2 banner size
From OpenSSH-portable commit ff89b1bed807, OpenBSD commit 6ae664f9f4db.

MFC after:	3 days
2022-10-04 16:30:00 -04:00
Ed Maste
6f7bc8e7a3 ssh: describe deprecated options in general in update doc
Rename "HPN" to more general "Retired patches."  We handle two now-
removed patches the same way: to avoid breaking existing configurations
we accept, but ignore, the option.

Sponsored by:	The FreeBSD Foundation
2022-09-04 20:11:03 -04:00
Ed Maste
97be6fced7 openssh: Remove description of VersionAddendum in upgrade doc 2022-08-19 10:39:17 -04:00
Ed Maste
bffe60ead0 ssh: retire client VersionAddendum
FreeBSD introduced VersionAddendum for the server as a local change in
2001 in commit 933ca70f8f and later extended it to the client in
commit 9e2cbe04ff.

In 2012 upstream added support for server VersionAddendum, in commit
23528816dc10.  They do not support it for the client.

The argument for supporting this in the client is not nearly as strong
as for the server, so retire this option to reduce the scope of our
local patch set.  This also avoids some cases of conflicts in ssh_config
during update, as a user's configuration would typically follow the
commented-out default VersionAddendum value.

Reviewed by:	gordon, glebius
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32930
2022-08-19 10:38:42 -04:00
Ed Maste
9f009e066f sshd_config: clarify password authentication options
Passwords may be accepted by both the PasswordAuthentication and
KbdInteractiveAuthentication authentication schemes.  Add a reference to
the latter in the description/comment for PasswordAuthentication, as it
otherwise may seem that "PasswordAuthentication no" implies passwords
will be disallowed.

This situation should be clarified with more extensive documentation on
the authentication schemes and configuration options, but that should be
done in coordination with upstream OpenSSH.  This is a minimal change
that will hopefully clarify the situation without requiring an extensive
local patch set.

PR:		263045
Reviewed by:	manu (earlier version)
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35272
2022-06-08 16:20:46 -04:00