mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
Full release notes are available at https://www.openssh.com/txt/release-10.4 Selected highlights from the release notes: Potentially-incompatible changes -------------------------------- * sshd(8): configuration dump mode ("sshd -G") now writes directives in mixed case (e.g. "PubkeyAuthentication") whereas previously it emitted only lower-case names. * ssh(1), sshd(8): make the transport protocol stricter by disconnecting if the peer sends non-KEX messages during a post- authentication key re-exchange. Previously a malicious peer could continue sending non-key exchange messages without penalty. These would be buffered, causing memory to be wasted up until the connection terminated or the server/client hit a memory limit. Implementations that do not restrict messages sent during key exchange as per RFC4253 section 7.1 may be disconnected. Reported by Marko Jevtic. Changes since OpenSSH 10.3 ========================== This release contains a number of security fixes as well as general bugfixes and a couple of new features. Security ======== * sftp(1): when downloading files on the command-line using "sftp host:/path .", a malicious server could cause the file to be downloaded to an unexpected location. This issue was identified by the Swival Security Scanner. * scp(1): when copying files between two remote destinations, do not allow a malicious server to write files to the parent directory of the intended target directory. This issue was identified by the Swival Security Scanner. * sshd(8): DisableForwarding=yes didn't override PermitTunnel=yes as it was documented to do. Note that PermitTunnel is not enabled by default. Reported independently by Huzaifa Sidhpurwala of Redhat and Marko Jevtic. * sshd(8): avoid a potential pre-authentication denial of service when GSSAPIAuthentication was enabled (this feature is off by default). This was not mitigated by MaxAuthTries, but would be penalised by PerSourcePenalties. This was reported by Manfred Kaiser of the milCERT AT (Austrian Ministry of Defence). * sshd(8): fix a number of cases where the minimum authentication delay was not being enforced. Reported by the Orange Cyberdefense Vulnerability Team. * ssh(1): fix a possible client-side use-after-free if the server changes its host key during a key reexchange. This was reported by Zhenpeng (Leo) Lin of Depthfirst. New features ------------ * All: add experimental support for a composite post-quantum signature scheme that combines ML-DSA 44 and Ed25519 as specified in draft-miller-sshm-mldsa44-ed25519-composite-sigs. This scheme is not enabled by default. To use it, you'll need to add it to HostKeyAlgorithms, PubkeyAcceptedAlgorithms, etc. Keys may be generated using "ssh-keygen -t mldsa44-ed25519". Bugfixes -------- * sshd(8): avoid sending observably different messages for valid vs invalid users in GSSAPIAuthentication (disabled by default). * ssh(1), sshd(8): fix several bugs that incorrectly classified bulk traffic as interactive. bz3972, bz3958 * ssh-keygen(1), ssh-add(1): skip unsupported key types when downloading resident keys from a FIDO token. Previously, downloads would abort when one was encountered. GHPR657 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58083
107 lines
3.5 KiB
C
107 lines
3.5 KiB
C
/* $OpenBSD: sshconnect.h,v 1.51 2026/07/06 07:49:58 djm Exp $ */
|
|
|
|
/*
|
|
* Copyright (c) 2000 Markus Friedl. All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
|
|
struct sshkey;
|
|
|
|
typedef struct Sensitive Sensitive;
|
|
struct Sensitive {
|
|
struct sshkey **keys;
|
|
int nkeys;
|
|
};
|
|
|
|
struct ssh_conn_info {
|
|
char *conn_hash_hex;
|
|
char *shorthost;
|
|
char *uidstr;
|
|
char *keyalias;
|
|
char *thishost;
|
|
char *host_arg;
|
|
char *portstr;
|
|
char *remhost;
|
|
char *remuser;
|
|
char *homedir;
|
|
char *locuser;
|
|
char *jmphost;
|
|
};
|
|
|
|
struct addrinfo;
|
|
struct ssh;
|
|
struct hostkeys;
|
|
|
|
/* default argument for client percent expansions, minus remote user */
|
|
#define DEFAULT_CLIENT_PERCENT_EXPAND_ARGS_NOUSER(conn_info) \
|
|
"L", conn_info->shorthost, \
|
|
"i", conn_info->uidstr, \
|
|
"k", conn_info->keyalias, \
|
|
"l", conn_info->thishost, \
|
|
"n", conn_info->host_arg, \
|
|
"p", conn_info->portstr, \
|
|
"d", conn_info->homedir, \
|
|
"h", conn_info->remhost, \
|
|
"u", conn_info->locuser, \
|
|
"j", conn_info->jmphost
|
|
|
|
/* same plus remote user and hash which has user as a component */
|
|
#define DEFAULT_CLIENT_PERCENT_EXPAND_ARGS(conn_info) \
|
|
DEFAULT_CLIENT_PERCENT_EXPAND_ARGS_NOUSER(conn_info), \
|
|
"C", conn_info->conn_hash_hex, \
|
|
"r", conn_info->remuser
|
|
|
|
int ssh_connect(struct ssh *, const char *, const char *,
|
|
struct addrinfo *, struct sockaddr_storage *, u_short,
|
|
int, int *, int);
|
|
void ssh_kill_proxy_command(void);
|
|
|
|
void ssh_login(struct ssh *, Sensitive *, const char *,
|
|
struct sockaddr_storage *, u_short, struct passwd *, int,
|
|
const struct ssh_conn_info *);
|
|
|
|
int verify_host_key(char *, struct sockaddr *, struct sshkey *,
|
|
const struct ssh_conn_info *);
|
|
|
|
void get_hostfile_hostname_ipaddr(char *, struct sockaddr *, u_short,
|
|
char **, char **);
|
|
|
|
void ssh_kex2(struct ssh *ssh, char *, struct sockaddr_storage *, u_short,
|
|
const struct ssh_conn_info *);
|
|
|
|
void ssh_userauth2(struct ssh *ssh, const char *, const char *,
|
|
char *, Sensitive *);
|
|
|
|
int ssh_local_cmd(const char *);
|
|
|
|
void maybe_add_key_to_agent(const char *, struct sshkey *,
|
|
const char *, const char *);
|
|
|
|
void load_hostkeys_command(struct hostkeys *, const char *,
|
|
const char *, const struct ssh_conn_info *,
|
|
const struct sshkey *, const char *);
|
|
|
|
int hostkey_accepted_by_hostkeyalgs(const struct sshkey *);
|
|
|
|
void ssh_conn_info_free(struct ssh_conn_info *);
|
|
struct ssh_conn_info *ssh_conn_info_dup(const struct ssh_conn_info *);
|