Up to [cvs.NetBSD.org] / src / crypto / external / bsd / openssh / dist
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
merge conflicts between OpenSSH-9.8 and 9.9
Import OpenSSH-9.9 (previous was 9.8) Changes: Future deprecation notice ========================= OpenSSH plans to remove support for the DSA signature algorithm in early 2025. This release disables DSA by default at compile time. DSA, as specified in the SSHv2 protocol, is inherently weak - being limited to a 160 bit private key and use of the SHA1 digest. Its estimated security level is only 80 bits symmetric equivalent. OpenSSH has disabled DSA keys by default since 2015 but has retained run-time optional support for them. DSA was the only mandatory-to- implement algorithm in the SSHv2 RFCs, mostly because alternative algorithms were encumbered by patents when the SSHv2 protocol was specified. This has not been the case for decades at this point and better algorithms are well supported by all actively-maintained SSH implementations. We do not consider the costs of maintaining DSA in OpenSSH to be justified and hope that removing it from OpenSSH can accelerate its wider deprecation in supporting cryptography libraries. Currently DSA is disabled at compile time. The final step of removing DSA support entirely is planned for the first OpenSSH release of 2025. DSA support may be re-enabled on OpenBSD by setting "DSAKEY=yes" in Makefile.inc. To enable DSA support in portable OpenSSH, pass the "--enable-dsa-keys" option to configure. Potentially-incompatible changes -------------------------------- * ssh(1): remove support for pre-authentication compression. OpenSSH has only supported post-authentication compression in the server for some years. Compression before authentication significantly increases the attack surface of SSH servers and risks creating oracles that reveal information about information sent during authentication. * ssh(1), sshd(8): processing of the arguments to the "Match" configuration directive now follows more shell-like rules for quoted strings, including allowing nested quotes and \-escaped characters. If configurations contained workarounds for the previous simplistic quote handling then they may need to be adjusted. If this is the case, it's most likely to be in the arguments to a "Match exec" confition. In this case, moving the command to be evaluated from the Match line to an external shell script is easiest way to preserve compatibility with both the old and new versions. Changes since OpenSSH 9.8 ========================= This release contains a number of new features and bugfixes. New features ------------ * ssh(1), sshd(8): add support for a new hybrid post-quantum key exchange based on the FIPS 203 Module-Lattice Key Enapsulation mechanism (ML-KEM) combined with X25519 ECDH as described by https://datatracker.ietf.org/doc/html/draft-kampanakis-curdle-ssh-pq-ke-03 This algorithm "mlkem768x25519-sha256" is available by default. * ssh(1): the ssh_config "Include" directive can now expand environment as well as the same set of %-tokens "Match Exec" supports. * sshd(8): add a sshd_config "RefuseConnection" option that, if set will terminate the connection at the first authentication request. * sshd(8): add a "refuseconnection" penalty class to sshd_config PerSourcePenalties that is applied when a connection is dropped by the new RefuseConnection keyword. * sshd(8): add a "Match invalid-user" predicate to sshd_config Match options that matches when the target username is not valid on the server. * ssh(1), sshd(8): update the Streamlined NTRUPrime code to a substantially faster implementation. * ssh(1), sshd(8): the hybrid Streamlined NTRUPrime/X25519 key exchange algorithm now has an IANA-assigned name in addition to the "@openssh.com" vendor extension name. This algorithm is now also available under this name "sntrup761x25519-sha512" * ssh(1), sshd(8), ssh-agent(1): prevent private keys from being included in core dump files for most of their lifespans. This is in addition to pre-existing controls in ssh-agent(1) and sshd(8) that prevented coredumps. This feature is supported on OpenBSD, Linux and FreeBSD. * All: convert key handling to use the libcrypto EVP_PKEY API, with the exception of DSA. * sshd(8): add a random amount of jitter (up to 4 seconds) to the grace login time to make its expiry unpredictable. Bugfixes -------- * sshd(8): relax absolute path requirement back to what it was prior to OpenSSH 9.8, which incorrectly required that sshd was started with an absolute path in inetd mode. bz3717 * sshd(8): fix regression introduced in openssh-9.8 that swapped the order of source and destination addresses in some sshd log messages. * sshd(8): do not apply authorized_keys options when signature verification fails. Prevents more restrictive key options being incorrectly applied to subsequent keys in authorized_keys. bz3733 * ssh-keygen(1): include pathname in some of ssh-keygen's passphrase prompts. Helps the user know what's going on when ssh-keygen is invoked via other tools. Requested in GHPR503 * ssh(1), ssh-add(1): make parsing user@host consistently look for the last '@' in the string rather than the first. This makes it possible to more consistently use usernames that contain '@' characters. * ssh(1), sshd(8): be more strict in parsing key type names. Only allow short names (e.g "rsa") in user-interface code and require full SSH protocol names (e.g. "ssh-rsa") everywhere else. bz3725 * regress: many performance and correctness improvements to the re-keying regression test. * ssh-keygen(1): clarify that ed25519 is the default key type generated and clarify that rsa-sha2-512 is the default signature scheme when RSA is in use. GHPR505 * sshd(8): fix minor memory leak in Subsystem option parsing; GHPR515 * All: additional hardening and consistency checks for the sshbuf code. * sshd(8): reduce default logingrace penalty to ensure that a single forgotton login that times out will be below the penalty threshold. * ssh(1): fix proxy multiplexing (-O proxy) bug. If a mux started with ControlPersist then later has a forwarding added using mux proxy connection and the forwarding was used, then when the mux proxy session terminated, the mux master process would issue a bad message that terminated the connection. Portability ----------- * sync contrib/ssh-copy-id to the latest upstream version. * regress: improve portablility for some awk(1) usage (e.g. Solaris) * In the contrib/redhat RPM spec file, without_openssl was previously incorrectly enabled unconditionally. * sshd(8) restore audit call before exit that regressed in openssh-9.8 Fixes an issue where the SSH_CONNECTION_ABANDON event was not recorded. * sshd(8): add support for class-imposed loging restrictions on FreeBSD. Allowing auth_hostok(3) and auth_timeok(3) to control logins. * Build fixes for Musl libc. * Fix detection of setres*id on GNU/Hurd
Merge changes between 9.6 and 9.7; re-enable DSS.
Import OpenSSH-9.7 (previous was 9.6) Future deprecation notice ========================= OpenSSH plans to remove support for the DSA signature algorithm in early 2025 and compile-time disable it later this year. DSA, as specified in the SSHv2 protocol, is inherently weak - being limited to a 160 bit private key and use of the SHA1 digest. Its estimated security level is only 80 bits symmetric equivalent. OpenSSH has disabled DSA keys by default since 2015 but has retained run-time optional support for them. DSA was the only mandatory-to- implement algorithm in the SSHv2 RFCs[3], mostly because alternative algorithms were encumbered by patents when the SSHv2 protocol was specified. This has not been the case for decades at this point and better algorithms are well supported by all actively-maintained SSH implementations. We do not consider the costs of maintaining DSA in OpenSSH to be justified and hope that removing it from OpenSSH can accelerate its wider deprecation in supporting cryptography libraries. This release makes DSA support in OpenSSH compile-time optional, defaulting to on. We intend the next release to change the default to disable DSA at compile time. The first OpenSSH release of 2025 will remove DSA support entirely. Changes since OpenSSH 9.6 ========================= This release contains mostly bugfixes. New features ------------ * ssh(1), sshd(8): add a "global" ChannelTimeout type that watches all open channels and will close all open channels if there is no traffic on any of them for the specified interval. This is in addition to the existing per-channel timeouts added recently. This supports situations like having both session and x11 forwarding channels open where one may be idle for an extended period but the other is actively used. The global timeout could close both channels when both have been idle for too long. * All: make DSA key support compile-time optional, defaulting to on. Bugfixes -------- * sshd(8): don't append an unnecessary space to the end of subsystem arguments (bz3667) * ssh(1): fix the multiplexing "channel proxy" mode, broken when keystroke timing obfuscation was added. (GHPR#463) * ssh(1), sshd(8): fix spurious configuration parsing errors when options that accept array arguments are overridden (bz3657). * ssh-agent(1): fix potential spin in signal handler (bz3670) * Many fixes to manual pages and other documentation, including GHPR#462, GHPR#454, GHPR#442 and GHPR#441. * Greatly improve interop testing against PuTTY. Portability ----------- * Improve the error message when the autoconf OpenSSL header check fails (bz#3668) * Improve detection of broken toolchain -fzero-call-used-regs support (bz3645). * Fix regress/misc/fuzz-harness fuzzers and make them compile without warnings when using clang16
Pull up the following, requested by kim in ticket #1780: crypto/external/bsd/openssh/Makefile.inc up to 1.15 (+patch) crypto/external/bsd/openssh/bin/Makefile.inc up to 1.4 crypto/external/bsd/openssh/bin/scp/Makefile up to 1.6 crypto/external/bsd/openssh/bin/sftp/Makefile up to 1.11 crypto/external/bsd/openssh/bin/sftp-server/Makefile up to 1.4 crypto/external/bsd/openssh/bin/ssh/Makefile up to 1.20 crypto/external/bsd/openssh/bin/ssh-add/Makefile up to 1.3 crypto/external/bsd/openssh/bin/ssh-agent/Makefile up to 1.7 crypto/external/bsd/openssh/bin/ssh-keygen/Makefile up to 1.10 crypto/external/bsd/openssh/bin/ssh-keyscan/Makefile up to 1.6 crypto/external/bsd/openssh/bin/ssh-pkcs11-helper/Makefile up to 1.4 crypto/external/bsd/openssh/bin/sshd/Makefile up to 1.27 (+patch) crypto/external/bsd/openssh/dist/PROTOCOL.sshsig up to 1.1.1.2 crypto/external/bsd/openssh/dist/srclimit.c up to 1.3 crypto/external/bsd/openssh/dist/sftp-realpath.c up to 1.3 crypto/external/bsd/openssh/dist/sntrup761.c up to 1.3 crypto/external/bsd/openssh/dist/sntrup761.sh up to 1.1.1.2 crypto/external/bsd/openssh/dist/sshsig.c up to 1.12 crypto/external/bsd/openssh/dist/sshsig.h up to 1.1.1.5 crypto/external/bsd/openssh/dist/addr.c up to 1.6 crypto/external/bsd/openssh/dist/PROTOCOL.u2f up to 1.1.1.3 crypto/external/bsd/openssh/dist/sk-api.h up to 1.1.1.6 crypto/external/bsd/openssh/dist/sk-usbhid.c up to 1.9 crypto/external/bsd/openssh/dist/ssh-ecdsa-sk.c up to 1.4 crypto/external/bsd/openssh/dist/ssh-ed25519-sk.c up to 1.5 crypto/external/bsd/openssh/dist/ssh-sk-client.c up to 1.6 crypto/external/bsd/openssh/dist/ssh-sk-helper.8 up to 1.1.1.2 crypto/external/bsd/openssh/dist/ssh-sk-helper.c up to 1.7 crypto/external/bsd/openssh/dist/ssh-sk.c up to 1.8 crypto/external/bsd/openssh/dist/ssh-sk.h up to 1.1.1.2 crypto/external/bsd/openssh/dist/sshbuf-io.c up to 1.2 crypto/external/bsd/openssh/dist/addr.h up to 1.1.1.2 crypto/external/bsd/openssh/dist/kexsntrup761x25519.c up to 1.3 crypto/external/bsd/openssh/dist/cipher-chachapoly-libcrypto.c up to 1.3 crypto/external/bsd/openssh/dist/srclimit.h up to 1.1.1.1 crypto/external/bsd/openssh/dist/auth2-pubkeyfile.c up to 1.3 crypto/external/bsd/openssh/dist/sftp-usergroup.c up to 1.3 crypto/external/bsd/openssh/dist/sftp-usergroup.h up to 1.1.1.1 crypto/external/bsd/openssh/dist/ed25519.sh up to 1.1.1.1 crypto/external/bsd/openssh/dist/crc32.c delete crypto/external/bsd/openssh/dist/crc32.h delete crypto/external/bsd/openssh/dist/fe25519.c delete crypto/external/bsd/openssh/dist/fe25519.h delete crypto/external/bsd/openssh/dist/ge25519.c delete crypto/external/bsd/openssh/dist/ge25519.h delete crypto/external/bsd/openssh/dist/ge25519_base.data delete crypto/external/bsd/openssh/dist/kexsntrup4591761x25519.c delete crypto/external/bsd/openssh/dist/sc25519.c delete crypto/external/bsd/openssh/dist/sc25519.h delete crypto/external/bsd/openssh/dist/sntrup4591761.c delete crypto/external/bsd/openssh/dist/sntrup4591761.sh delete crypto/external/bsd/openssh/dist/uuencode.c delete crypto/external/bsd/openssh/dist/uuencode.h delete crypto/external/bsd/openssh/dist/verify.c delete crypto/external/bsd/openssh/dist/LICENCE up to 1.7 crypto/external/bsd/openssh/dist/PROTOCOL up to 1.23 crypto/external/bsd/openssh/dist/PROTOCOL.agent up to 1.15 crypto/external/bsd/openssh/dist/PROTOCOL.certkeys up to 1.13 crypto/external/bsd/openssh/dist/PROTOCOL.chacha20poly1305 up to 1.1.1.4 crypto/external/bsd/openssh/dist/PROTOCOL.key up to 1.1.1.3 crypto/external/bsd/openssh/dist/PROTOCOL.krl up to 1.1.1.5 crypto/external/bsd/openssh/dist/PROTOCOL.mux up to 1.12 crypto/external/bsd/openssh/dist/addrmatch.c up to 1.15 crypto/external/bsd/openssh/dist/auth-krb5.c up to 1.16 crypto/external/bsd/openssh/dist/auth-options.c up to 1.29 crypto/external/bsd/openssh/dist/auth-options.h up to 1.15 crypto/external/bsd/openssh/dist/auth-pam.c up to 1.21 crypto/external/bsd/openssh/dist/auth-passwd.c up to 1.13 crypto/external/bsd/openssh/dist/auth-rhosts.c up to 1.16 crypto/external/bsd/openssh/dist/auth.c up to 1.34 crypto/external/bsd/openssh/dist/auth.h up to 1.23 crypto/external/bsd/openssh/dist/auth2-chall.c up to 1.19 crypto/external/bsd/openssh/dist/auth2-gss.c up to 1.17 crypto/external/bsd/openssh/dist/auth2-hostbased.c up to 1.23 crypto/external/bsd/openssh/dist/auth2-kbdint.c up to 1.15 crypto/external/bsd/openssh/dist/auth2-krb5.c up to 1.10 crypto/external/bsd/openssh/dist/auth2-none.c up to 1.14 crypto/external/bsd/openssh/dist/auth2-passwd.c up to 1.16 crypto/external/bsd/openssh/dist/auth2-pubkey.c up to 1.34 crypto/external/bsd/openssh/dist/auth2.c up to 1.29 crypto/external/bsd/openssh/dist/authfd.c up to 1.27 crypto/external/bsd/openssh/dist/authfd.h up to 1.17 crypto/external/bsd/openssh/dist/authfile.c up to 1.28 crypto/external/bsd/openssh/dist/authfile.h up to 1.10 crypto/external/bsd/openssh/dist/canohost.c up to 1.16 crypto/external/bsd/openssh/dist/chacha.c up to 1.6 crypto/external/bsd/openssh/dist/chacha.h up to 1.3 crypto/external/bsd/openssh/dist/channels.c up to 1.42 crypto/external/bsd/openssh/dist/channels.h up to 1.26 crypto/external/bsd/openssh/dist/cipher-chachapoly.c up to 1.7 crypto/external/bsd/openssh/dist/cipher-chachapoly.h up to 1.3 crypto/external/bsd/openssh/dist/cipher.c up to 1.21 crypto/external/bsd/openssh/dist/cipher.h up to 1.17 crypto/external/bsd/openssh/dist/clientloop.c up to 1.39 crypto/external/bsd/openssh/dist/clientloop.h up to 1.18 crypto/external/bsd/openssh/dist/compat.c up to 1.26 crypto/external/bsd/openssh/dist/compat.h up to 1.18 crypto/external/bsd/openssh/dist/crypto_api.h up to 1.5 crypto/external/bsd/openssh/dist/dh.c up to 1.20 crypto/external/bsd/openssh/dist/dh.h up to 1.13 crypto/external/bsd/openssh/dist/digest-libc.c up to 1.8 crypto/external/bsd/openssh/dist/digest-openssl.c up to 1.9 crypto/external/bsd/openssh/dist/dispatch.c up to 1.11 crypto/external/bsd/openssh/dist/dns.c up to 1.23 crypto/external/bsd/openssh/dist/dns.h up to 1.13 crypto/external/bsd/openssh/dist/ed25519.c up to 1.6 crypto/external/bsd/openssh/dist/fatal.c up to 1.7 crypto/external/bsd/openssh/dist/getrrsetbyname.c up to 1.6 crypto/external/bsd/openssh/dist/gss-genr.c up to 1.11 crypto/external/bsd/openssh/dist/gss-serv.c up to 1.15 crypto/external/bsd/openssh/dist/hash.c up to 1.7 crypto/external/bsd/openssh/dist/hmac.c up to 1.8 crypto/external/bsd/openssh/dist/hostfile.c up to 1.23 crypto/external/bsd/openssh/dist/hostfile.h up to 1.11 crypto/external/bsd/openssh/dist/includes.h up to 1.9 crypto/external/bsd/openssh/dist/kex.c up to 1.34 crypto/external/bsd/openssh/dist/kex.h up to 1.24 crypto/external/bsd/openssh/dist/kexdh.c up to 1.10 crypto/external/bsd/openssh/dist/kexgen.c up to 1.7 crypto/external/bsd/openssh/dist/kexgexc.c up to 1.17 crypto/external/bsd/openssh/dist/kexgexs.c up to 1.23 crypto/external/bsd/openssh/dist/krl.c up to 1.23 crypto/external/bsd/openssh/dist/krl.h up to 1.6 crypto/external/bsd/openssh/dist/ldapauth.c up to 1.8 crypto/external/bsd/openssh/dist/ldapauth.h up to 1.6 crypto/external/bsd/openssh/dist/log.c up to 1.27 crypto/external/bsd/openssh/dist/log.h up to 1.17 crypto/external/bsd/openssh/dist/mac.c up to 1.16 crypto/external/bsd/openssh/dist/match.c up to 1.16 crypto/external/bsd/openssh/dist/match.h up to 1.11 crypto/external/bsd/openssh/dist/misc.c up to 1.35 crypto/external/bsd/openssh/dist/misc.h up to 1.27 crypto/external/bsd/openssh/dist/moduli up to 1.10 crypto/external/bsd/openssh/dist/moduli.c up to 1.17 crypto/external/bsd/openssh/dist/monitor.c up to 1.43 crypto/external/bsd/openssh/dist/monitor.h up to 1.13 crypto/external/bsd/openssh/dist/monitor_fdpass.c up to 1.9 crypto/external/bsd/openssh/dist/monitor_wrap.c up to 1.34 crypto/external/bsd/openssh/dist/monitor_wrap.h up to 1.23 crypto/external/bsd/openssh/dist/msg.c up to 1.11 crypto/external/bsd/openssh/dist/mux.c up to 1.35 crypto/external/bsd/openssh/dist/myproposal.h up to 1.24 crypto/external/bsd/openssh/dist/namespace.h up to 1.10 crypto/external/bsd/openssh/dist/nchan.c up to 1.14 crypto/external/bsd/openssh/dist/packet.c up to 1.50 crypto/external/bsd/openssh/dist/packet.h up to 1.26 crypto/external/bsd/openssh/dist/pathnames.h up to 1.15 crypto/external/bsd/openssh/dist/pfilter.c up to 1.8 (+patch) crypto/external/bsd/openssh/dist/poly1305.c up to 1.6 crypto/external/bsd/openssh/dist/progressmeter.c up to 1.15 crypto/external/bsd/openssh/dist/readconf.c up to 1.44 crypto/external/bsd/openssh/dist/readconf.h up to 1.34 crypto/external/bsd/openssh/dist/readpass.c up to 1.18 crypto/external/bsd/openssh/dist/rijndael.h up to 1.3 crypto/external/bsd/openssh/dist/sandbox-pledge.c up to 1.3 crypto/external/bsd/openssh/dist/sandbox-rlimit.c up to 1.7 crypto/external/bsd/openssh/dist/scp.1 up to 1.31 crypto/external/bsd/openssh/dist/scp.c up to 1.41 crypto/external/bsd/openssh/dist/servconf.c up to 1.44 crypto/external/bsd/openssh/dist/servconf.h up to 1.30 crypto/external/bsd/openssh/dist/serverloop.c up to 1.35 crypto/external/bsd/openssh/dist/session.c up to 1.38 crypto/external/bsd/openssh/dist/session.h up to 1.10 crypto/external/bsd/openssh/dist/sftp-client.c up to 1.35 crypto/external/bsd/openssh/dist/sftp-client.h up to 1.18 crypto/external/bsd/openssh/dist/sftp-common.c up to 1.14 crypto/external/bsd/openssh/dist/sftp-common.h up to 1.8 crypto/external/bsd/openssh/dist/sftp-glob.c up to 1.15 crypto/external/bsd/openssh/dist/sftp-server-main.c up to 1.8 crypto/external/bsd/openssh/dist/sftp-server.8 up to 1.14 crypto/external/bsd/openssh/dist/sftp-server.c up to 1.30 crypto/external/bsd/openssh/dist/sftp.1 up to 1.30 crypto/external/bsd/openssh/dist/sftp.c up to 1.39 crypto/external/bsd/openssh/dist/ssh-add.1 up to 1.18 crypto/external/bsd/openssh/dist/ssh-add.c up to 1.30 crypto/external/bsd/openssh/dist/ssh-agent.1 up to 1.19 crypto/external/bsd/openssh/dist/ssh-agent.c up to 1.37 crypto/external/bsd/openssh/dist/ssh-dss.c up to 1.18 crypto/external/bsd/openssh/dist/ssh-ecdsa.c up to 1.15 crypto/external/bsd/openssh/dist/ssh-ed25519.c up to 1.10 crypto/external/bsd/openssh/dist/ssh-gss.h up to 1.10 crypto/external/bsd/openssh/dist/ssh-keygen.1 up to 1.34 crypto/external/bsd/openssh/dist/ssh-keygen.c up to 1.46 crypto/external/bsd/openssh/dist/ssh-keyscan.1 up to 1.18 crypto/external/bsd/openssh/dist/ssh-keyscan.c up to 1.32 crypto/external/bsd/openssh/dist/ssh-keysign.8 up to 1.14 crypto/external/bsd/openssh/dist/ssh-keysign.c up to 1.24 crypto/external/bsd/openssh/dist/ssh-pkcs11-client.c up to 1.19 crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.8 up to 1.12 crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.c up to 1.22 crypto/external/bsd/openssh/dist/ssh-pkcs11.c up to 1.26 crypto/external/bsd/openssh/dist/ssh-pkcs11.h up to 1.9 crypto/external/bsd/openssh/dist/ssh-rsa.c up to 1.19 crypto/external/bsd/openssh/dist/ssh-xmss.c up to 1.6 crypto/external/bsd/openssh/dist/ssh.1 up to 1.39 crypto/external/bsd/openssh/dist/ssh.c up to 1.45 crypto/external/bsd/openssh/dist/ssh.h up to 1.13 crypto/external/bsd/openssh/dist/ssh2.h up to 1.15 crypto/external/bsd/openssh/dist/ssh_api.c up to 1.15 crypto/external/bsd/openssh/dist/ssh_config up to 1.16 crypto/external/bsd/openssh/dist/ssh_config.5 up to 1.40 crypto/external/bsd/openssh/dist/sshbuf-getput-basic.c up to 1.12 crypto/external/bsd/openssh/dist/sshbuf-getput-crypto.c up to 1.11 crypto/external/bsd/openssh/dist/sshbuf-misc.c up to 1.14 crypto/external/bsd/openssh/dist/sshbuf.c up to 1.14 crypto/external/bsd/openssh/dist/sshbuf.h up to 1.19 crypto/external/bsd/openssh/dist/sshconnect.c up to 1.37 crypto/external/bsd/openssh/dist/sshconnect.h up to 1.17 crypto/external/bsd/openssh/dist/sshconnect2.c up to 1.46 crypto/external/bsd/openssh/dist/sshd.8 up to 1.31 crypto/external/bsd/openssh/dist/sshd.c up to 1.50 crypto/external/bsd/openssh/dist/sshd_config up to 1.28 crypto/external/bsd/openssh/dist/sshd_config.5 up to 1.42 crypto/external/bsd/openssh/dist/ssherr.c up to 1.10 crypto/external/bsd/openssh/dist/ssherr.h up to 1.4 crypto/external/bsd/openssh/dist/sshkey-xmss.c up to 1.10 crypto/external/bsd/openssh/dist/sshkey-xmss.h up to 1.5 crypto/external/bsd/openssh/dist/sshkey.c up to 1.32 crypto/external/bsd/openssh/dist/sshkey.h up to 1.19 crypto/external/bsd/openssh/dist/sshlogin.c up to 1.13 crypto/external/bsd/openssh/dist/sshpty.c up to 1.8 crypto/external/bsd/openssh/dist/ttymodes.c up to 1.12 crypto/external/bsd/openssh/dist/uidswap.c up to 1.10 crypto/external/bsd/openssh/dist/umac.c up to 1.22 crypto/external/bsd/openssh/dist/umac.h up to 1.10 crypto/external/bsd/openssh/dist/utf8.c up to 1.9 crypto/external/bsd/openssh/dist/utf8.h up to 1.5 crypto/external/bsd/openssh/dist/version.h up to 1.44 crypto/external/bsd/openssh/dist/xmalloc.c up to 1.13 crypto/external/bsd/openssh/dist/xmalloc.h up to 1.16 crypto/external/bsd/openssh/dist/xmss_hash.c up to 1.3 crypto/external/bsd/openssh/dist/moduli-gen/Makefile up to 1.3 crypto/external/bsd/openssh/dist/moduli-gen/moduli-gen.sh up to 1.1.1.3 crypto/external/bsd/openssh/dist/moduli-gen/moduli.2048 up to 1.16 crypto/external/bsd/openssh/dist/moduli-gen/moduli.3072 up to 1.18 crypto/external/bsd/openssh/dist/moduli-gen/moduli.4096 up to 1.18 crypto/external/bsd/openssh/dist/moduli-gen/moduli.6144 up to 1.18 crypto/external/bsd/openssh/dist/moduli-gen/moduli.7680 up to 1.18 crypto/external/bsd/openssh/dist/moduli-gen/moduli.8192 up to 1.18 crypto/external/bsd/openssh/lib/Makefile up to 1.38 crypto/external/bsd/openssh/lib/shlib_version up to 1.36 crypto/external/bsd/openssh/openssh2netbsd up to 1.4 lib/libpam/modules/pam_ssh/Makefile up to 1.13 lib/libpam/modules/pam_ssh/pam_ssh.c up to 1.30 distrib/sets/lists/base/shl.mi (apply patch) distrib/sets/lists/debug/shl.mi (apply patch) doc/3RDPARTY (apply patch) Update OpenSSH to 9.6.
Merge differences between openssh-8.8 and openssh-8.9
Import OpenSSH 8.9. Future deprecation notice ========================= A near-future release of OpenSSH will switch scp(1) from using the legacy scp/rcp protocol to using SFTP by default. Legacy scp/rcp performs wildcard expansion of remote filenames (e.g. "scp host:* .") through the remote shell. This has the side effect of requiring double quoting of shell meta-characters in file names included on scp(1) command-lines, otherwise they could be interpreted as shell commands on the remote side. This creates one area of potential incompatibility: scp(1) when using the SFTP protocol no longer requires this finicky and brittle quoting, and attempts to use it may cause transfers to fail. We consider the removal of the need for double-quoting shell characters in file names to be a benefit and do not intend to introduce bug-compatibility for legacy scp/rcp in scp(1) when using the SFTP protocol. Another area of potential incompatibility relates to the use of remote paths relative to other user's home directories, for example - "scp host:~user/file /tmp". The SFTP protocol has no native way to expand a ~user path. However, sftp-server(8) in OpenSSH 8.7 and later support a protocol extension "expand-path@openssh.com" to support this. Security Near Miss ================== * sshd(8): fix an integer overflow in the user authentication path that, in conjunction with other logic errors, could have yielded unauthenticated access under difficult to exploit conditions. This situation is not exploitable because of independent checks in the privilege separation monitor. Privilege separation has been enabled by default in since openssh-3.2.2 (released in 2002) and has been mandatory since openssh-7.5 (released in 2017). Moreover, portable OpenSSH has used toolchain features available in most modern compilers to abort on signed integer overflow since openssh-6.5 (released in 2014). Thanks to Malcolm Stagg for finding and reporting this bug. Potentially-incompatible changes ================================ * sshd(8), portable OpenSSH only: this release removes in-built support for MD5-hashed passwords. If you require these on your system then we recommend linking against libxcrypt or similar. * This release modifies the FIDO security key middleware interface and increments SSH_SK_VERSION_MAJOR. Changes since OpenSSH 8.8 ========================= This release includes a number of new features. New features ------------ * ssh(1), sshd(8), ssh-add(1), ssh-agent(1): add a system for restricting forwarding and use of keys added to ssh-agent(1) A detailed description of the feature is available at https://www.openssh.com/agent-restrict.html and the protocol extensions are documented in the PROTOCOL and PROTOCOL.agent files in the source release. * ssh(1), sshd(8): add the sntrup761x25519-sha512@openssh.com hybrid ECDH/x25519 + Streamlined NTRU Prime post-quantum KEX to the default KEXAlgorithms list (after the ECDH methods but before the prime-group DH ones). The next release of OpenSSH is likely to make this key exchange the default method. * ssh-keygen(1): when downloading resident keys from a FIDO token, pass back the user ID that was used when the key was created and append it to the filename the key is written to (if it is not the default). Avoids keys being clobbered if the user created multiple resident keys with the same application string but different user IDs. * ssh-keygen(1), ssh(1), ssh-agent(1): better handling for FIDO keys on tokens that provide user verification (UV) on the device itself, including biometric keys, avoiding unnecessary PIN prompts. * ssh-keygen(1): add "ssh-keygen -Y match-principals" operation to perform matching of principals names against an allowed signers file. To be used towards a TOFU model for SSH signatures in git. * ssh-add(1), ssh-agent(1): allow pin-required FIDO keys to be added to ssh-agent(1). $SSH_ASKPASS will be used to request the PIN at authentication time. * ssh-keygen(1): allow selection of hash at sshsig signing time (either sha512 (default) or sha256). * ssh(1), sshd(8): read network data directly to the packet input buffer instead indirectly via a small stack buffer. Provides a modest performance improvement. * ssh(1), sshd(8): read data directly to the channel input buffer, providing a similar modest performance improvement. * ssh(1): extend the PubkeyAuthentication configuration directive to accept yes|no|unbound|host-bound to allow control over one of the protocol extensions used to implement agent-restricted keys. Bugfixes -------- * sshd(8): document that CASignatureAlgorithms, ExposeAuthInfo and PubkeyAuthOptions can be used in a Match block. PR#277. * sshd(8): fix possible string truncation when constructing paths to .rhosts/.shosts files with very long user home directory names. * ssh-keysign(1): unbreak for KEX algorithms that use SHA384/512 exchange hashes * ssh(1): don't put the TTY into raw mode when SessionType=none, avoids ^C being unable to kill such a session. bz3360 * scp(1): fix some corner-case bugs in SFTP-mode handling of ~-prefixed paths. * ssh(1): unbreak hostbased auth using RSA keys. Allow ssh(1) to select RSA keys when only RSA/SHA2 signature algorithms are configured (this is the default case). Previously RSA keys were not being considered in the default case. * ssh-keysign(1): make ssh-keysign use the requested signature algorithm and not the default for the key type. Part of unbreaking hostbased auth for RSA/SHA2 keys. * ssh(1): stricter UpdateHostkey signature verification logic on the client- side. Require RSA/SHA2 signatures for RSA hostkeys except when RSA/SHA1 was explicitly negotiated during initial KEX; bz3375 * ssh(1), sshd(8): fix signature algorithm selection logic for UpdateHostkeys on the server side. The previous code tried to prefer RSA/SHA2 for hostkey proofs of RSA keys, but missed some cases. This will use RSA/SHA2 signatures for RSA keys if the client proposed these algorithms in initial KEX. bz3375 * All: convert all uses of select(2)/pselect(2) to poll(2)/ppoll(2). This includes the mainloops in ssh(1), ssh-agent(1), ssh-agent(1) and sftp-server(8), as well as the sshd(8) listen loop and all other FD read/writability checks. On platforms with missing or broken poll(2)/ppoll(2) syscalls a select(2)-based compat shim is available. * ssh-keygen(1): the "-Y find-principals" command was verifying key validity when using ca certs but not with simple key lifetimes within the allowed signers file. * ssh-keygen(1): make sshsig verify-time argument parsing optional * sshd(8): fix truncation in rhosts/shosts path construction. * ssh(1), ssh-agent(1): avoid xmalloc(0) for PKCS#11 keyid for ECDSA keys (we already did this for RSA keys). Avoids fatal errors for PKCS#11 libraries that return empty keyid, e.g. Microchip ATECC608B "cryptoauthlib"; bz#3364 * ssh(1), ssh-agent(1): improve the testing of credentials against inserted FIDO: ask the token whether a particular key belongs to it in cases where the token supports on-token user-verification (e.g. biometrics) rather than just assuming that it will accept it. Will reduce spurious "Confirm user presence" notifications for key handles that relate to FIDO keys that are not currently inserted in at least some cases. bz3366 * ssh(1), sshd(8): correct value for IPTOS_DSCP_LE. It needs to allow for the preceding two ECN bits. bz#3373 * ssh-keygen(1): add missing -O option to usage() for the "-Y sign" option. * ssh-keygen(1): fix a NULL deref when using the find-principals function, when matching an allowed_signers line that contains a namespace restriction, but no restriction specified on the command-line * ssh-agent(1): fix memleak in process_extension(); oss-fuzz issue #42719 * ssh(1): suppress "Connection to xxx closed" messages when LogLevel is set to "error" or above. bz3378 * ssh(1), sshd(8): use correct zlib flags when inflate(3)-ing compressed packet data. bz3372 * scp(1): when recursively transferring files in SFTP mode, create the destination directory if it doesn't already exist to match scp(1) in legacy RCP mode behaviour. * scp(1): many improvements in error message consistency between scp(1) in SFTP mode vs legacy RCP mode. * sshd(8): fix potential race in SIGTERM handling PR#289 * ssh(1), ssh(8): since DSA keys are deprecated, move them to the end of the default list of public keys so that they will be tried last. PR#295 * ssh-keygen(1): allow 'ssh-keygen -Y find-principals' to match wildcard principals in allowed_signers files Portability ----------- * ssh(1), sshd(8): don't trust closefrom(2) on Linux. glibc's implementation does not work in a chroot when the kernel does not have close_range(2). It tries to read from /proc/self/fd and when that fails dies with an assertion of sorts. Instead, call close_range(2) directly from our compat code and fall back if that fails. bz#3349, * OS X poll(2) is broken; use compat replacement. For character- special devices like /dev/null, Darwin's poll(2) returns POLLNVAL when polled with POLLIN. Apparently this is Apple bug 3710161 - not public but a websearch will find other OSS projects rediscovering it periodically since it was first identified in 2005. * Correct handling of exceptfds/POLLPRI in our select(2)-based poll(2)/ppoll(2) compat implementation. * Cygwin: correct checking of mbstowcs() return value. * Add a basic SECURITY.md that refers people to the openssh.com website. * Enable additional compiler warnings and toolchain hardening flags, including -Wbitwise-instead-of-logical, -Wmisleading-indentation, -fzero-call-used-regs and -ftrivial-auto-var-init. * HP/UX. Use compat getline(3) on HP-UX 10.x, where the libc version is not reliable.
Merge our changes from OpenSSH-8.6 to OpenSSH-8.7
Import OpenSSH-8.7: Imminent deprecation notice =========================== OpenSSH will disable the ssh-rsa signature scheme by default in the next release. In the SSH protocol, the "ssh-rsa" signature scheme uses the SHA-1 hash algorithm in conjunction with the RSA public key algorithm. It is now possible[1] to perform chosen-prefix attacks against the SHA-1 algorithm for less than USD$50K. Note that the deactivation of "ssh-rsa" signatures does not necessarily require cessation of use for RSA keys. In the SSH protocol, keys may be capable of signing using multiple algorithms. In particular, "ssh-rsa" keys are capable of signing using "rsa-sha2-256" (RSA/SHA256), "rsa-sha2-512" (RSA/SHA512) and "ssh-rsa" (RSA/SHA1). Only the last of these is being turned off by default. This algorithm is unfortunately still used widely despite the existence of better alternatives, being the only remaining public key signature algorithm specified by the original SSH RFCs that is still enabled by default. The better alternatives include: * The RFC8332 RSA SHA-2 signature algorithms rsa-sha2-256/512. These algorithms have the advantage of using the same key type as "ssh-rsa" but use the safe SHA-2 hash algorithms. These have been supported since OpenSSH 7.2 and are already used by default if the client and server support them. * The RFC8709 ssh-ed25519 signature algorithm. It has been supported in OpenSSH since release 6.5. * The RFC5656 ECDSA algorithms: ecdsa-sha2-nistp256/384/521. These have been supported by OpenSSH since release 5.7. To check whether a server is using the weak ssh-rsa public key algorithm, for host authentication, try to connect to it after removing the ssh-rsa algorithm from ssh(1)'s allowed list: ssh -oHostKeyAlgorithms=-ssh-rsa user@host If the host key verification fails and no other supported host key types are available, the server software on that host should be upgraded. OpenSSH recently enabled the UpdateHostKeys option by default to assist the client by automatically migrating to better algorithms. [1] "SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust" Leurent, G and Peyrin, T (2020) https://eprint.iacr.org/2020/014.pdf Potentially-incompatible changes ================================ This release includes a number of changes that may affect existing configurations: * scp(1): this release changes the behaviour of remote to remote copies (e.g. "scp host-a:/path host-b:") to transfer through the local host by default. This was previously available via the -3 flag. This mode avoids the need to expose credentials on the origin hop, avoids triplicate interpretation of filenames by the shell (by the local system, the copy origin and the destination) and, in conjunction with the SFTP support for scp(1) mentioned below, allows use of all authentication methods to the remote hosts (previously, only non-interactive methods could be used). A -R flag has been added to select the old behaviour. * ssh(1)/sshd(8): both the client and server are now using a stricter configuration file parser. The new parser uses more shell-like rules for quotes, space and escape characters. It is also more strict in rejecting configurations that include options lacking arguments. Previously some options (e.g. DenyUsers) could appear on a line with no subsequent arguments. This release will reject such configurations. The new parser will also reject configurations with unterminated quotes and multiple '=' characters after the option name. * ssh(1): when using SSHFP DNS records for host key verification, ssh(1) will verify all matching records instead of just those with the specific signature type requested. This may cause host key verification problems if stale SSHFP records of a different or legacy signature type exist alongside other records for a particular host. bz#3322 * ssh-keygen(1): when generating a FIDO key and specifying an explicit attestation challenge (using -Ochallenge), the challenge will now be hashed by the builtin security key middleware. This removes the (undocumented) requirement that challenges be exactly 32 bytes in length and matches the expectations of libfido2. * sshd(8): environment="..." directives in authorized_keys files are now first-match-wins and limited to 1024 discrete environment variable names. Changes since OpenSSH 8.6 ========================= This release contains a mix of new features and bug-fixes. New features ------------ - scp(1): experimental support for transfers using the SFTP protocol as a replacement for the venerable SCP/RCP protocol that it has traditionally used. SFTP offers more predictable filename handling and does not require expansion of glob(3) patterns via the shell on the remote side. SFTP support may be enabled via a temporary scp -s flag. It is intended for SFTP to become the default transfer mode in the near future, at which time the -s flag will be removed. The -O flag exists to force use of the original SCP/RCP protocol for cases where SFTP may be unavailable or incompatible. - sftp-server(8): add a protocol extension to support expansion of ~/ and ~user/ prefixed paths. This was added to support these paths when used by scp(1) while in SFTP mode. - ssh(1): add a ForkAfterAuthentication ssh_config(5) counterpart to the ssh(1) -f flag. GHPR#231 - ssh(1): add a StdinNull directive to ssh_config(5) that allows the config file to do the same thing as -n does on the ssh(1) command- line. GHPR#231 - ssh(1): add a SessionType directive to ssh_config, allowing the configuration file to offer equivalent control to the -N (no session) and -s (subsystem) command-line flags. GHPR#231 - ssh-keygen(1): allowed signers files used by ssh-keygen(1) signatures now support listing key validity intervals alongside they key, and ssh-keygen(1) can optionally check during signature verification whether a specified time falls inside this interval. This feature is intended for use by git to support signing and verifying objects using ssh keys. - ssh-keygen(8): support printing of the full public key in a sshsig signature via a -Oprint-pubkey flag. Bugfixes -------- * ssh(1)/sshd(8): start time-based re-keying exactly on schedule in the client and server mainloops. Previously the re-key timeout could expire but re-keying would not start until a packet was sent or received, causing a spin in select() if the connection was quiescent. * ssh-keygen(1): avoid Y2038 problem in printing certificate validity lifetimes. Dates past 2^31-1 seconds since epoch were displayed incorrectly on some platforms. bz#3329 * scp(1): allow spaces to appear in usernames for local to remote and scp -3 remote to remote copies. bz#1164 * ssh(1)/sshd(8): remove references to ChallengeResponseAuthentication in favour of KbdInteractiveAuthentication. The former is what was in SSHv1, the latter is what is in SSHv2 (RFC4256) and they were treated as somewhat but not entirely equivalent. We retain the old name as a deprecated alias so configuration files continue to work as well as a reference in the man page for people looking for it. bz#3303 * ssh(1)/ssh-add(1)/ssh-keygen(1): fix decoding of X.509 subject name when extracting a key from a PKCS#11 certificate. bz#3327 * ssh(1): restore blocking status on stdio fds before close. ssh(1) needs file descriptors in non-blocking mode to operate but it was not restoring the original state on exit. This could cause problems with fds shared with other programs via the shell, bz#3280 and GHPR#246 * ssh(1)/sshd(8): switch both client and server mainloops from select(3) to pselect(3). Avoids race conditions where a signal may arrive immediately before select(3) and not be processed until an event fires. bz#2158 * ssh(1): sessions started with ControlPersist were incorrectly executing a shell when the -N (no shell) option was specified. bz#3290 * ssh(1): check if IPQoS or TunnelDevice are already set before overriding. Prevents values in config files from overriding values supplied on the command line. bz#3319 * ssh(1): fix debug message when finding a private key to match a certificate being attempted for user authentication. Previously it would print the certificate's path, whereas it was supposed to be showing the private key's path. GHPR#247 * sshd(8): match host certificates against host public keys, not private keys. Allows use of certificates with private keys held in a ssh-agent. bz#3524 * ssh(1): add a workaround for a bug in OpenSSH 7.4 sshd(8), which allows RSA/SHA2 signatures for public key authentication but fails to advertise this correctly via SSH2_MSG_EXT_INFO. This causes clients of these server to incorrectly match PubkeyAcceptedAlgorithmse and potentially refuse to offer valid keys. bz#3213 * sftp(1)/scp(1): degrade gracefully if a sftp-server offers the limits@openssh.com extension but fails when the client tries to invoke it. bz#3318 * ssh(1): allow ssh_config SetEnv to override $TERM, which is otherwise handled specially by the protocol. Useful in ~/.ssh/config to set TERM to something generic (e.g. "xterm" instead of "xterm-256color") for destinations that lack terminfo entries. * sftp-server(8): the limits@openssh.com extension was incorrectly marked as an operation that writes to the filesystem, which made it unavailable in sftp-server read-only mode. bz#3318 * ssh(1): fix SEGV in UpdateHostkeys debug() message, triggered when the update removed more host keys than remain present. * many manual page fixes. Portability ----------- * ssh(1): move closefrom() to before first malloc. When built against tcmalloc, the closefrom() would stomp on file descriptors created for tcmalloc's internal use. bz#3321 * sshd(8): handle GIDs > 2^31 in getgrouplist. When compiled in 32bit mode, the getgrouplist implementation may fail for GIDs greater than LONG_MAX. * ssh(1): xstrdup environment variable used by ForwardAgent. bz#3328 * sshd(8): don't sigdie() in signal handler in privsep child process; this can end up causing sandbox violations per bz3286
merge local changes between openssh 8.4 and 8.5
OpenSSH 8.5/8.5p1 (2021-03-03) OpenSSH 8.5 was released on 2021-03-03. It is available from the mirrors listed at https://www.openssh.com/. OpenSSH is a 100% complete SSH protocol 2.0 implementation and includes sftp client and server support. Once again, we would like to thank the OpenSSH community for their continued support of the project, especially those who contributed code or patches, reported bugs, tested snapshots or donated to the project. More information on donations may be found at: https://www.openssh.com/donations.html Future deprecation notice ========================= It is now possible[1] to perform chosen-prefix attacks against the SHA-1 algorithm for less than USD$50K. In the SSH protocol, the "ssh-rsa" signature scheme uses the SHA-1 hash algorithm in conjunction with the RSA public key algorithm. OpenSSH will disable this signature scheme by default in the near future. Note that the deactivation of "ssh-rsa" signatures does not necessarily require cessation of use for RSA keys. In the SSH protocol, keys may be capable of signing using multiple algorithms. In particular, "ssh-rsa" keys are capable of signing using "rsa-sha2-256" (RSA/SHA256), "rsa-sha2-512" (RSA/SHA512) and "ssh-rsa" (RSA/SHA1). Only the last of these is being turned off by default. This algorithm is unfortunately still used widely despite the existence of better alternatives, being the only remaining public key signature algorithm specified by the original SSH RFCs that is still enabled by default. The better alternatives include: * The RFC8332 RSA SHA-2 signature algorithms rsa-sha2-256/512. These algorithms have the advantage of using the same key type as "ssh-rsa" but use the safe SHA-2 hash algorithms. These have been supported since OpenSSH 7.2 and are already used by default if the client and server support them. * The RFC8709 ssh-ed25519 signature algorithm. It has been supported in OpenSSH since release 6.5. * The RFC5656 ECDSA algorithms: ecdsa-sha2-nistp256/384/521. These have been supported by OpenSSH since release 5.7. To check whether a server is using the weak ssh-rsa public key algorithm, for host authentication, try to connect to it after removing the ssh-rsa algorithm from ssh(1)'s allowed list: ssh -oHostKeyAlgorithms=-ssh-rsa user@host If the host key verification fails and no other supported host key types are available, the server software on that host should be upgraded. This release enables the UpdateHostKeys option by default to assist the client by automatically migrating to better algorithms. [1] "SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust" Leurent, G and Peyrin, T (2020) https://eprint.iacr.org/2020/014.pdf Security ======== * ssh-agent(1): fixed a double-free memory corruption that was introduced in OpenSSH 8.2 . We treat all such memory faults as potentially exploitable. This bug could be reached by an attacker with access to the agent socket. On modern operating systems where the OS can provide information about the user identity connected to a socket, OpenSSH ssh-agent and sshd limit agent socket access only to the originating user and root. Additional mitigation may be afforded by the system's malloc(3)/free(3) implementation, if it detects double-free conditions. The most likely scenario for exploitation is a user forwarding an agent either to an account shared with a malicious user or to a host with an attacker holding root access. * Portable sshd(8): Prevent excessively long username going to PAM. This is a mitigation for a buffer overflow in Solaris' PAM username handling (CVE-2020-14871), and is only enabled for Sun-derived PAM implementations. This is not a problem in sshd itself, it only prevents sshd from being used as a vector to attack Solaris' PAM. It does not prevent the bug in PAM from being exploited via some other PAM application. GHPR212 Potentially-incompatible changes ================================ This release includes a number of changes that may affect existing configurations: * ssh(1), sshd(8): this release changes the first-preference signature algorithm from ECDSA to ED25519. * ssh(1), sshd(8): set the TOS/DSCP specified in the configuration for interactive use prior to TCP connect. The connection phase of the SSH session is time-sensitive and often explicitly interactive. The ultimate interactive/bulk TOS/DSCP will be set after authentication completes. * ssh(1), sshd(8): remove the pre-standardization cipher rijndael-cbc@lysator.liu.se. It is an alias for aes256-cbc before it was standardized in RFC4253 (2006), has been deprecated and disabled by default since OpenSSH 7.2 (2016) and was only briefly documented in ssh.1 in 2001. * ssh(1), sshd(8): update/replace the experimental post-quantum hybrid key exchange method based on Streamlined NTRU Prime coupled with X25519. The previous sntrup4591761x25519-sha512@tinyssh.org method is replaced with sntrup761x25519-sha512@openssh.com. Per its designers, the sntrup4591761 algorithm was superseded almost two years ago by sntrup761. (note this both the updated method and the one that it replaced are disabled by default) * ssh(1): disable CheckHostIP by default. It provides insignificant benefits while making key rotation significantly more difficult, especially for hosts behind IP-based load-balancers. Changes since OpenSSH 8.4 ========================= New features ------------ * ssh(1): this release enables UpdateHostkeys by default subject to some conservative preconditions: - The key was matched in the UserKnownHostsFile (and not in the GlobalKnownHostsFile). - The same key does not exist under another name. - A certificate host key is not in use. - known_hosts contains no matching wildcard hostname pattern. - VerifyHostKeyDNS is not enabled. - The default UserKnownHostsFile is in use. We expect some of these conditions will be modified or relaxed in future. * ssh(1), sshd(8): add a new LogVerbose configuration directive for that allows forcing maximum debug logging by file/function/line pattern-lists. * ssh(1): when prompting the user to accept a new hostkey, display any other host names/addresses already associated with the key. * ssh(1): allow UserKnownHostsFile=none to indicate that no known_hosts file should be used to identify host keys. * ssh(1): add a ssh_config KnownHostsCommand option that allows the client to obtain known_hosts data from a command in addition to the usual files. * ssh(1): add a ssh_config PermitRemoteOpen option that allows the client to restrict the destination when RemoteForward is used with SOCKS. * ssh(1): for FIDO keys, if a signature operation fails with a "incorrect PIN" reason and no PIN was initially requested from the user, then request a PIN and retry the operation. This supports some biometric devices that fall back to requiring PIN when reading of the biometric failed, and devices that require PINs for all hosted credentials. * sshd(8): implement client address-based rate-limiting via new sshd_config(5) PerSourceMaxStartups and PerSourceNetBlockSize directives that provide more fine-grained control on a per-origin address basis than the global MaxStartups limit. Bugfixes -------- * ssh(1): Prefix keyboard interactive prompts with "(user@host)" to make it easier to determine which connection they are associated with in cases like scp -3, ProxyJump, etc. bz#3224 * sshd(8): fix sshd_config SetEnv directives located inside Match blocks. GHPR201 * ssh(1): when requesting a FIDO token touch on stderr, inform the user once the touch has been recorded. * ssh(1): prevent integer overflow when ridiculously large ConnectTimeout values are specified, capping the effective value (for most platforms) at 24 days. bz#3229 * ssh(1): consider the ECDSA key subtype when ordering host key algorithms in the client. * ssh(1), sshd(8): rename the PubkeyAcceptedKeyTypes keyword to PubkeyAcceptedAlgorithms. The previous name incorrectly suggested that it control allowed key algorithms, when this option actually specifies the signature algorithms that are accepted. The previous name remains available as an alias. bz#3253 * ssh(1), sshd(8): similarly, rename HostbasedKeyTypes (ssh) and HostbasedAcceptedKeyTypes (sshd) to HostbasedAcceptedAlgorithms. * sftp-server(8): add missing lsetstat@openssh.com documentation and advertisement in the server's SSH2_FXP_VERSION hello packet. * ssh(1), sshd(8): more strictly enforce KEX state-machine by banning packet types once they are received. Fixes memleak caused by duplicate SSH2_MSG_KEX_DH_GEX_REQUEST (oss-fuzz #30078). * sftp(1): allow the full range of UIDs/GIDs for chown/chgrp on 32bit platforms instead of being limited by LONG_MAX. bz#3206 * Minor man page fixes (capitalization, commas, etc.) bz#3223 * sftp(1): when doing an sftp recursive upload or download of a read-only directory, ensure that the directory is created with write and execute permissions in the interim so that the transfer can actually complete, then set the directory permission as the final step. bz#3222 * ssh-keygen(1): document the -Z, check the validity of its argument earlier and provide a better error message if it's not correct. bz#2879 * ssh(1): ignore comments at the end of config lines in ssh_config, similar to what we already do for sshd_config. bz#2320 * sshd_config(5): mention that DisableForwarding is valid in a sshd_config Match block. bz3239 * sftp(1): fix incorrect sorting of "ls -ltr" under some circumstances. bz3248. * ssh(1), sshd(8): fix potential integer truncation of (unlikely) timeout values. bz#3250 * ssh(1): make hostbased authentication send the signature algorithm in its SSH2_MSG_USERAUTH_REQUEST packets instead of the key type. This make HostbasedAcceptedAlgorithms do what it is supposed to - filter on signature algorithm and not key type. Portability ----------- * sshd(8): add a number of platform-specific syscalls to the Linux seccomp-bpf sandbox. bz#3232 bz#3260 * sshd(8): remove debug message from sigchld handler that could cause deadlock on some platforms. bz#3259 * Sync contrib/ssh-copy-id with upstream. * unittests: add a hostname function for systems that don't have it. Some systems don't have a hostname command (it's not required by POSIX). The do have uname -n (which is), but not all of those have it report the FQDN. Checksums: ========== - SHA1 (openssh-8.5.tar.gz) = 04cae43c389fb411227c01219e4eb46e3113f34e - SHA256 (openssh-8.5.tar.gz) = 5qB2CgzNG4io4DmChTjHgCWqRWvEOvCKJskLdJCz+SU= - SHA1 (openssh-8.5p1.tar.gz) = 72eadcbe313b07b1dd3b693e41d3cd56d354e24e - SHA256 (openssh-8.5p1.tar.gz) = 9S8/QdQpqpkY44zyAK8iXM3Y5m8FLaVyhwyJc3ZG7CU= Please note that the SHA256 signatures are base64 encoded and not hexadecimal (which is the default for most checksum tools). The PGP key used to sign the releases is available from the mirror sites: https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/RELEASE_KEY.asc Please note that the OpenPGP key used to sign releases has been rotated for this release. The new key has been signed by the previous key to provide continuity. Reporting Bugs: =============== - Please read https://www.openssh.com/report.html Security bugs should be reported directly to openssh@openssh.com
Mostly merge changes from HEAD upto 20200411
merge openssh-8.1
OpenSSH 8.1 was released on 2019-10-09. It is available from the mirrors listed at https://www.openssh.com/. OpenSSH is a 100% complete SSH protocol 2.0 implementation and includes sftp client and server support. Once again, we would like to thank the OpenSSH community for their continued support of the project, especially those who contributed code or patches, reported bugs, tested snapshots or donated to the project. More information on donations may be found at: http://www.openssh.com/donations.html Security ======== * ssh(1), sshd(8), ssh-add(1), ssh-keygen(1): an exploitable integer overflow bug was found in the private key parsing code for the XMSS key type. This key type is still experimental and support for it is not compiled by default. No user-facing autoconf option exists in portable OpenSSH to enable it. This bug was found by Adam Zabrocki and reported via SecuriTeam's SSD program. * ssh(1), sshd(8), ssh-agent(1): add protection for private keys at rest in RAM against speculation and memory side-channel attacks like Spectre, Meltdown and Rambleed. This release encrypts private keys when they are not in use with a symmetric key that is derived from a relatively large "prekey" consisting of random data (currently 16KB). Potentially-incompatible changes ================================ This release includes a number of changes that may affect existing configurations: * ssh-keygen(1): when acting as a CA and signing certificates with an RSA key, default to using the rsa-sha2-512 signature algorithm. Certificates signed by RSA keys will therefore be incompatible with OpenSSH versions prior to 7.2 unless the default is overridden (using "ssh-keygen -t ssh-rsa -s ...").
Sync with HEAD
merge conflicts.
Import 8.0: Security ======== This release contains mitigation for a weakness in the scp(1) tool and protocol (CVE-2019-6111): when copying files from a remote system to a local directory, scp(1) did not verify that the filenames that the server sent matched those requested by the client. This could allow a hostile server to create or clobber unexpected local files with attacker-controlled content. This release adds client-side checking that the filenames sent from the server match the command-line request, The scp protocol is outdated, inflexible and not readily fixed. We recommend the use of more modern protocols like sftp and rsync for file transfer instead. Potentially-incompatible changes ================================ This release includes a number of changes that may affect existing configurations: * scp(1): Relating to the above changes to scp(1); the scp protocol relies on the remote shell for wildcard expansion, so there is no infallible way for the client's wildcard matching to perfectly reflect the server's. If there is a difference between client and server wildcard expansion, the client may refuse files from the server. For this reason, we have provided a new "-T" flag to scp that disables these client-side checks at the risk of reintroducing the attack described above. * sshd(8): Remove support for obsolete "host/port" syntax. Slash- separated host/port was added in 2001 as an alternative to host:port syntax for the benefit of IPv6 users. These days there are establised standards for this like [::1]:22 and the slash syntax is easily mistaken for CIDR notation, which OpenSSH supports for some things. Remove the slash notation from ListenAddress and PermitOpen; bz#2335 Changes since OpenSSH 7.9 ========================= This release is focused on new features and internal refactoring. New Features ------------ * ssh(1), ssh-agent(1), ssh-add(1): Add support for ECDSA keys in PKCS#11 tokens. * ssh(1), sshd(8): Add experimental quantum-computing resistant key exchange method, based on a combination of Streamlined NTRU Prime 4591^761 and X25519. * ssh-keygen(1): Increase the default RSA key size to 3072 bits, following NIST Special Publication 800-57's guidance for a 128-bit equivalent symmetric security level. * ssh(1): Allow "PKCS11Provider=none" to override later instances of the PKCS11Provider directive in ssh_config; bz#2974 * sshd(8): Add a log message for situations where a connection is dropped for attempting to run a command but a sshd_config ForceCommand=internal-sftp restriction is in effect; bz#2960 * ssh(1): When prompting whether to record a new host key, accept the key fingerprint as a synonym for "yes". This allows the user to paste a fingerprint obtained out of band at the prompt and have the client do the comparison for you. * ssh-keygen(1): When signing multiple certificates on a single command-line invocation, allow automatically incrementing the certificate serial number. * scp(1), sftp(1): Accept -J option as an alias to ProxyJump on the scp and sftp command-lines. * ssh-agent(1), ssh-pkcs11-helper(8), ssh-add(1): Accept "-v" command-line flags to increase the verbosity of output; pass verbose flags though to subprocesses, such as ssh-pkcs11-helper started from ssh-agent. * ssh-add(1): Add a "-T" option to allowing testing whether keys in an agent are usable by performing a signature and a verification. * sftp-server(8): Add a "lsetstat@openssh.com" protocol extension that replicates the functionality of the existing SSH2_FXP_SETSTAT operation but does not follow symlinks. bz#2067 * sftp(1): Add "-h" flag to chown/chgrp/chmod commands to request they do not follow symlinks. * sshd(8): Expose $SSH_CONNECTION in the PAM environment. This makes the connection 4-tuple available to PAM modules that wish to use it in decision-making. bz#2741 * sshd(8): Add a ssh_config "Match final" predicate Matches in same pass as "Match canonical" but doesn't require hostname canonicalisation be enabled. bz#2906 * sftp(1): Support a prefix of '@' to suppress echo of sftp batch commands; bz#2926 * ssh-keygen(1): When printing certificate contents using "ssh-keygen -Lf /path/certificate", include the algorithm that the CA used to sign the cert. Bugfixes -------- * sshd(8): Fix authentication failures when sshd_config contains "AuthenticationMethods any" inside a Match block that overrides a more restrictive default. * sshd(8): Avoid sending duplicate keepalives when ClientAliveCount is enabled. * sshd(8): Fix two race conditions related to SIGHUP daemon restart. Remnant file descriptors in recently-forked child processes could block the parent sshd's attempt to listen(2) to the configured addresses. Also, the restarting parent sshd could exit before any child processes that were awaiting their re-execution state had completed reading it, leaving them in a fallback path. * ssh(1): Fix stdout potentially being redirected to /dev/null when ProxyCommand=- was in use. * sshd(8): Avoid sending SIGPIPE to child processes if they attempt to write to stderr after their parent processes have exited; bz#2071 * ssh(1): Fix bad interaction between the ssh_config ConnectTimeout and ConnectionAttempts directives - connection attempts after the first were ignoring the requested timeout; bz#2918 * ssh-keyscan(1): Return a non-zero exit status if no keys were found; bz#2903 * scp(1): Sanitize scp filenames to allow UTF-8 characters without terminal control sequences; bz#2434 * sshd(8): Fix confusion between ClientAliveInterval and time-based RekeyLimit that could cause connections to be incorrectly closed. bz#2757 * ssh(1), ssh-add(1): Correct some bugs in PKCS#11 token PIN handling at initial token login. The attempt to read the PIN could be skipped in some cases, particularly on devices with integrated PIN readers. This would lead to an inability to retrieve keys from these tokens. bz#2652 * ssh(1), ssh-add(1): Support keys on PKCS#11 tokens that set the CKA_ALWAYS_AUTHENTICATE flag by requring a fresh login after the C_SignInit operation. bz#2638 * ssh(1): Improve documentation for ProxyJump/-J, clarifying that local configuration does not apply to jump hosts. * ssh-keygen(1): Clarify manual - ssh-keygen -e only writes public keys, not private. * ssh(1), sshd(8): be more strict in processing protocol banners, allowing \r characters only immediately before \n. * Various: fix a number of memory leaks, including bz#2942 and bz#2938 * scp(1), sftp(1): fix calculation of initial bandwidth limits. Account for bytes written before the timer starts and adjust the schedule on which recalculations are performed. Avoids an initial burst of traffic and yields more accurate bandwidth limits; bz#2927 * sshd(8): Only consider the ext-info-c extension during the initial key eschange. It shouldn't be sent in subsequent ones, but if it is present we should ignore it. This prevents sshd from sending a SSH_MSG_EXT_INFO for REKEX for buggy these clients. bz#2929 * ssh-keygen(1): Clarify manual that ssh-keygen -F (find host in authorized_keys) and -R (remove host from authorized_keys) options may accept either a bare hostname or a [hostname]:port combo. bz#2935 * ssh(1): Don't attempt to connect to empty SSH_AUTH_SOCK; bz#2936 * sshd(8): Silence error messages when sshd fails to load some of the default host keys. Failure to load an explicitly-configured hostkey is still an error, and failure to load any host key is still fatal. pr/103 * ssh(1): Redirect stderr of ProxyCommands to /dev/null when ssh is started with ControlPersist; prevents random ProxyCommand output from interfering with session output. * ssh(1): The ssh client was keeping a redundant ssh-agent socket (leftover from authentication) around for the life of the connection; bz#2912 * sshd(8): Fix bug in HostbasedAcceptedKeyTypes and PubkeyAcceptedKeyTypes options. If only RSA-SHA2 siganture types were specified, then authentication would always fail for RSA keys as the monitor checks only the base key (not the signature algorithm) type against *AcceptedKeyTypes. bz#2746 * ssh(1): Request correct signature types from ssh-agent when certificate keys and RSA-SHA2 signatures are in use. Portability ----------- * sshd(8): On Cygwin, run as SYSTEM where possible, using S4U for token creation if it supports MsV1_0 S4U Logon. * sshd(8): On Cygwin, use custom user/group matching code that respects the OS' behaviour of case-insensitive matching. * sshd(8): Don't set $MAIL if UsePAM=yes as PAM typically specifies the user environment if it's enabled; bz#2937 * sshd(8) Cygwin: Change service name to cygsshd to avoid collision with Microsoft's OpenSSH port. * Allow building against OpenSSL -dev (3.x) * Fix a number of build problems against version configurations and versions of OpenSSL. Including bz#2931 and bz#2921 * Improve warnings in cygwin service setup. bz#2922 * Remove hardcoded service name in cygwin setup. bz#2922
Pull up following revision(s) (requested by sevan in ticket #320): distrib/sets/lists/base/shl.mi: 1.822 distrib/sets/lists/debug/shl.mi: 1.184 doc/3RDPARTY: 1.1475 crypto/external/bsd/openssh/Makefile.inc: up to 1.10 crypto/external/bsd/openssh/bin/ssh/Makefile: up to 1.12 crypto/external/bsd/openssh/dist/LICENCE: up to 1.6 crypto/external/bsd/openssh/dist/PROTOCOL: up to 1.10 crypto/external/bsd/openssh/dist/PROTOCOL.agent: up to 1.9 crypto/external/bsd/openssh/dist/PROTOCOL.certkeys: up to 1.8 crypto/external/bsd/openssh/dist/auth-options.c: up to 1.16 crypto/external/bsd/openssh/dist/auth-options.h: up to 1.9 crypto/external/bsd/openssh/dist/auth-pam.c: up to 1.12 crypto/external/bsd/openssh/dist/auth.c: up to 1.20 crypto/external/bsd/openssh/dist/auth.h: up to 1.16 crypto/external/bsd/openssh/dist/auth2-chall.c: up to 1.13 crypto/external/bsd/openssh/dist/auth2-gss.c: up to 1.11 crypto/external/bsd/openssh/dist/auth2-hostbased.c: up to 1.12 crypto/external/bsd/openssh/dist/auth2-kbdint.c: up to 1.8 crypto/external/bsd/openssh/dist/auth2-krb5.c: up to 1.7 crypto/external/bsd/openssh/dist/auth2-none.c: up to 1.8 crypto/external/bsd/openssh/dist/auth2-passwd.c: up to 1.8 crypto/external/bsd/openssh/dist/auth2-pubkey.c: up to 1.18 crypto/external/bsd/openssh/dist/auth2.c: up to 1.15 crypto/external/bsd/openssh/dist/authfd.c: up to 1.14 crypto/external/bsd/openssh/dist/authfd.h: up to 1.9 crypto/external/bsd/openssh/dist/authfile.c: up to 1.17 crypto/external/bsd/openssh/dist/bitmap.c: up to 1.6 crypto/external/bsd/openssh/dist/bufbn.c: up to 1.9 crypto/external/bsd/openssh/dist/buffer.h: up to 1.10 crypto/external/bsd/openssh/dist/channels.c: up to 1.20 crypto/external/bsd/openssh/dist/channels.h: up to 1.14 crypto/external/bsd/openssh/dist/cipher-3des1.c: delete crypto/external/bsd/openssh/dist/cipher-bf1.c: delete crypto/external/bsd/openssh/dist/cipher.c: up to 1.11 crypto/external/bsd/openssh/dist/cipher.h: up to 1.11 crypto/external/bsd/openssh/dist/clientloop.c: up to 1.22 crypto/external/bsd/openssh/dist/clientloop.h: up to 1.15 crypto/external/bsd/openssh/dist/compat.c: up to 1.17 crypto/external/bsd/openssh/dist/compat.h: up to 1.10 crypto/external/bsd/openssh/dist/deattack.c: delete crypto/external/bsd/openssh/dist/deattack.h: delete crypto/external/bsd/openssh/dist/digest-libc.c: up to 1.7 crypto/external/bsd/openssh/dist/digest-openssl.c: up to 1.6 crypto/external/bsd/openssh/dist/digest.h: up to 1.1.1.3 crypto/external/bsd/openssh/dist/dispatch.c: up to 1.9 crypto/external/bsd/openssh/dist/dispatch.h: up to 1.7 crypto/external/bsd/openssh/dist/dns.c: up to 1.15 crypto/external/bsd/openssh/dist/dns.h: up to 1.10 crypto/external/bsd/openssh/dist/gss-serv.c: up to 1.11 crypto/external/bsd/openssh/dist/hostfile.c: up to 1.11 crypto/external/bsd/openssh/dist/includes.h: up to 1.7 crypto/external/bsd/openssh/dist/kex.c: up to 1.19 crypto/external/bsd/openssh/dist/kex.h: up to 1.16 crypto/external/bsd/openssh/dist/kexc25519c.c: up to 1.7 crypto/external/bsd/openssh/dist/kexc25519s.c: up to 1.9 crypto/external/bsd/openssh/dist/kexdhc.c: up to 1.10 crypto/external/bsd/openssh/dist/kexdhs.c: up to 1.13 crypto/external/bsd/openssh/dist/kexecdhc.c: up to 1.8 crypto/external/bsd/openssh/dist/kexecdhs.c: up to 1.9 crypto/external/bsd/openssh/dist/kexgexc.c: up to 1.10 crypto/external/bsd/openssh/dist/kexgexs.c: up to 1.14 crypto/external/bsd/openssh/dist/key.c: up to 1.22 crypto/external/bsd/openssh/dist/key.h: up to 1.14 crypto/external/bsd/openssh/dist/krl.c: up to 1.11 crypto/external/bsd/openssh/dist/log.c: up to 1.17 crypto/external/bsd/openssh/dist/log.h: up to 1.13 crypto/external/bsd/openssh/dist/mac.c: up to 1.15 crypto/external/bsd/openssh/dist/misc.c: up to 1.16 crypto/external/bsd/openssh/dist/misc.h: up to 1.13 crypto/external/bsd/openssh/dist/moduli-gen/moduli-gen.sh: up to 1.1.1.2 crypto/external/bsd/openssh/dist/moduli-gen/moduli.2048: up to 1.3 crypto/external/bsd/openssh/dist/moduli-gen/moduli.3072: up to 1.3 crypto/external/bsd/openssh/dist/moduli-gen/moduli.4096: up to 1.3 crypto/external/bsd/openssh/dist/moduli-gen/moduli.6144: up to 1.3 crypto/external/bsd/openssh/dist/moduli-gen/moduli.7680: up to 1.3 crypto/external/bsd/openssh/dist/moduli-gen/moduli.8192: up to 1.3 crypto/external/bsd/openssh/dist/monitor.c: up to 1.23 crypto/external/bsd/openssh/dist/monitor_wrap.c: up to 1.18 crypto/external/bsd/openssh/dist/monitor_wrap.h: up to 1.14 crypto/external/bsd/openssh/dist/mux.c: up to 1.19 crypto/external/bsd/openssh/dist/myproposal.h: up to 1.17 crypto/external/bsd/openssh/dist/nchan.c: up to 1.9 crypto/external/bsd/openssh/dist/opacket.c: up to 1.8 crypto/external/bsd/openssh/dist/opacket.h: up to 1.8 crypto/external/bsd/openssh/dist/packet.c: up to 1.29 crypto/external/bsd/openssh/dist/packet.h: up to 1.16 crypto/external/bsd/openssh/dist/pathnames.h: up to 1.13 crypto/external/bsd/openssh/dist/pfilter.c: up to 1.4 crypto/external/bsd/openssh/dist/readconf.c: up to 1.22 crypto/external/bsd/openssh/dist/readconf.h: up to 1.19 crypto/external/bsd/openssh/dist/recallocarray.c: up to 1.1 crypto/external/bsd/openssh/dist/rsa.c: delete crypto/external/bsd/openssh/dist/rsa.h: delete crypto/external/bsd/openssh/dist/scp.1: up to 1.15 crypto/external/bsd/openssh/dist/scp.c: up to 1.17 crypto/external/bsd/openssh/dist/servconf.c: up to 1.25 crypto/external/bsd/openssh/dist/servconf.h: up to 1.16 crypto/external/bsd/openssh/dist/serverloop.c: up to 1.18 crypto/external/bsd/openssh/dist/serverloop.h: up to 1.7 crypto/external/bsd/openssh/dist/session.c: up to 1.23 crypto/external/bsd/openssh/dist/session.h: up to 1.8 crypto/external/bsd/openssh/dist/sftp-client.c: up to 1.19 crypto/external/bsd/openssh/dist/sftp-common.c: up to 1.10 crypto/external/bsd/openssh/dist/sftp-server.c: up to 1.17 crypto/external/bsd/openssh/dist/sftp.1: up to 1.16 crypto/external/bsd/openssh/dist/sftp.c: up to 1.22 crypto/external/bsd/openssh/dist/ssh-add.1: up to 1.13 crypto/external/bsd/openssh/dist/ssh-add.c: up to 1.16 crypto/external/bsd/openssh/dist/ssh-agent.c: up to 1.21 crypto/external/bsd/openssh/dist/ssh-gss.h: up to 1.8 crypto/external/bsd/openssh/dist/ssh-keygen.1: up to 1.20 crypto/external/bsd/openssh/dist/ssh-keygen.c: up to 1.28 crypto/external/bsd/openssh/dist/ssh-keyscan.1: up to 1.14 crypto/external/bsd/openssh/dist/ssh-keyscan.c: up to 1.20 crypto/external/bsd/openssh/dist/ssh-pkcs11-client.c: up to 1.10 crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.c: up to 1.13 crypto/external/bsd/openssh/dist/ssh-pkcs11.c: up to 1.13 crypto/external/bsd/openssh/dist/ssh-rsa.c: up to 1.13 crypto/external/bsd/openssh/dist/ssh.1: up to 1.21 crypto/external/bsd/openssh/dist/ssh.c: up to 1.26 crypto/external/bsd/openssh/dist/ssh.h: up to 1.10 crypto/external/bsd/openssh/dist/ssh1.h: delete crypto/external/bsd/openssh/dist/ssh_api.c: up to 1.7 crypto/external/bsd/openssh/dist/ssh_config: up to 1.11 crypto/external/bsd/openssh/dist/ssh_config.5: up to 1.21 crypto/external/bsd/openssh/dist/sshbuf-getput-basic.c: up to 1.8 crypto/external/bsd/openssh/dist/sshbuf.c: up to 1.8 crypto/external/bsd/openssh/dist/sshbuf.h: up to 1.8 crypto/external/bsd/openssh/dist/sshconnect.c: up to 1.20 crypto/external/bsd/openssh/dist/sshconnect.h: up to 1.10 crypto/external/bsd/openssh/dist/sshconnect1.c: delete crypto/external/bsd/openssh/dist/sshconnect2.c: up to 1.29 crypto/external/bsd/openssh/dist/sshd.8: up to 1.19 crypto/external/bsd/openssh/dist/sshd.c: up to 1.28 crypto/external/bsd/openssh/dist/sshd_config.5: up to 1.25 crypto/external/bsd/openssh/dist/ssherr.c: up to 1.7 crypto/external/bsd/openssh/dist/ssherr.h: up to 1.1.1.3 crypto/external/bsd/openssh/dist/sshkey.c: up to 1.11 crypto/external/bsd/openssh/dist/sshkey.h: up to 1.6 crypto/external/bsd/openssh/dist/ttymodes.c: up to 1.8 crypto/external/bsd/openssh/dist/ttymodes.h: up to 1.8 crypto/external/bsd/openssh/dist/umac.c: up to 1.14 crypto/external/bsd/openssh/dist/utf8.c: up to 1.6 crypto/external/bsd/openssh/dist/version.h: up to 1.24 crypto/external/bsd/openssh/dist/xmalloc.c: up to 1.10 crypto/external/bsd/openssh/dist/xmalloc.h: up to 1.10 crypto/external/bsd/openssh/lib/Makefile: up to 1.23 crypto/external/bsd/openssh/lib/shlib_version: up to 1.20 Update OpenSSH to 7.6.
merge conflicts.
Potentially-incompatible changes ================================ This release includes a number of changes that may affect existing configurations: * ssh(1): delete SSH protocol version 1 support, associated configuration options and documentation. * ssh(1)/sshd(8): remove support for the hmac-ripemd160 MAC. * ssh(1)/sshd(8): remove support for the arcfour, blowfish and CAST ciphers. * Refuse RSA keys <1024 bits in length and improve reporting for keys that do not meet this requirement. * ssh(1): do not offer CBC ciphers by default. Changes since OpenSSH 7.5 ========================= This is primarily a bugfix release. It also contains substantial internal refactoring. Security -------- * sftp-server(8): in read-only mode, sftp-server was incorrectly permitting creation of zero-length files. Reported by Michal Zalewski. New Features ------------ * ssh(1): add RemoteCommand option to specify a command in the ssh config file instead of giving it on the client's command line. This allows the configuration file to specify the command that will be executed on the remote host. * sshd(8): add ExposeAuthInfo option that enables writing details of the authentication methods used (including public keys where applicable) to a file that is exposed via a $SSH_USER_AUTH environment variable in the subsequent session. * ssh(1): add support for reverse dynamic forwarding. In this mode, ssh will act as a SOCKS4/5 proxy and forward connections to destinations requested by the remote SOCKS client. This mode is requested using extended syntax for the -R and RemoteForward options and, because it is implemented solely at the client, does not require the server be updated to be supported. * sshd(8): allow LogLevel directive in sshd_config Match blocks; bz#2717 * ssh-keygen(1): allow inclusion of arbitrary string or flag certificate extensions and critical options. * ssh-keygen(1): allow ssh-keygen to use a key held in ssh-agent as a CA when signing certificates. bz#2377 * ssh(1)/sshd(8): allow IPQoS=none in ssh/sshd to not set an explicit ToS/DSCP value and just use the operating system default. * ssh-add(1): added -q option to make ssh-add quiet on success. * ssh(1): expand the StrictHostKeyChecking option with two new settings. The first "accept-new" will automatically accept hitherto-unseen keys but will refuse connections for changed or invalid hostkeys. This is a safer subset of the current behaviour of StrictHostKeyChecking=no. The second setting "off", is a synonym for the current behaviour of StrictHostKeyChecking=no: accept new host keys, and continue connection for hosts with incorrect hostkeys. A future release will change the meaning of StrictHostKeyChecking=no to the behaviour of "accept-new". bz#2400 * ssh(1): add SyslogFacility option to ssh(1) matching the equivalent option in sshd(8). bz#2705 Bugfixes -------- * ssh(1): use HostKeyAlias if specified instead of hostname for matching host certificate principal names; bz#2728 * sftp(1): implement sorting for globbed ls; bz#2649 * ssh(1): add a user@host prefix to client's "Permission denied" messages, useful in particular when using "stacked" connections (e.g. ssh -J) where it's not clear which host is denying. bz#2720 * ssh(1): accept unknown EXT_INFO extension values that contain \0 characters. These are legal, but would previously cause fatal connection errors if received. * ssh(1)/sshd(8): repair compression statistics printed at connection exit * sftp(1): print '?' instead of incorrect link count (that the protocol doesn't provide) for remote listings. bz#2710 * ssh(1): return failure rather than fatal() for more cases during session multiplexing negotiations. Causes the session to fall back to a non-mux connection if they occur. bz#2707 * ssh(1): mention that the server may send debug messages to explain public key authentication problems under some circumstances; bz#2709 * Translate OpenSSL error codes to better report incorrect passphrase errors when loading private keys; bz#2699 * sshd(8): adjust compatibility patterns for WinSCP to correctly identify versions that implement only the legacy DH group exchange scheme. bz#2748 * ssh(1): print the "Killed by signal 1" message only at LogLevel verbose so that it is not shown at the default level; prevents it from appearing during ssh -J and equivalent ProxyCommand configs. bz#1906, bz#2744 * ssh-keygen(1): when generating all hostkeys (ssh-keygen -A), clobber existing keys if they exist but are zero length. zero-length keys could previously be made if ssh-keygen failed or was interrupted part way through generating them. bz#2561 * ssh(1): fix pledge(2) violation in the escape sequence "~&" used to place the current session in the background. * ssh-keyscan(1): avoid double-close() on file descriptors; bz#2734 * sshd(8): avoid reliance on shared use of pointers shared between monitor and child sshd processes. bz#2704 * sshd_config(8): document available AuthenticationMethods; bz#2453 * ssh(1): avoid truncation in some login prompts; bz#2768 * sshd(8): Fix various compilations failures, inc bz#2767 * ssh(1): make "--" before the hostname terminate argument processing after the hostname too. * ssh-keygen(1): switch from aes256-cbc to aes256-ctr for encrypting new-style private keys. Fixes problems related to private key handling for no-OpenSSL builds. bz#2754 * ssh(1): warn and do not attempt to use keys when the public and private halves do not match. bz#2737 * sftp(1): don't print verbose error message when ssh disconnects from under sftp. bz#2750 * sshd(8): fix keepalive scheduling problem: activity on a forwarded port from preventing the keepalive from being sent; bz#2756 * sshd(8): when started without root privileges, don't require the privilege separation user or path to exist. Makes running the regression tests easier without touching the filesystem. * Make integrity.sh regression tests more robust against timeouts. bz#2658 * ssh(1)/sshd(8): correctness fix for channels implementation: accept channel IDs greater than 0x7FFFFFFF. Portability ----------- * sshd(9): drop two more privileges in the Solaris sandbox: PRIV_DAX_ACCESS and PRIV_SYS_IB_INFO; bz#2723 * sshd(8): expose list of completed authentication methods to PAM via the SSH_AUTH_INFO_0 PAM environment variable. bz#2408 * ssh(1)/sshd(8): fix several problems in the tun/tap forwarding code, mostly to do with host/network byte order confusion. bz#2735 * Add --with-cflags-after and --with-ldflags-after configure flags to allow setting CFLAGS/LDFLAGS after configure has completed. These are useful for setting sanitiser/fuzzing options that may interfere with configure's operation. * sshd(8): avoid Linux seccomp violations on ppc64le over the socketcall syscall. * Fix use of ldns when using ldns-config; bz#2697 * configure: set cache variables when cross-compiling. The cross- compiling fallback message was saying it assumed the test passed, but it wasn't actually set the cache variables and this would cause later tests to fail. * Add clang libFuzzer harnesses for public key parsing and signature verification.
Sync with HEAD
Sync with HEAD
merge conflicts
Sync with HEAD. (Note that most of these changes are simply $NetBSD$ tag issues.)
merge conflicts
Merge conflicts
merge openssh-6.7
- Merge conflicts - WARNS=5
from ftp.openbsd.org
Resolve conflicts
Imported openssh-5.6
Merge in our changes: - conditionalize login_cap - conditionalize bsd_auth - bring in pam from portable - restore krb5, krb4, afs, skey - bring in hpn patches, disable mt aes cipher, keep speedups and cipher none - add ignore root rhosts option - fix ctype macro arguments - umac is broken, disable it - better ~homedir handling - netbsd style tunnels - urandom, xhome, chrootdir, rescuedir NetBSD handling - utmp/utmpx handling - handle tty posix_vdisable properly - handle setuid and unsetuid the posix way instead of setresuid() - add all missing functions - add new moduli - add build glue
import 5.2 from ftp.openbsd.org
Initial revision