From 94597021fbf5b12b369b7bb3c13af715d8be8c4e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 13:13:19 +0200 Subject: Adding debian version 1:8.4p1-5+deb11u3. Signed-off-by: Daniel Baumann --- debian/.git-dpm | 12 + debian/.gitignore | 17 + debian/.gitlab-ci.yml | 12 + debian/NEWS | 347 ++ debian/README.Debian | 295 + debian/adjust-openssl-dependencies | 36 + debian/agent-launch | 24 + debian/changelog | 6133 ++++++++++++++++++++ debian/clean | 2 + debian/control | 240 + debian/copyright | 247 + debian/faq.html | 1187 ++++ debian/gnome-ssh-askpass.1 | 51 + debian/keygen-test/Makefile | 12 + debian/keygen-test/getpid.c | 39 + debian/keygen-test/keygen-test | 12 + debian/openssh-client-udeb.install | 3 + debian/openssh-client.apport | 35 + debian/openssh-client.dirs | 1 + debian/openssh-client.docs | 5 + debian/openssh-client.install | 36 + debian/openssh-client.links | 4 + debian/openssh-client.lintian-overrides | 1 + debian/openssh-client.maintscript | 1 + debian/openssh-client.manpages | 2 + debian/openssh-client.postinst | 44 + debian/openssh-client.postrm | 22 + debian/openssh-client.prerm | 39 + debian/openssh-server-udeb.dirs | 1 + debian/openssh-server-udeb.install | 2 + debian/openssh-server.apport | 27 + debian/openssh-server.config | 46 + debian/openssh-server.dirs | 1 + debian/openssh-server.examples | 1 + debian/openssh-server.install | 21 + debian/openssh-server.links | 0 debian/openssh-server.maintscript | 3 + debian/openssh-server.postinst | 166 + debian/openssh-server.postrm | 35 + debian/openssh-server.preinst | 18 + debian/openssh-server.runit | 1 + debian/openssh-server.ssh.default | 5 + debian/openssh-server.ssh.init | 166 + debian/openssh-server.ssh.runscript/finish | 16 + debian/openssh-server.ssh.runscript/run | 20 + debian/openssh-server.ssh.service | 1 + debian/openssh-server.sshd.pam.in | 55 + debian/openssh-server.templates | 23 + debian/openssh-server.ucf-md5sum | 98 + debian/openssh-server.ufw.profile | 4 + debian/openssh-sftp-server.install | 2 + debian/openssh-sftp-server.links | 1 + debian/openssh-tests.install | 11 + debian/patches/CVE-2021-41617-1.patch | 35 + debian/patches/CVE-2021-41617-2.patch | 26 + debian/patches/CVE-2023-38408-1.patch | 30 + debian/patches/CVE-2023-38408-2.patch | 171 + debian/patches/CVE-2023-48795.patch | 460 ++ debian/patches/CVE-2023-51385.patch | 94 + debian/patches/authorized-keys-man-symlink.patch | 26 + debian/patches/conch-old-privkey-format.patch | 68 + debian/patches/debian-banner.patch | 162 + debian/patches/debian-config.patch | 270 + debian/patches/dnssec-sshfp.patch | 94 + debian/patches/doc-hash-tab-completion.patch | 28 + debian/patches/gnome-ssh-askpass2-icon.patch | 26 + debian/patches/gssapi.patch | 4002 +++++++++++++ debian/patches/keepalive-extensions.patch | 135 + .../patches/mention-ssh-keygen-on-keychange.patch | 44 + debian/patches/no-openssl-version-status.patch | 62 + debian/patches/openbsd-docs.patch | 148 + debian/patches/package-versioning.patch | 47 + debian/patches/restore-authorized_keys2.patch | 35 + debian/patches/restore-tcp-wrappers.patch | 172 + debian/patches/revert-ipqos-defaults.patch | 93 + debian/patches/revert-x32-sandbox-breakage.patch | 39 + debian/patches/sandbox-pselect6_time64.patch | 32 + debian/patches/scp-quoting.patch | 41 + debian/patches/selinux-role.patch | 472 ++ debian/patches/series | 35 + debian/patches/shell-path.patch | 39 + debian/patches/ssh-agent-double-free.patch | 26 + debian/patches/ssh-agent-setgid.patch | 40 + debian/patches/ssh-argv0.patch | 31 + debian/patches/ssh-copy-id-heredoc-syntax.patch | 37 + debian/patches/ssh-vulnkey-compat.patch | 42 + debian/patches/syslog-level-silent.patch | 47 + debian/patches/systemd-readiness.patch | 84 + debian/patches/user-group-modes.patch | 210 + debian/po/POTFILES.in | 1 + debian/po/cs.po | 55 + debian/po/da.po | 55 + debian/po/de.po | 61 + debian/po/es.po | 80 + debian/po/fr.po | 59 + debian/po/it.po | 58 + debian/po/ja.po | 55 + debian/po/nl.po | 60 + debian/po/pt.po | 59 + debian/po/pt_BR.po | 57 + debian/po/ru.po | 57 + debian/po/sv.po | 58 + debian/po/templates.pot | 46 + debian/po/tr.po | 58 + debian/rules | 233 + debian/run-tests | 39 + debian/source/format | 1 + debian/source/include-binaries | 1 + debian/source/lintian-overrides | 2 + debian/ssh-argv0 | 31 + debian/ssh-argv0.1 | 64 + debian/ssh-askpass-gnome.desktop | 12 + debian/ssh-askpass-gnome.examples | 1 + debian/ssh-askpass-gnome.install | 3 + debian/ssh-askpass-gnome.manpages | 1 + debian/ssh-askpass-gnome.png | Bin 0 -> 6949 bytes debian/ssh-askpass-gnome.postinst | 48 + debian/ssh-askpass-gnome.prerm | 39 + debian/ssh.maintscript | 1 + debian/systemd/rescue-ssh.target | 6 + debian/systemd/ssh-agent.override | 1 + debian/systemd/ssh-agent.service | 11 + debian/systemd/ssh-session-cleanup | 11 + debian/systemd/ssh-session-cleanup.service | 13 + debian/systemd/ssh.service | 22 + debian/systemd/ssh.socket | 12 + debian/systemd/ssh@.service | 11 + debian/tests/control | 10 + debian/tests/regress | 67 + debian/upstream/signing-key.asc | 41 + debian/watch | 3 + 131 files changed, 18489 insertions(+) create mode 100644 debian/.git-dpm create mode 100644 debian/.gitignore create mode 100644 debian/.gitlab-ci.yml create mode 100644 debian/NEWS create mode 100644 debian/README.Debian create mode 100755 debian/adjust-openssl-dependencies create mode 100755 debian/agent-launch create mode 100644 debian/changelog create mode 100644 debian/clean create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/faq.html create mode 100644 debian/gnome-ssh-askpass.1 create mode 100644 debian/keygen-test/Makefile create mode 100644 debian/keygen-test/getpid.c create mode 100755 debian/keygen-test/keygen-test create mode 100644 debian/openssh-client-udeb.install create mode 100644 debian/openssh-client.apport create mode 100644 debian/openssh-client.dirs create mode 100644 debian/openssh-client.docs create mode 100755 debian/openssh-client.install create mode 100644 debian/openssh-client.links create mode 100644 debian/openssh-client.lintian-overrides create mode 100644 debian/openssh-client.maintscript create mode 100644 debian/openssh-client.manpages create mode 100644 debian/openssh-client.postinst create mode 100644 debian/openssh-client.postrm create mode 100644 debian/openssh-client.prerm create mode 100644 debian/openssh-server-udeb.dirs create mode 100644 debian/openssh-server-udeb.install create mode 100644 debian/openssh-server.apport create mode 100644 debian/openssh-server.config create mode 100644 debian/openssh-server.dirs create mode 100644 debian/openssh-server.examples create mode 100755 debian/openssh-server.install create mode 100644 debian/openssh-server.links create mode 100644 debian/openssh-server.maintscript create mode 100644 debian/openssh-server.postinst create mode 100644 debian/openssh-server.postrm create mode 100644 debian/openssh-server.preinst create mode 100644 debian/openssh-server.runit create mode 100644 debian/openssh-server.ssh.default create mode 100755 debian/openssh-server.ssh.init create mode 100644 debian/openssh-server.ssh.runscript/finish create mode 100644 debian/openssh-server.ssh.runscript/run create mode 120000 debian/openssh-server.ssh.service create mode 100644 debian/openssh-server.sshd.pam.in create mode 100644 debian/openssh-server.templates create mode 100644 debian/openssh-server.ucf-md5sum create mode 100644 debian/openssh-server.ufw.profile create mode 100644 debian/openssh-sftp-server.install create mode 100644 debian/openssh-sftp-server.links create mode 100644 debian/openssh-tests.install create mode 100644 debian/patches/CVE-2021-41617-1.patch create mode 100644 debian/patches/CVE-2021-41617-2.patch create mode 100644 debian/patches/CVE-2023-38408-1.patch create mode 100644 debian/patches/CVE-2023-38408-2.patch create mode 100644 debian/patches/CVE-2023-48795.patch create mode 100644 debian/patches/CVE-2023-51385.patch create mode 100644 debian/patches/authorized-keys-man-symlink.patch create mode 100644 debian/patches/conch-old-privkey-format.patch create mode 100644 debian/patches/debian-banner.patch create mode 100644 debian/patches/debian-config.patch create mode 100644 debian/patches/dnssec-sshfp.patch create mode 100644 debian/patches/doc-hash-tab-completion.patch create mode 100644 debian/patches/gnome-ssh-askpass2-icon.patch create mode 100644 debian/patches/gssapi.patch create mode 100644 debian/patches/keepalive-extensions.patch create mode 100644 debian/patches/mention-ssh-keygen-on-keychange.patch create mode 100644 debian/patches/no-openssl-version-status.patch create mode 100644 debian/patches/openbsd-docs.patch create mode 100644 debian/patches/package-versioning.patch create mode 100644 debian/patches/restore-authorized_keys2.patch create mode 100644 debian/patches/restore-tcp-wrappers.patch create mode 100644 debian/patches/revert-ipqos-defaults.patch create mode 100644 debian/patches/revert-x32-sandbox-breakage.patch create mode 100644 debian/patches/sandbox-pselect6_time64.patch create mode 100644 debian/patches/scp-quoting.patch create mode 100644 debian/patches/selinux-role.patch create mode 100644 debian/patches/series create mode 100644 debian/patches/shell-path.patch create mode 100644 debian/patches/ssh-agent-double-free.patch create mode 100644 debian/patches/ssh-agent-setgid.patch create mode 100644 debian/patches/ssh-argv0.patch create mode 100644 debian/patches/ssh-copy-id-heredoc-syntax.patch create mode 100644 debian/patches/ssh-vulnkey-compat.patch create mode 100644 debian/patches/syslog-level-silent.patch create mode 100644 debian/patches/systemd-readiness.patch create mode 100644 debian/patches/user-group-modes.patch create mode 100644 debian/po/POTFILES.in create mode 100644 debian/po/cs.po create mode 100644 debian/po/da.po create mode 100644 debian/po/de.po create mode 100644 debian/po/es.po create mode 100644 debian/po/fr.po create mode 100644 debian/po/it.po create mode 100644 debian/po/ja.po create mode 100644 debian/po/nl.po create mode 100644 debian/po/pt.po create mode 100644 debian/po/pt_BR.po create mode 100644 debian/po/ru.po create mode 100644 debian/po/sv.po create mode 100644 debian/po/templates.pot create mode 100644 debian/po/tr.po create mode 100755 debian/rules create mode 100755 debian/run-tests create mode 100644 debian/source/format create mode 100644 debian/source/include-binaries create mode 100644 debian/source/lintian-overrides create mode 100644 debian/ssh-argv0 create mode 100644 debian/ssh-argv0.1 create mode 100644 debian/ssh-askpass-gnome.desktop create mode 100644 debian/ssh-askpass-gnome.examples create mode 100755 debian/ssh-askpass-gnome.install create mode 100644 debian/ssh-askpass-gnome.manpages create mode 100644 debian/ssh-askpass-gnome.png create mode 100644 debian/ssh-askpass-gnome.postinst create mode 100644 debian/ssh-askpass-gnome.prerm create mode 100644 debian/ssh.maintscript create mode 100644 debian/systemd/rescue-ssh.target create mode 100644 debian/systemd/ssh-agent.override create mode 100644 debian/systemd/ssh-agent.service create mode 100755 debian/systemd/ssh-session-cleanup create mode 100644 debian/systemd/ssh-session-cleanup.service create mode 100644 debian/systemd/ssh.service create mode 100644 debian/systemd/ssh.socket create mode 100644 debian/systemd/ssh@.service create mode 100644 debian/tests/control create mode 100755 debian/tests/regress create mode 100644 debian/upstream/signing-key.asc create mode 100644 debian/watch diff --git a/debian/.git-dpm b/debian/.git-dpm new file mode 100644 index 0000000..80348de --- /dev/null +++ b/debian/.git-dpm @@ -0,0 +1,12 @@ +# see git-dpm(1) from git-dpm package +2bea7434c9fad19f017846adad0e995d8da00642 +2bea7434c9fad19f017846adad0e995d8da00642 +2b2c99658e3e8ed452e28f88f9cdbcdfb2a461cb +2b2c99658e3e8ed452e28f88f9cdbcdfb2a461cb +openssh_8.4p1.orig.tar.gz +69305059e10a60693ebe6f17731f962c9577535c +1742201 +debianTag="debian/%e%%%V" +patchedTag="patched/%e%%%V" +upstreamTag="upstream/%U" +signature:323573568682eac265e1f69206bc98149a8e423e:683:openssh_8.4p1.orig.tar.gz.asc diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..988323b --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,17 @@ +/*.debhelper* +/*substvars +/build-deb +/build-udeb +/files +/keygen-test/key1 +/keygen-test/key1.pub +/keygen-test/key2 +/keygen-test/key2.pub +/openssh-client +/openssh-client-udeb +/openssh-server +/openssh-server-udeb +/ssh +/ssh-askpass-gnome +/ssh-krb5 +/tmp diff --git a/debian/.gitlab-ci.yml b/debian/.gitlab-ci.yml new file mode 100644 index 0000000..76ce17f --- /dev/null +++ b/debian/.gitlab-ci.yml @@ -0,0 +1,12 @@ +image: registry.gitlab.com/eighthave/ci-image-git-buildpackage:latest + +build: + artifacts: + paths: + - "*.deb" + expire_in: 1 day + script: + - gitlab-ci-git-buildpackage-all + except: + variables: + - $CI_COMMIT_TAG != null diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 0000000..2d38891 --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,347 @@ +openssh (1:8.4p1-1) unstable; urgency=medium + + OpenSSH 8.4 includes a number of changes that may affect existing + configurations: + + * ssh-keygen(1): the format of the attestation information optionally + recorded when a FIDO key is generated has changed. It now includes the + authenticator data needed to validate attestation signatures. + + * The API between OpenSSH and the FIDO token middleware has changed and + the SSH_SK_VERSION_MAJOR version has been incremented as a result. + Third-party middleware libraries must support the current API version + (7) to work with OpenSSH 8.4. + + -- Colin Watson Sun, 18 Oct 2020 12:07:48 +0100 + +openssh (1:8.3p1-1) unstable; urgency=medium + + OpenSSH 8.3 includes a number of changes that may affect existing + configurations: + + * sftp(1): reject an argument of "-1" in the same way as ssh(1) and scp(1) + do instead of accepting and silently ignoring it. + + -- Colin Watson Sun, 07 Jun 2020 13:44:04 +0100 + +openssh (1:8.2p1-1) unstable; urgency=medium + + OpenSSH 8.2 includes a number of changes that may affect existing + configurations: + + * ssh(1), sshd(8), ssh-keygen(1): This release removes the "ssh-rsa" + (RSA/SHA1) algorithm from those accepted for certificate signatures + (i.e. the client and server CASignatureAlgorithms option) and will use + the rsa-sha2-512 signature algorithm by default when the ssh-keygen(1) + CA signs new certificates. + + Certificates are at special risk to SHA1 collision vulnerabilities as + an attacker has effectively unlimited time in which to craft a + collision that yields them a valid certificate, far more than the + relatively brief LoginGraceTime window that they have to forge a host + key signature. + + The OpenSSH certificate format includes a CA-specified (typically + random) nonce value near the start of the certificate that should make + exploitation of chosen-prefix collisions in this context challenging, + as the attacker does not have full control over the prefix that + actually gets signed. Nonetheless, SHA1 is now a demonstrably broken + algorithm and further improvements in attacks are highly likely. + + OpenSSH releases prior to 7.2 do not support the newer RSA/SHA2 + algorithms and will refuse to accept certificates signed by an OpenSSH + 8.2+ CA using RSA keys unless the unsafe algorithm is explicitly + selected during signing ("ssh-keygen -t ssh-rsa"). Older + clients/servers may use another CA key type such as ssh-ed25519 + (supported since OpenSSH 6.5) or one of the ecdsa-sha2-nistp256/384/521 + types (supported since OpenSSH 5.7) instead if they cannot be upgraded. + + * ssh(1), sshd(8): Remove diffie-hellman-group14-sha1 from the default + key exchange proposal for both the client and server. + + * ssh-keygen(1): The command-line options related to the generation and + screening of safe prime numbers used by the + diffie-hellman-group-exchange-* key exchange algorithms have changed. + Most options have been folded under the -O flag. + + * sshd(8): The sshd listener process title visible to ps(1) has changed + to include information about the number of connections that are + currently attempting authentication and the limits configured by + MaxStartups. + + -- Colin Watson Fri, 21 Feb 2020 16:36:37 +0000 + +openssh (1:8.1p1-1) unstable; urgency=medium + + OpenSSH 8.1 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 ..."). + + -- Colin Watson Thu, 10 Oct 2019 10:23:19 +0100 + +openssh (1:8.0p1-1) experimental; urgency=medium + + OpenSSH 8.0 includes a number of changes that may affect existing + configurations: + + * 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 + established 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. + + -- Colin Watson Sun, 09 Jun 2019 22:47:27 +0100 + +openssh (1:7.9p1-1) unstable; urgency=medium + + OpenSSH 7.9 includes a number of changes that may affect existing + configurations: + + * ssh(1), sshd(8): the setting of the new CASignatureAlgorithms option + bans the use of DSA keys as certificate authorities. + * sshd(8): the authentication success/failure log message has changed + format slightly. It now includes the certificate fingerprint + (previously it included only key ID and CA key fingerprint). + + -- Colin Watson Sun, 21 Oct 2018 10:39:24 +0100 + +openssh (1:7.8p1-1) unstable; urgency=medium + + OpenSSH 7.8 includes a number of changes that may affect existing + configurations: + + * ssh-keygen(1): Write OpenSSH format private keys by default instead of + using OpenSSL's PEM format. The OpenSSH format, supported in OpenSSH + releases since 2014 and described in the PROTOCOL.key file in the + source distribution, offers substantially better protection against + offline password guessing and supports key comments in private keys. + If necessary, it is possible to write old PEM-style keys by adding "-m + PEM" to ssh-keygen's arguments when generating or updating a key. + * sshd(8): Remove internal support for S/Key multiple factor + authentication. S/Key may still be used via PAM or BSD auth. + * ssh(1): Remove vestigial support for running ssh(1) as setuid. This + used to be required for hostbased authentication and the (long gone) + rhosts-style authentication, but has not been necessary for a long + time. Attempting to execute ssh as a setuid binary, or with uid != + effective uid will now yield a fatal error at runtime. + * sshd(8): The semantics of PubkeyAcceptedKeyTypes and the similar + HostbasedAcceptedKeyTypes options have changed. These now specify + signature algorithms that are accepted for their respective + authentication mechanism, where previously they specified accepted key + types. This distinction matters when using the RSA/SHA2 signature + algorithms "rsa-sha2-256", "rsa-sha2-512" and their certificate + counterparts. Configurations that override these options but omit + these algorithm names may cause unexpected authentication failures (no + action is required for configurations that accept the default for these + options). + * sshd(8): The precedence of session environment variables has changed. + ~/.ssh/environment and environment="..." options in authorized_keys + files can no longer override SSH_* variables set implicitly by sshd. + * ssh(1)/sshd(8): The default IPQoS used by ssh/sshd has changed. They + will now use DSCP AF21 for interactive traffic and CS1 for bulk. For a + detailed rationale, please see the commit message: + https://cvsweb.openbsd.org/src/usr.bin/ssh/readconf.c#rev1.284 + + -- Colin Watson Thu, 30 Aug 2018 15:35:27 +0100 + +openssh (1:7.6p1-1) unstable; urgency=medium + + OpenSSH 7.6 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. + + -- Colin Watson Fri, 06 Oct 2017 12:36:48 +0100 + +openssh (1:7.5p1-1) experimental; urgency=medium + + OpenSSH 7.5 includes a number of changes that may affect existing + configurations: + + * This release deprecates the sshd_config UsePrivilegeSeparation option, + thereby making privilege separation mandatory. + + * The format of several log messages emitted by the packet code has + changed to include additional information about the user and their + authentication state. Software that monitors ssh/sshd logs may need to + account for these changes. For example: + + Connection closed by user x 1.1.1.1 port 1234 [preauth] + Connection closed by authenticating user x 10.1.1.1 port 1234 [preauth] + Connection closed by invalid user x 1.1.1.1 port 1234 [preauth] + + Affected messages include connection closure, timeout, remote + disconnection, negotiation failure and some other fatal messages + generated by the packet code. + + -- Colin Watson Sun, 02 Apr 2017 02:58:01 +0100 + +openssh (1:7.4p1-7) unstable; urgency=medium + + This version restores the default for AuthorizedKeysFile to search both + ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2, as was the case in + Debian configurations before 1:7.4p1-1. Upstream intends to phase out + searching ~/.ssh/authorized_keys2 by default, so you should ensure that + you are only using ~/.ssh/authorized_keys, at least for critical + administrative access; do not assume that the current default will remain + in place forever. + + -- Colin Watson Sun, 05 Mar 2017 02:12:42 +0000 + +openssh (1:7.4p1-1) unstable; urgency=medium + + OpenSSH 7.4 includes a number of changes that may affect existing + configurations: + + * ssh(1): Remove 3des-cbc from the client's default proposal. 64-bit + block ciphers are not safe in 2016 and we don't want to wait until + attacks like SWEET32 are extended to SSH. As 3des-cbc was the only + mandatory cipher in the SSH RFCs, this may cause problems connecting to + older devices using the default configuration, but it's highly likely + that such devices already need explicit configuration for key exchange + and hostkey algorithms already anyway. + * sshd(8): Remove support for pre-authentication compression. Doing + compression early in the protocol probably seemed reasonable in the + 1990s, but today it's clearly a bad idea in terms of both cryptography + (cf. multiple compression oracle attacks in TLS) and attack surface. + Pre-auth compression support has been disabled by default for >10 + years. Support remains in the client. + * ssh-agent will refuse to load PKCS#11 modules outside a whitelist of + trusted paths by default. The path whitelist may be specified at + run-time. + * sshd(8): When a forced-command appears in both a certificate and an + authorized keys/principals command= restriction, sshd will now refuse + to accept the certificate unless they are identical. The previous + (documented) behaviour of having the certificate forced-command + override the other could be a bit confusing and error-prone. + * sshd(8): Remove the UseLogin configuration directive and support for + having /bin/login manage login sessions. + + The unprivileged sshd process that deals with pre-authentication network + traffic is now subject to additional sandboxing restrictions by default: + that is, the default sshd_config now sets UsePrivilegeSeparation to + "sandbox" rather than "yes". This has been the case upstream for a while, + but until now the Debian configuration diverged unnecessarily. + + -- Colin Watson Tue, 27 Dec 2016 18:01:46 +0000 + +openssh (1:7.2p1-1) unstable; urgency=medium + + OpenSSH 7.2 disables a number of legacy cryptographic algorithms by + default in ssh: + + * Several ciphers blowfish-cbc, cast128-cbc, all arcfour variants and the + rijndael-cbc aliases for AES. + * MD5-based and truncated HMAC algorithms. + + These algorithms are already disabled by default in sshd. + + -- Colin Watson Tue, 08 Mar 2016 11:47:20 +0000 + +openssh (1:7.1p1-2) unstable; urgency=medium + + OpenSSH 7.0 disables several pieces of weak, legacy, and/or unsafe + cryptography. + + * Support for the legacy SSH version 1 protocol is disabled by default at + compile time. Note that this also means that the Cipher keyword in + ssh_config(5) is effectively no longer usable; use Ciphers instead for + protocol 2. The openssh-client-ssh1 package includes "ssh1", "scp1", + and "ssh-keygen1" binaries which you can use if you have no alternative + way to connect to an outdated SSH1-only server; please contact the + server administrator or system vendor in such cases and ask them to + upgrade. + * Support for the 1024-bit diffie-hellman-group1-sha1 key exchange is + disabled by default at run-time. It may be re-enabled using the + instructions at http://www.openssh.com/legacy.html + * Support for ssh-dss, ssh-dss-cert-* host and user keys is disabled by + default at run-time. These may be re-enabled using the instructions at + http://www.openssh.com/legacy.html + * Support for the legacy v00 cert format has been removed. + + Future releases will retire more legacy cryptography, including: + + * Refusing all RSA keys smaller than 1024 bits (the current minimum is + 768 bits). + * Several ciphers will be disabled by default: blowfish-cbc, cast128-cbc, + all arcfour variants, and the rijndael-cbc aliases for AES. + * MD5-based HMAC algorithms will be disabled by default. + + -- Colin Watson Tue, 08 Dec 2015 15:33:08 +0000 + +openssh (1:6.9p1-1) unstable; urgency=medium + + UseDNS now defaults to 'no'. Configurations that match against the client + host name (via sshd_config or authorized_keys) may need to re-enable it or + convert to matching against addresses. + + -- Colin Watson Thu, 20 Aug 2015 10:38:58 +0100 + +openssh (1:6.7p1-5) unstable; urgency=medium + + openssh-server 1:6.7p1-4 changed the default setting of AcceptEnv to list + a number of specific LC_FOO variables rather than the wildcard LC_*. I + have since been persuaded that this was a bad idea and have reverted it, + but it is difficult to automatically undo the change to + /etc/ssh/sshd_config without compounding the problem (that of modifying + configuration that some users did not want to be modified) further. Most + users who upgraded via version 1:6.7p1-4 should restore the previous value + of "AcceptEnv LANG LC_*" in /etc/ssh/sshd_config. + + -- Colin Watson Sun, 22 Mar 2015 23:09:32 +0000 + +openssh (1:5.4p1-2) unstable; urgency=low + + Smartcard support is now available using PKCS#11 tokens. If you were + previously using an unofficial build of Debian's OpenSSH package with + OpenSC-based smartcard support added, then note that commands like + 'ssh-add -s 0' will no longer work; you need to use 'ssh-add -s + /usr/lib/opensc-pkcs11.so' instead. + + -- Colin Watson Sat, 10 Apr 2010 01:08:59 +0100 + +openssh (1:3.8.1p1-9) experimental; urgency=low + + The ssh package has been split into openssh-client and openssh-server. If + you had previously requested that the sshd server should not be run, then + that request will still be honoured. However, the recommended approach is + now to remove the openssh-server package if you do not want to run sshd. + You can remove the old /etc/ssh/sshd_not_to_be_run marker file after doing + that. + + -- Colin Watson Mon, 2 Aug 2004 20:48:54 +0100 + +openssh (1:3.5p1-1) unstable; urgency=low + + This version of OpenSSH disables the environment option for public keys by + default, in order to avoid certain attacks (for example, LD_PRELOAD). If + you are using this option in an authorized_keys file, beware that the keys + in question will no longer work until the option is removed. + + To re-enable this option, set "PermitUserEnvironment yes" in + /etc/ssh/sshd_config after the upgrade is complete, taking note of the + warning in the sshd_config(5) manual page. + + -- Colin Watson Sat, 26 Oct 2002 19:41:51 +0100 + +openssh (1:3.0.1p1-1) unstable; urgency=high + + As of version 3, OpenSSH no longer uses separate files for ssh1 and ssh2 + keys. This means the authorized_keys2 and known_hosts2 files are no longer + needed. They will still be read in order to maintain backward + compatibility. + + -- Matthew Vernon Thu, 28 Nov 2001 17:43:01 +0000 diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..dbe6c29 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,295 @@ +OpenSSH for Debian +------------------ + +UPGRADE ISSUES +============== + +PermitRootLogin +--------------- + +As of 1:6.6p1-1, new installations will be set to "PermitRootLogin +without-password" (or the synonymous "PermitRootLogin prohibit-password" as +of 1:7.1p1-1). This disables password authentication for root, foiling +password dictionary attacks on the root user. Some sites may wish to use +the stronger "PermitRootLogin forced-commands-only" or "PermitRootLogin no", +but note that "PermitRootLogin no" will break setups that SSH to root with a +forced command to take full-system backups. You can use PermitRootLogin in +a Match block if you want finer-grained control here. + +For many years Debian's OpenSSH packaging used "PermitRootLogin yes", in +line with upstream. To avoid breaking local setups, this is still true for +installations upgraded from before 1:6.6p1-1. If you wish to change this, +you should edit /etc/ssh/sshd_config, change it manually, and run "service +ssh restart" as root. + +Disabling PermitRootLogin means that an attacker possessing credentials for +the root account (any credentials in the case of "yes", or private key +material in the case of "prohibit-password") must compromise a normal user +account rather than being able to SSH directly to root. Be careful to avoid +a false illusion of security if you change this setting; any account you +escalate to root from should be considered equivalent to root for the +purposes of security against external attack. You might for example disable +it if you know you will only ever log in as root from the physical console. + +Since the root account does not generally have non-password credentials +unless you explicitly install an SSH public key in its +~/.ssh/authorized_keys, which you presumably only do if you want to SSH to +it, "prohibit-password" should be a reasonable default for most sites. + +As of OpenSSH 7.0, this is the upstream default. + +For further discussion, see: + + https://bugs.debian.org/298138 + https://bugzilla.mindrot.org/show_bug.cgi?id=2164 + +X11 Forwarding +-------------- + +ssh's default for ForwardX11 has been changed to ``no'' because it has +been pointed out that logging into remote systems administered by +untrusted people is likely to open you up to X11 attacks, so you +should have to actively decide that you trust the remote machine's +root, before enabling X11. I strongly recommend that you do this on a +machine-by-machine basis, rather than just enabling it in the default +host settings. + +In order for X11 forwarding to work, you need to install xauth on the +server. In Debian this is in the xbase-clients package. + +As of OpenSSH 3.1, the remote $DISPLAY uses localhost by default to reduce +the security risks of X11 forwarding. Look up X11UseLocalhost in +sshd_config(8) if this is a problem. + +OpenSSH 3.8 invented ForwardX11Trusted, which when set to no causes the +ssh client to create an untrusted X cookie so that attacks on the +forwarded X11 connection can't become attacks on X clients on the remote +machine. However, this has some problems in implementation - notably a +very short timeout of the untrusted cookie - breaks large numbers of +existing setups, and generally seems immature. The Debian package +therefore sets the default for this option to "yes" (in ssh itself, +rather than in ssh_config). + +Fallback to RSH +--------------- + +The default for this setting has been changed from Yes to No, for +security reasons, and to stop the delay attempting to rsh to machines +that don't offer the service. Simply switch it back on in either +/etc/ssh/ssh_config or ~/.ssh/config for those machines that you need +it for. + +Setgid ssh-agent and environment variables +------------------------------------------ + +As of version 1:3.5p1-1, ssh-agent is installed setgid to prevent ptrace() +attacks retrieving private key material. This has the side-effect of causing +glibc to remove certain environment variables which might have security +implications for set-id programs, including LD_PRELOAD, LD_LIBRARY_PATH, and +TMPDIR. + +If you need to set any of these environment variables, you will need to do +so in the program exec()ed by ssh-agent. This may involve creating a small +wrapper script. + +Symlink Hostname invocation +--------------------------- + +This version of ssh no longer includes support for invoking ssh with the +hostname as the name of the file run. People wanting this support should +use the ssh-argv0 script. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +OTHER ISSUES +============ + +Authorization Forwarding +------------------------ + +Similarly, root on a remote server could make use of your ssh-agent +(while you're logged into their machine) to obtain access to machines +which trust your keys. This feature is therefore disabled by default. +You should only re-enable it for those hosts (in your ~/.ssh/config or +/etc/ssh/ssh_config) where you are confident that the remote machine +is not a threat. + +Problems logging in with RSA authentication +------------------------------------------- + +If you have trouble logging in with RSA authentication then the +problem is probably caused by the fact that you have your home +directory writable by group, as well as user (this is the default on +Debian systems). + +Depending upon other settings on your system (i.e. other users being +in your group) this could open a security hole, so you will need to +make your home directory writable only by yourself. Run this command, +as yourself: + + chmod g-w ~/ + +to remove group write permissions. If you use ssh-copy-id to install your +keys, it does this for you. + +-L option of ssh nonfree +------------------------ + +non-free ssh supported the usage of the option -L to use a non privileged +port for scp. This option will not be supported by scp from openssh. + +Please use instead scp -o "UsePrivilegedPort=no" as documented in the +manpage to scp itself. + +Problem logging in because of TCP-Wrappers +------------------------------------------ + +ssh is compiled with support for tcp-wrappers. So if you can no longer +log into your system, please check that /etc/hosts.allow and /etc/hosts.deny +are configured so that ssh is not blocked. + +Kerberos support +---------------- + +ssh is now compiled with Kerberos support. Unfortunately, privilege +separation is incompatible with parts of Kerberos support for protocol 2; +you may need to run kinit after logging in. + +Interoperability between scp and the ssh.com SSH server +------------------------------------------------------- + +In version 2 and greater of the commercial SSH server produced by SSH +Communications Security, scp was changed to use SFTP (SSH2's file transfer +protocol) instead of the traditional rcp-over-ssh, thereby breaking +compatibility. The OpenSSH developers regard this as a bug in the ssh.com +server, and do not currently intend to change OpenSSH's scp to match. + +Workarounds for this problem are to install scp1 on the server (scp2 will +fall back to it), to use sftp, or to use some other transfer mechanism such +as rsync-over-ssh or tar-over-ssh. + +Running sshd from inittab +------------------------- + +Some people find it useful to run the sshd server from inittab, to make sure +that it always stays running. To do this, stop sshd ('service ssh stop'), +add the following line to /etc/inittab, and run 'telinit q': + + ss:2345:respawn:/usr/sbin/sshd -D + +If you do this, note that you will need to stop sshd being started in the +normal way ('update-rc.d ssh disable') and that you will need to restart +this sshd manually on upgrades. + +Per-connection sshd instances with systemd +------------------------------------------ + +If you want to reconfigure systemd to listen on port 22 itself and launch an +instance of sshd for each connection (inetd-style socket activation), then +you can run: + + systemctl stop ssh.service + systemctl start ssh.socket + +To make this permanent: + + systemctl disable ssh.service + systemctl enable ssh.socket + +This may be appropriate in environments where minimal footprint is critical +(e.g. cloud guests). Be aware that this bypasses MaxStartups, and systemd's +MaxConnections cannot quite replace this as it cannot distinguish between +authenticated and unauthenticated connections; see +https://bugzilla.redhat.com/show_bug.cgi?id=963268 for more discussion. + +The provided ssh.socket unit file sets ListenStream=22. If you need to have +it listen on a different address or port, then you will need to do this as +follows (modifying ListenStream to match your requirements): + + mkdir -p /etc/systemd/system/ssh.socket.d + cat >/etc/systemd/system/ssh.socket.d/listen.conf <= 230 installed (following openssh-server's +Recommends) and "UsePAM yes" in sshd_config (the default configuration +shipped by this package), then SSH sessions will be terminated cleanly when +the server is shut down or rebooted. + +If either of these conditions does not hold, then you may find that SSH +sessions hang silently when the server is shut down or rebooted. If you do +not want to use PAM or configure it properly for whatever reason, then you +can instead copy +/usr/share/doc/openssh-server/examples/ssh-session-cleanup.service to +/etc/systemd/system/ and run "systemctl enable ssh-session-cleanup.service". + +Non-systemd users may find /usr/lib/openssh/ssh-session-cleanup helpful if +they have a similar problem, although at present there is no system +integration for this for anything other than systemd. + +SSH protocol 1 server support removed +------------------------------------- + +sshd(8) no longer supports the old SSH protocol 1, so all the configuration +options related to it are now deprecated and should be removed from +/etc/ssh/sshd_config. These are: + + KeyRegenerationInterval + RSAAuthentication + RhostsRSAAuthentication + ServerKeyBits + +The Protocol option is also no longer needed, although it is silently +ignored rather than deprecated. + +if-up hook removed +------------------ + +openssh-server previously shipped an if-up hook that restarted sshd when a +network interface came up. This generally caused more problems than it +solved: for instance, it means that sshd stops listening briefly while being +restarted, which can cause problems in some environments, particularly +automated tests. + +The only known situation where the if-up hook was useful was when +sshd_config was changed to add ListenAddress entries for particular IP +addresses, overriding the default of listening on all addresses, and the +system is one that often roams between networks. In such a situation, it is +better to remove ListenAddress entries from sshd_config (restoring it to the +default behaviour) and instead use firewall rules to restrict incoming SSH +connections to only the desired interfaces or addresses. + +For further discussion, see: + + https://bugs.launchpad.net/bugs/1674330 + +IPQoS defaults reverted to pre-7.8 values +----------------------------------------- + +OpenSSH 7.8 changed the default IPQoS settings to use DSCP AF21 for +interactive traffic and CS1 for bulk. This caused some problems with other +software ("iptables -m tos" and VMware), so Debian's OpenSSH reverts this +change for the time being. + +This is *temporary*, and we expect to come back into sync with upstream +OpenSSH once those other issues have been fixed. If you want to restore the +upstream default, add this to ssh_config and sshd_config: + + IPQoS af21 cs1 + +For further discussion, see: + + https://bugs.debian.org/923879 + https://bugs.debian.org/926229 + https://bugs.launchpad.net/1822370 + +-- +Matthew Vernon +Colin Watson diff --git a/debian/adjust-openssl-dependencies b/debian/adjust-openssl-dependencies new file mode 100755 index 0000000..1cd7f29 --- /dev/null +++ b/debian/adjust-openssl-dependencies @@ -0,0 +1,36 @@ +#! /bin/sh +# Attempt to tighten libssl dependencies to match the check in entropy.c. +# Must be run after dpkg-shlibdeps. + +client=debian/openssh-client.substvars +server=debian/openssh-server.substvars + +libssl_version="$(dpkg-query -W libssl-dev 2>/dev/null | cut -f2)" +if [ -z "$libssl_version" ]; then + echo "Can't find libssl-dev version; leaving dependencies alone." + exit 0 +fi +libssl_version="$(echo "$libssl_version" | sed 's/[a-z-].*//')" + +libssl_package="$(sed -n 's/.*[= ]\(libssl[0-9][a-z0-9+.-]*\).*/\1/p' "$client")" +if [ "$libssl_package" ]; then + new_dep="$libssl_package (>= $libssl_version)" + sed -i "/^shlibs:Depends=/s/\$/, $new_dep/" "$client" + sed -i "/^shlibs:Depends=/s/\$/, $new_dep/" "$server" +fi + +client_udeb=debian/openssh-client-udeb.substvars +server_udeb=debian/openssh-server-udeb.substvars + +libcrypto_package="$(sed -n 's/.*[= ]\(libcrypto[0-9][a-z0-9+.-]*\).*/\1/p' "$client_udeb")" +if [ "$libcrypto_package" ]; then + new_dep="$libcrypto_package (>= $libssl_version)" + if [ -e "$client_udeb" ]; then + sed -i "/^shlibs:Depends=/s/\$/, $new_dep/" "$client_udeb" + fi + if [ -e "$server_udeb" ]; then + sed -i "/^shlibs:Depends=/s/\$/, $new_dep/" "$server_udeb" + fi +fi + +exit 0 diff --git a/debian/agent-launch b/debian/agent-launch new file mode 100755 index 0000000..3b2abdb --- /dev/null +++ b/debian/agent-launch @@ -0,0 +1,24 @@ +#!/bin/sh +# helper script for launching ssh-agent, used by systemd unit +set -e + +if [ ! -d "$XDG_RUNTIME_DIR" ]; then + # shellcheck disable=SC2016 + echo 'This needs $XDG_RUNTIME_DIR to be set' >&2 + exit 1 +fi + +if [ "$1" = start ]; then + if [ -z "$SSH_AUTH_SOCK" ] && grep -s -q '^use-ssh-agent$' /etc/X11/Xsession.options; then + S="$XDG_RUNTIME_DIR/openssh_agent" + dbus-update-activation-environment --verbose --systemd SSH_AUTH_SOCK="$S" SSH_AGENT_LAUNCHER=openssh + exec ssh-agent -D -a "$S" + fi +elif [ "$1" = stop ]; then + if [ "$SSH_AGENT_LAUNCHER" = openssh ]; then + dbus-update-activation-environment --systemd SSH_AUTH_SOCK= + fi +else + echo "Unknown command $1" >&2 + exit 1 +fi diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..9ff6e36 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6133 @@ +openssh (1:8.4p1-5+deb11u3) bullseye-security; urgency=medium + + * Cherry-pick from upstream: + - [CVE-2021-41617]: sshd(8) from OpenSSH 6.2 through 8.7 failed to + correctly initialise supplemental groups when executing an + AuthorizedKeysCommand or AuthorizedPrincipalsCommand, where a + AuthorizedKeysCommandUser or AuthorizedPrincipalsCommandUser directive + has been set to run the command as a different user. Instead these + commands would inherit the groups that sshd(8) was started with + (closes: #995130). + - [CVE-2023-48795] ssh(1), sshd(8): implement protocol extensions to + thwart the so-called "Terrapin attack" discovered by Fabian Bäumer, + Marcus Brinkmann and Jörg Schwenk. This attack allows a MITM to effect + a limited break of the integrity of the early encrypted SSH transport + protocol by sending extra messages prior to the commencement of + encryption, and deleting an equal number of consecutive messages + immediately after encryption starts. A peer SSH client/server would + not be able to detect that messages were deleted. + - [CVE-2023-51385] ssh(1): if an invalid user or hostname that contained + shell metacharacters was passed to ssh(1), and a ProxyCommand, + LocalCommand directive or "match exec" predicate referenced the user + or hostname via %u, %h or similar expansion token, then an attacker + who could supply arbitrary user/hostnames to ssh(1) could potentially + perform command injection depending on what quoting was present in the + user-supplied ssh_config(5) directive. ssh(1) now bans most shell + metacharacters from user and hostnames supplied via the command-line. + + -- Colin Watson Thu, 21 Dec 2023 16:09:44 +0000 + +openssh (1:8.4p1-5+deb11u2) bullseye; urgency=medium + + * Cherry-pick from OpenSSH 9.3p2: + - [CVE-2023-38408] Fix a condition where specific libraries loaded via + ssh-agent(1)'s PKCS#11 support could be abused to achieve remote code + execution via a forwarded agent socket (closes: #1042460). + + -- Colin Watson Sat, 23 Sep 2023 23:13:51 +0100 + +openssh (1:8.4p1-5+deb11u1) bullseye; urgency=medium + + * Backport from upstream: + - Add new pselect6_time64 syscall on 32-bit architectures (closes: + #1004427). + + -- Colin Watson Fri, 01 Jul 2022 23:37:41 +0100 + +openssh (1:8.4p1-5) unstable; urgency=high + + * CVE-2021-28041: Fix double free in ssh-agent(1) (closes: #984940). + + -- Colin Watson Sat, 13 Mar 2021 09:59:40 +0000 + +openssh (1:8.4p1-4) unstable; urgency=medium + + * Avoid using libmd's even if it's installed (closes: #982705). + + -- Colin Watson Mon, 15 Feb 2021 10:25:17 +0000 + +openssh (1:8.4p1-3) unstable; urgency=medium + + * Backport from upstream: + - Fix `EOF: command not found` error in ssh-copy-id (closes: #975540). + + -- Colin Watson Wed, 02 Dec 2020 10:32:23 +0000 + +openssh (1:8.4p1-2) unstable; urgency=medium + + * Revert incorrect upstream patch that claimed to fix the seccomp sandbox + on x32 but in fact broke it instead. + + -- Colin Watson Mon, 26 Oct 2020 17:41:13 +0000 + +openssh (1:8.4p1-1) unstable; urgency=medium + + * New upstream release (https://www.openssh.com/txt/release-8.4): + - [SECURITY] ssh-agent(1): restrict ssh-agent from signing web + challenges for FIDO/U2F keys. + - [SECURITY] ssh-keygen(1): Enable FIDO 2.1 credProtect extension when + generating a FIDO resident key. + - ssh-keygen(1): the format of the attestation information optionally + recorded when a FIDO key is generated has changed. It now includes the + authenticator data needed to validate attestation signatures. + - The API between OpenSSH and the FIDO token middleware has changed and + the SSH_SK_VERSION_MAJOR version has been incremented as a result. + Third-party middleware libraries must support the current API version + (7) to work with OpenSSH 8.4. + - ssh(1), ssh-keygen(1): support for FIDO keys that require a PIN for + each use. These keys may be generated using ssh-keygen using a new + "verify-required" option. When a PIN-required key is used, the user + will be prompted for a PIN to complete the signature operation. + - sshd(8): authorized_keys now supports a new "verify-required" option + to require FIDO signatures assert that the token verified that the + user was present before making the signature. The FIDO protocol + supports multiple methods for user-verification, but currently OpenSSH + only supports PIN verification. + - sshd(8), ssh-keygen(1): add support for verifying FIDO webauthn + signatures. Webauthn is a standard for using FIDO keys in web + browsers. These signatures are a slightly different format to plain + FIDO signatures and thus require explicit support. + - ssh(1): allow some keywords to expand shell-style ${ENV} environment + variables. The supported keywords are CertificateFile, ControlPath, + IdentityAgent and IdentityFile, plus LocalForward and RemoteForward + when used for Unix domain socket paths. + - ssh(1), ssh-agent(1): allow some additional control over the use of + ssh-askpass via a new $SSH_ASKPASS_REQUIRE environment variable, + including forcibly enabling and disabling its use (closes: #368657). + - ssh(1): allow ssh_config(5)'s AddKeysToAgent keyword accept a time + limit for keys in addition to its current flag options. Time-limited + keys will automatically be removed from ssh-agent after their expiry + time has passed. + - scp(1), sftp(1): allow the -A flag to explicitly enable agent + forwarding in scp and sftp. The default remains to not forward an + agent, even when ssh_config enables it. + - ssh(1): add a '%k' TOKEN that expands to the effective HostKey of the + destination. This allows, e.g., keeping host keys in individual files + using "UserKnownHostsFile ~/.ssh/known_hosts.d/%k" (closes: #481250). + - ssh(1): add %-TOKEN, environment variable and tilde expansion to the + UserKnownHostsFile directive, allowing the path to be completed by the + configuration. + - ssh-keygen(1): allow "ssh-add -d -" to read keys to be deleted from + stdin. + - sshd(8): improve logging for MaxStartups connection throttling. sshd + will now log when it starts and stops throttling and periodically + while in this state. + - ssh(1), ssh-keygen(1): better support for multiple attached FIDO + tokens. In cases where OpenSSH cannot unambiguously determine which + token to direct a request to, the user is now required to select a + token by touching it. In cases of operations that require a PIN to be + verified, this avoids sending the wrong PIN to the wrong token and + incrementing the token's PIN failure counter (tokens effectively erase + their keys after too many PIN failures). + - sshd(8): fix Include before Match in sshd_config (LP: #1885990). + - ssh(1): close stdin/out/error when forking after authentication + completes ("ssh -f ..."). + - ssh(1), sshd(8): limit the amount of channel input data buffered, + avoiding peers that advertise large windows but are slow to read from + causing high memory consumption. + - ssh-agent(1): handle multiple requests sent in a single write() to the + agent. + - sshd(8): allow sshd_config longer than 256k. + - sshd(8): avoid spurious "Unable to load host key" message when sshd + load a private key but no public counterpart. + - ssh(1): prefer the default hostkey algorithm list whenever we have a + hostkey that matches its best-preference algorithm. + - sshd(1): when ordering the hostkey algorithms to request from a + server, prefer certificate types if the known_hosts files contain a + key marked as a @cert-authority. + - ssh(1): perform host key fingerprint comparisons for the "Are you sure + you want to continue connecting (yes/no/[fingerprint])?" prompt with + case sensitivity. + - sshd(8): ensure that address/masklen mismatches in sshd_config yield + fatal errors at daemon start time rather than later when they are + evaluated. + - ssh-keygen(1): ensure that certificate extensions are lexically + sorted. Previously if the user specified a custom extension then the + everything would be in order except the custom ones. + - ssh(1): also compare username when checking for JumpHost loops. + - ssh-keygen(1): preserve group/world read permission on known_hosts + files across runs of "ssh-keygen -Rf /path". The old behaviour was to + remove all rights for group/other. + - ssh-keygen(1): Mention the [-a rounds] flag in the ssh-keygen manual + page and usage(). + - sshd(8): explicitly construct path to ~/.ssh/rc rather than relying on + it being relative to the current directory, so that it can still be + found if the shell startup changes its directory. + - sshd(8): when redirecting sshd's log output to a file, undo this + redirection after the session child process is forked(). Fixes missing + log messages when using this feature under some circumstances. + - sshd(8): start ClientAliveInterval bookkeeping before first pass + through select() loop; fixed theoretical case where busy sshd may + ignore timeouts from client. + - ssh(1): only reset the ServerAliveInterval check when we receive + traffic from the server and ignore traffic from a port forwarding + client, preventing a client from keeping a connection alive when it + should be terminated. + - ssh-keygen(1): avoid spurious error message when ssh-keygen creates + files outside ~/.ssh. + - sftp-client(1): fix off-by-one error that caused sftp downloads to + make one more concurrent request that desired. This prevented using + sftp(1) in unpipelined request/response mode, which is useful when + debugging. + - ssh(1), sshd(8): handle EINTR in waitfd() and timeout_connect() + helpers. + - ssh(1), ssh-keygen(1): defer creation of ~/.ssh until we attempt to + write to it so we don't leave an empty .ssh directory when it's not + needed. + - ssh(1), sshd(8): fix multiplier when parsing time specifications when + handling seconds after other units. + - sshd(8): always send any PAM account messages. If the PAM account + stack returns any messages, always send them to the user and not just + if the check succeeds. + - gnome-ssh-askpass3: ensure the "close" button is not focused by + default for SSH_ASKPASS_PROMPT=none prompts. Avoids space/enter + accidentally dismissing FIDO touch notifications. + - gnome-ssh-askpass3: allow some control over textarea colour via + $GNOME_SSH_ASKPASS_FG_COLOR and $GNOME_SSH_ASKPASS_BG_COLOR + environment variables. + - Detect the Frankenstein monster of Linux/X32 and allow the sandbox to + function there. + + -- Colin Watson Tue, 20 Oct 2020 14:15:17 +0100 + +openssh (1:8.3p1-1) unstable; urgency=medium + + * New upstream release (https://www.openssh.com/txt/release-8.3): + - [SECURITY] scp(1): when receiving files, scp(1) could become + desynchronised if a utimes(2) system call failed. This could allow + file contents to be interpreted as file metadata and thereby permit an + adversary to craft a file system that, when copied with scp(1) in a + configuration that caused utimes(2) to fail (e.g. under a SELinux + policy or syscall sandbox), transferred different file names and + contents to the actual file system layout. + - sftp(1): reject an argument of "-1" in the same way as ssh(1) and + scp(1) do instead of accepting and silently ignoring it. + - sshd(8): make IgnoreRhosts a tri-state option: "yes" to ignore + rhosts/shosts, "no" to allow rhosts/shosts or (new) "shosts-only" to + allow .shosts files but not .rhosts. + - sshd(8): allow the IgnoreRhosts directive to appear anywhere in a + sshd_config, not just before any Match blocks. + - ssh(1): add %TOKEN percent expansion for the LocalForward and + RemoteForward keywords when used for Unix domain socket forwarding. + - all: allow loading public keys from the unencrypted envelope of a + private key file if no corresponding public key file is present. + - ssh(1), sshd(8): prefer to use chacha20 from libcrypto where possible + instead of the (slower) portable C implementation included in OpenSSH. + - ssh-keygen(1): add ability to dump the contents of a binary key + revocation list via "ssh-keygen -lQf /path". + - ssh(1): fix IdentitiesOnly=yes to also apply to keys loaded from a + PKCS11Provider. + - ssh-keygen(1): avoid NULL dereference when trying to convert an + invalid RFC4716 private key. + - scp(1): when performing remote-to-remote copies using "scp -3", start + the second ssh(1) channel with BatchMode=yes enabled to avoid + confusing and non-deterministic ordering of prompts. + - ssh(1), ssh-keygen(1): when signing a challenge using a FIDO token, + perform hashing of the message to be signed in the middleware layer + rather than in OpenSSH code. This permits the use of security key + middlewares that perform the hashing implicitly, such as Windows + Hello. + - ssh(1): fix incorrect error message for "too many known hosts files." + - ssh(1): make failures when establishing "Tunnel" forwarding terminate + the connection when ExitOnForwardFailure is enabled. + - ssh-keygen(1): fix printing of fingerprints on private keys and add a + regression test for same. + - sshd(8): document order of checking AuthorizedKeysFile (first) and + AuthorizedKeysCommand (subsequently, if the file doesn't match). + - sshd(8): document that /etc/hosts.equiv and /etc/shosts.equiv are not + considered for HostbasedAuthentication when the target user is root. + - ssh(1), ssh-keygen(1): fix NULL dereference in private certificate key + parsing. + - ssh(1), sshd(8): more consistency between sets of %TOKENS are accepted + in various configuration options. + - ssh(1), ssh-keygen(1): improve error messages for some common PKCS#11 + C_Login failure cases. + - ssh(1), sshd(8): make error messages for problems during SSH banner + exchange consistent with other SSH transport-layer error messages and + ensure they include the relevant IP addresses. + - ssh-keygen(1), ssh-add(1): when downloading FIDO2 resident keys from a + token, don't prompt for a PIN until the token has told us that it + needs one. Avoids double-prompting on devices that implement + on-device authentication (closes: #932071). + - sshd(8), ssh-keygen(1): no-touch-required FIDO certificate option + should be an extension, not a critical option. + - ssh(1), ssh-keygen(1), ssh-add(1): offer a better error message when + trying to use a FIDO key function and SecurityKeyProvider is empty. + - ssh-add(1), ssh-agent(8): ensure that a key lifetime fits within the + values allowed by the wire format (u32). Prevents integer wraparound + of the timeout values. + - ssh(1): detect and prevent trivial configuration loops when using + ProxyJump. bz#3057. + - On platforms that do not support setting process-wide routing domains + (all excepting OpenBSD at present), fail to accept a configuration + attempts to set one at process start time rather than fatally erroring + at run time. + - Fix theoretical infinite loop in the glob(3) replacement + implementation. + * Update GSSAPI key exchange patch from + https://github.com/openssh-gsskex/openssh-gsskex: + - Fix connection through ProxyJump in combination with "GSSAPITrustDNS + yes". + - Enable SHA2-based GSSAPI key exchange methods by default as RFC 8732 + was published. + * Fix or suppress various shellcheck errors under debian/. + * Use AUTOPKGTEST_TMP rather than the deprecated ADTTMP. + * Apply upstream patch to fix the handling of Port directives after + Include (closes: #962035, LP: #1876320). + + -- Colin Watson Sun, 07 Jun 2020 13:44:04 +0100 + +openssh (1:8.2p1-4) unstable; urgency=medium + + * Add /etc/ssh/ssh_config.d/ to openssh-client. + * Add /etc/ssh/sshd_config.d/ to openssh-server (closes: #952427). + * Install ssh-sk-helper even on non-Linux architectures, though it will + need an external middleware library in those cases. + + -- Colin Watson Wed, 26 Feb 2020 10:55:07 +0000 + +openssh (1:8.2p1-3) unstable; urgency=medium + + * Reupload with -sa to work around confusion with 1:8.2p1-1 being in NEW. + + -- Colin Watson Sun, 23 Feb 2020 13:30:01 +0000 + +openssh (1:8.2p1-2) unstable; urgency=medium + + * Move ssh-sk-helper into openssh-client rather than shipping it in a + separate package. The extra library dependencies are pretty small, so + it doesn't seem worth bloating the Packages file. Suggested by Bastian + Blank. + + -- Colin Watson Sun, 23 Feb 2020 11:31:31 +0000 + +openssh (1:8.2p1-1) unstable; urgency=medium + + * New upstream release (https://www.openssh.com/txt/release-8.2, closes: + #951582): + - ssh(1), sshd(8), ssh-keygen(1): this release removes the "ssh-rsa" + (RSA/SHA1) algorithm from those accepted for certificate signatures + (i.e. the client and server CASignatureAlgorithms option) and will use + the rsa-sha2-512 signature algorithm by default when the ssh-keygen(1) + CA signs new certificates. + - ssh(1), sshd(8): Remove diffie-hellman-group14-sha1 from the default + key exchange proposal for both the client and server. + - ssh-keygen(1): The command-line options related to the generation and + screening of safe prime numbers used by the + diffie-hellman-group-exchange-* key exchange algorithms have changed. + Most options have been folded under the -O flag. + - sshd(8): The sshd listener process title visible to ps(1) has changed + to include information about the number of connections that are + currently attempting authentication and the limits configured by + MaxStartups. + - Add support for FIDO/U2F hardware authenticators. + - ssh-keygen(1): Add a "no-touch-required" option when generating + FIDO-hosted keys, that disables their default behaviour of requiring a + physical touch/tap on the token during authentication. Note: not all + tokens support disabling the touch requirement. + - sshd(8): Add a sshd_config PubkeyAuthOptions directive that collects + miscellaneous public key authentication-related options for sshd(8). + At present it supports only a single option "no-touch-required". This + causes sshd to skip its default check for FIDO/U2F keys that the + signature was authorised by a touch or press event on the token + hardware. + - ssh(1), sshd(8), ssh-keygen(1): Add a "no-touch-required" option for + authorized_keys and a similar extension for certificates. This option + disables the default requirement that FIDO key signatures attest that + the user touched their key to authorize them, mirroring the similar + PubkeyAuthOptions sshd_config option. + - ssh-keygen(1): Add support for the writing the FIDO attestation + information that is returned when new keys are generated via the "-O + write-attestation=/path" option. FIDO attestation certificates may be + used to verify that a FIDO key is hosted in trusted hardware. OpenSSH + does not currently make use of this information, beyond optionally + writing it to disk. + - Add support for FIDO2 resident keys. + - sshd(8): Add an Include sshd_config keyword that allows including + additional configuration files via glob(3) patterns (closes: #631189). + - ssh(1)/sshd(8): Make the LE (low effort) DSCP code point available via + the IPQoS directive. + - ssh(1): When AddKeysToAgent=yes is set and the key contains no + comment, add the key to the agent with the key's path as the comment. + - ssh-keygen(1), ssh-agent(1): Expose PKCS#11 key labels and X.509 + subjects as key comments, rather than simply listing the PKCS#11 + provider library path. + - ssh-keygen(1): Allow PEM export of DSA and ECDSA keys. + - sshd(8): When clients get denied by MaxStartups, send a notification + prior to the SSH2 protocol banner according to RFC4253 section 4.2 + (closes: #275458). + - ssh(1), ssh-agent(1): When invoking the $SSH_ASKPASS prompt program, + pass a hint to the program to describe the type of desired prompt. + The possible values are "confirm" (indicating that a yes/no + confirmation dialog with no text entry should be shown), "none" (to + indicate an informational message only), or blank for the original + ssh-askpass behaviour of requesting a password/phrase. + - ssh(1): Allow forwarding a different agent socket to the path + specified by $SSH_AUTH_SOCK, by extending the existing ForwardAgent + option to accepting an explicit path or the name of an environment + variable in addition to yes/no. + - ssh-keygen(1): Add a new signature operations "find-principals" to + look up the principal associated with a signature from an + allowed-signers file. + - sshd(8): Expose the number of currently-authenticating connections + along with the MaxStartups limit in the process title visible to "ps". + - sshd(8): Make ClientAliveCountMax=0 have sensible semantics: it will + now disable connection killing entirely rather than the current + behaviour of instantly killing the connection after the first liveness + test regardless of success. + - sshd(8): Clarify order of AllowUsers / DenyUsers vs AllowGroups / + DenyGroups in the sshd(8) manual page. + - sshd(8): Better describe HashKnownHosts in the manual page. + - sshd(8): Clarify that that permitopen=/PermitOpen do no name or + address translation in the manual page. + - sshd(8): Allow the UpdateHostKeys feature to function when multiple + known_hosts files are in use. When updating host keys, ssh will now + search subsequent known_hosts files, but will add updated host keys to + the first specified file only. + - All: Replace all calls to signal(2) with a wrapper around + sigaction(2). This wrapper blocks all other signals during the + handler preventing races between handlers, and sets SA_RESTART which + should reduce the potential for short read/write operations. + - sftp(1): Fix a race condition in the SIGCHILD handler that could turn + in to a kill(-1). + - sshd(8): Fix a case where valid (but extremely large) SSH channel IDs + were being incorrectly rejected. + - ssh(1): When checking host key fingerprints as answers to new hostkey + prompts, ignore whitespace surrounding the fingerprint itself. + - All: Wait for file descriptors to be readable or writeable during + non-blocking connect, not just readable. Prevents a timeout when the + server doesn't immediately send a banner (e.g. multiplexers like + sslh). + - sshd_config(5): Document the sntrup4591761x25519-sha512@tinyssh.org + key exchange algorithm. + * Add more historical md5sums of /etc/ssh/sshd_config between 1:7.4p1-1 + and 1:7.8p1-1 inclusive (closes: #951220). + * ssh(1): Explain that -Y is equivalent to -X in the default configuration + (closes: #951640). + * Include /etc/ssh/ssh_config.d/*.conf from /etc/ssh/ssh_config and + /etc/ssh/sshd_config.d/*.conf from /etc/ssh/sshd_config (closes: + #845315). + + -- Colin Watson Fri, 21 Feb 2020 16:36:37 +0000 + +openssh (1:8.1p1-5) unstable; urgency=medium + + * Apply upstream patches to allow clock_nanosleep() and variants in the + seccomp sandbox, fixing failures with glibc 2.31. + * Apply upstream patch to deny (non-fatally) ipc in the seccomp sandbox, + fixing failures with OpenSSL 1.1.1d and Linux < 3.19 on some + architectures (closes: #946242). + + -- Colin Watson Sat, 11 Jan 2020 23:55:03 +0000 + +openssh (1:8.1p1-4) unstable; urgency=medium + + * Apply upstream patch to stop using 2020 as a future date in regress + tests. + + -- Colin Watson Thu, 09 Jan 2020 11:42:10 +0000 + +openssh (1:8.1p1-3) unstable; urgency=medium + + [ Colin Watson ] + * Drop suggestion of rssh, since it's been removed (see + https://bugs.debian.org/923691). + + [ Steve Langasek ] + * Don't build openssh-tests on Ubuntu i386 (closes: #948466). + + -- Colin Watson Thu, 09 Jan 2020 00:29:58 +0000 + +openssh (1:8.1p1-2) unstable; urgency=medium + + * Drop "Allow flock and ipc syscall for s390 architecture" patch for now; + upstream has security concerns with it and it doesn't currently seem to + be needed. + * Mark openssh-sftp-server, openssh-tests, ssh, and ssh-askpass-gnome as + Multi-Arch: foreign; none of them provide any architecture-dependent + interfaces. + + -- Colin Watson Wed, 11 Dec 2019 23:53:49 +0000 + +openssh (1:8.1p1-1) unstable; urgency=medium + + * New upstream release (https://www.openssh.com/txt/release-8.1): + - 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). + - ssh(1): Allow %n to be expanded in ProxyCommand strings. + - ssh(1), sshd(8): Allow prepending a list of algorithms to the default + set by starting the list with the '^' character, e.g. + "HostKeyAlgorithms ^ssh-ed25519". + - ssh-keygen(1): Add an experimental lightweight signature and + verification ability. Signatures may be made using regular ssh keys + held on disk or stored in a ssh-agent and verified against an + authorized_keys-like list of allowed keys. Signatures embed a + namespace that prevents confusion and attacks between different usage + domains (e.g. files vs email). + - ssh-keygen(1): Print key comment when extracting public key from a + private key. + - ssh-keygen(1): Accept the verbose flag when searching for host keys in + known hosts (i.e. "ssh-keygen -vF host") to print the matching host's + random-art signature too. + - All: Support PKCS8 as an optional format for storage of private keys + to disk. The OpenSSH native key format remains the default, but PKCS8 + is a superior format to PEM if interoperability with non-OpenSSH + software is required, as it may use a less insecure key derivation + function than PEM's. + - ssh(1): If a PKCS#11 token returns no keys then try to login and + refetch them. + - ssh(1): Produce a useful error message if the user's shell is set + incorrectly during "match exec" processing. + - sftp(1): Allow the maximum uint32 value for the argument passed to -b + which allows better error messages from later validation. + - ssh-keyscan(1): Include SHA2-variant RSA key algorithms in KEX + proposal; allows ssh-keyscan to harvest keys from servers that disable + old SHA1 ssh-rsa. + - sftp(1): Print explicit "not modified" message if a file was requested + for resumed download but was considered already complete. + - sftp(1): Fix a typo and make move right to the closest + end of a word just like moves left to the closest + beginning of a word. + - sshd(8): Cap the number of permitopen/permitlisten directives allowed + to appear on a single authorized_keys line. + - All: Fix a number of memory leaks (one-off or on exit paths). + - ssh(1), sshd(8): Check for convtime() refusing to accept times that + resolve to LONG_MAX. + - ssh(1): Slightly more instructive error message when the user + specifies multiple -J options on the command-line (closes: #929669). + - ssh-agent(1): Process agent requests for RSA certificate private keys + using correct signature algorithm when requested. + - sftp(1): Check for user@host when parsing sftp target. This allows + user@[1.2.3.4] to work without a path. + - sshd(8): Enlarge format buffer size for certificate serial number so + the log message can record any 64-bit integer without truncation. + - sshd(8): For PermitOpen violations add the remote host and port to be + able to more easily ascertain the source of the request. Add the same + logging for PermitListen violations which were not previously logged + at all. + - scp(1), sftp(1): Use the correct POSIX format style for left + justification for the transfer progress meter. + - sshd(8): When examining a configuration using sshd -T, assume any + attribute not provided by -C does not match, which allows it to work + when sshd_config contains a Match directive with or without -C. + - ssh(1), ssh-keygen(1): Downgrade PKCS#11 "provider returned no slots" + warning from log level error to debug. This is common when attempting + to enumerate keys on smartcard readers with no cards plugged in. + - ssh(1), ssh-keygen(1): Do not unconditionally log in to PKCS#11 + tokens. Avoids spurious PIN prompts for keys not selected for + authentication in ssh(1) and when listing public keys available in a + token using ssh-keygen(1). + - ssh(1), sshd(8): Fix typo that prevented detection of Linux VRF. + - sshd(8): In the Linux seccomp-bpf sandbox, allow mprotect(2) with + PROT_(READ|WRITE|NONE) only. This syscall is used by some hardened + heap allocators. + - sshd(8): In the Linux seccomp-bpf sandbox, allow the s390-specific + ioctl for ECC hardware support. + * Re-enable hardening on hppa, since the corresponding GCC bug is + apparently fixed. + + -- Colin Watson Thu, 10 Oct 2019 10:23:19 +0100 + +openssh (1:8.0p1-7) unstable; urgency=medium + + [ Daniel Kahn Gillmor ] + * runit: Correct typo in comment. + + [ Colin Watson ] + * Apply upstream patch to deny (non-fatally) shmget/shmat/shmdt in preauth + privsep child, coping with changes in OpenSSL 1.1.1d that broke OpenSSH + on Linux kernels before 3.19 (closes: #941663). + + -- Colin Watson Sat, 05 Oct 2019 22:41:11 +0100 + +openssh (1:8.0p1-6) unstable; urgency=medium + + * Only run dh_runit on openssh-server (closes: #935936). + + -- Colin Watson Wed, 28 Aug 2019 10:53:18 +0100 + +openssh (1:8.0p1-5) unstable; urgency=medium + + [ Lorenzo Puliti ] + * Add a runscript for runit (closes: #933999). + + -- Colin Watson Tue, 27 Aug 2019 15:18:54 +0100 + +openssh (1:8.0p1-4) unstable; urgency=medium + + * Use debhelper-compat instead of debian/compat. + * debian/*.apport: + - Remove #! lines. + - Avoid star imports. + - Fix flake8 errors. + * Run regression tests against the Python 3 version of Twisted Conch. + + -- Colin Watson Sat, 03 Aug 2019 13:33:24 +0100 + +openssh (1:8.0p1-3) unstable; urgency=medium + + * Upload to unstable. + + -- Colin Watson Mon, 08 Jul 2019 17:19:37 +0100 + +openssh (1:8.0p1-2) experimental; urgency=medium + + * Fix interop tests for recent regress changes. + + -- Colin Watson Fri, 14 Jun 2019 14:32:12 +0100 + +openssh (1:8.0p1-1) experimental; urgency=medium + + * New upstream release (https://www.openssh.com/txt/release-8.0, closes: + #927792): + - ssh(1), ssh-agent(1), ssh-add(1): Add support for ECDSA keys in + PKCS#11 tokens (LP: #1665695). + - 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 (LP: #1445625). + - ssh(1): Allow "PKCS11Provider=none" to override later instances of the + PKCS11Provider directive in ssh_config. + - 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. + - 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. + - 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. + - sshd(8): Add a ssh_config "Match final" predicate. Matches in same + pass as "Match canonical" but doesn't require hostname + canonicalisation be enabled. + - sftp(1): Support a prefix of '@' to suppress echo of sftp batch + commands. + - ssh-keygen(1): When printing certificate contents using "ssh-keygen + -Lf /path/certificate", include the algorithm that the CA used to sign + the cert. + - 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. + - ssh(1): Fix bad interaction between the ssh_config ConnectTimeout and + ConnectionAttempts directives - connection attempts after the first + were ignoring the requested timeout (LP: #1798049). + - ssh-keyscan(1): Return a non-zero exit status if no keys were found + (closes: #374980, LP: #1661745). + - scp(1): Sanitize scp filenames to allow UTF-8 characters without + terminal control sequences. + - sshd(8): Fix confusion between ClientAliveInterval and time-based + RekeyLimit that could cause connections to be incorrectly closed. + - 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. + - 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. + - 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. + - 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. + - 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 these buggy clients. + - 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. + - ssh(1): Don't attempt to connect to empty SSH_AUTH_SOCK. + - 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. + - 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. + - sshd(8): Fix bug in HostbasedAcceptedKeyTypes and + PubkeyAcceptedKeyTypes options. If only RSA-SHA2 signature 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. + - ssh(1): Request correct signature types from ssh-agent when + certificate keys and RSA-SHA2 signatures are in use. + - sshd(8): Don't set $MAIL if UsePAM=yes as PAM typically specifies the + user environment if it's enabled (closes: #189920, #532754). + * Mostly resynced GSSAPI key exchange patch with Fedora. Major changes: + - Support selection of GSSAPI key exchange algorithms. + - Support GSSAPI key exchange methods with DH and SHA2. + - Support GSSAPI key exchange using ECDH and SHA2. + - Make sure the Kerberos tickets are cleaned up with the user context. + - Enable gssapi-keyex authentication without gssapi-with-mic. + - Allow querying for GSSAPI key exchange algorithms from ssh (-Q + kex-gss). + * Apply upstream patch to fix the utimensat regression tests when not + using the compatibility implementation. + + -- Colin Watson Sun, 09 Jun 2019 22:47:27 +0100 + +openssh (1:7.9p1-10) unstable; urgency=medium + + * Temporarily revert IPQoS defaults to pre-7.8 values until issues with + "iptables -m tos" and VMware have been fixed (closes: #923879, #926229; + LP: #1822370). + + -- Colin Watson Mon, 08 Apr 2019 11:13:04 +0100 + +openssh (1:7.9p1-9) unstable; urgency=medium + + * Apply upstream patch to make scp handle shell-style brace expansions + when checking that filenames sent by the server match what the client + requested (closes: #923486). + + -- Colin Watson Fri, 01 Mar 2019 12:23:36 +0000 + +openssh (1:7.9p1-8) unstable; urgency=medium + + [ Colin Watson ] + * Apply upstream patch to fix bug in HostbasedAcceptedKeyTypes and + PubkeyAcceptedKeyTypes options in the case where only RSA-SHA2 signature + types were specified. + * Apply upstream patch to request RSA-SHA2 signatures for + rsa-sha2-{256|512}-cert-v01@openssh.com cert algorithms (closes: + #923419). + * Move moduli(5) manual page to openssh-server to go with /etc/ssh/moduli; + forgotten in 1:7.9p1-5. + + [ Dominik George ] + * Correctly handle conffile move to openssh-server (closes: #919344). + + -- Colin Watson Thu, 28 Feb 2019 19:31:49 +0000 + +openssh (1:7.9p1-7) unstable; urgency=medium + + * Recommend "default-logind | logind | libpam-systemd" rather than just + libpam-systemd (closes: #923199). (I've retained libpam-systemd as an + alternative for a while to avoid backporting accidents, although it can + be removed later.) + * Pass "--exec /usr/sbin/sshd" to start-stop-daemon on stop as well as + start and pass "--chuid 0:0" on start, to avoid problems with non-root + groups leaking into the ownership of /run/sshd.pid (closes: #922365). + + -- Colin Watson Tue, 26 Feb 2019 15:13:23 +0000 + +openssh (1:7.9p1-6) unstable; urgency=medium + + * CVE-2019-6109: Apply upstream patches to sanitize scp filenames via + snmprintf (closes: #793412). + * CVE-2019-6111: Apply upstream patch to check in scp client that + filenames sent during remote->local directory copies satisfy the + wildcard specified by the user. + + -- Colin Watson Fri, 08 Feb 2019 16:26:35 +0000 + +openssh (1:7.9p1-5) unstable; urgency=high + + * Move /etc/ssh/moduli to openssh-server, since it's reasonably large and + only used by sshd (closes: #858050). + * Drop obsolete alternate build-dependency on libssl1.0-dev (closes: + #917342). + * CVE-2018-20685: Apply upstream scp patch to disallow empty incoming + filename or ones that refer to the current directory (closes: #919101). + + -- Colin Watson Sun, 13 Jan 2019 11:22:45 +0000 + +openssh (1:7.9p1-4) unstable; urgency=medium + + * Fix Ubuntu detection in debian/rules, since the documentation comment + for dpkg_vendor_derives_from is wrong (thanks, Jeremy Bicha; see + #913816). + + -- Colin Watson Fri, 16 Nov 2018 11:27:28 +0000 + +openssh (1:7.9p1-3) unstable; urgency=medium + + * Be more specific about what files to install in openssh-tests, to avoid + installing a symlink into the build tree. + * Re-export debian/upstream/signing-key.asc without extra signatures. + * Restore direct test dependencies on openssl, putty-tools, and + python-twisted-conch; these are really only indirect dependencies via + openssh-tests, but including them means that this package will be + retested when they change. + + -- Colin Watson Thu, 15 Nov 2018 01:30:56 +0000 + +openssh (1:7.9p1-2) unstable; urgency=medium + + * Add GitLab CI configuration. + * Make the autopkgtest create /run/sshd if it doesn't already exist. + * Drop "set -x" verbosity from the autopkgtest; I think we can do without + this in most cases nowadays. + * Add an openssh-tests binary package containing enough files to run the + upstream regression tests. This allows autopkgtest to run more + efficiently, as it doesn't have to build part of the source tree again. + + -- Colin Watson Wed, 14 Nov 2018 15:55:48 +0000 + +openssh (1:7.9p1-1) unstable; urgency=medium + + * New upstream release (https://www.openssh.com/txt/release-7.9): + - ssh(1), sshd(8): allow most port numbers to be specified using service + names from getservbyname(3) (typically /etc/services; closes: + #177406). + - ssh(1): allow the IdentityAgent configuration directive to accept + environment variable names. This supports the use of multiple agent + sockets without needing to use fixed paths. + - sshd(8): support signalling sessions via the SSH protocol. A limited + subset of signals is supported and only for login or command sessions + (i.e. not subsystems) that were not subject to a forced command via + authorized_keys or sshd_config. + - ssh(1): support "ssh -Q sig" to list supported signature options. + Also "ssh -Q help" to show the full set of supported queries. + - ssh(1), sshd(8): add a CASignatureAlgorithms option for the client and + server configs to allow control over which signature formats are + allowed for CAs to sign certificates. For example, this allows + banning CAs that sign certificates using the RSA-SHA1 signature + algorithm. + - sshd(8), ssh-keygen(1): allow key revocation lists (KRLs) to revoke + keys specified by SHA256 hash. + - ssh-keygen(1): allow creation of key revocation lists directly from + base64-encoded SHA256 fingerprints. This supports revoking keys using + only the information contained in sshd(8) authentication log messages. + - ssh(1), ssh-keygen(1): avoid spurious "invalid format" errors when + attempting to load PEM private keys while using an incorrect + passphrase. + - sshd(8): when a channel closed message is received from a client, + close the stderr file descriptor at the same time stdout is closed. + This avoids stuck processes if they were waiting for stderr to close + and were insensitive to stdin/out closing (closes: #844494). + - ssh(1): allow ForwardX11Timeout=0 to disable the untrusted X11 + forwarding timeout and support X11 forwarding indefinitely. + Previously the behaviour of ForwardX11Timeout=0 was undefined. + - sshd(8): when compiled with GSSAPI support, cache supported method + OIDs regardless of whether GSSAPI authentication is enabled in the + main section of sshd_config. This avoids sandbox violations if GSSAPI + authentication was later enabled in a Match block. + - sshd(8): do not fail closed when configured with a text key revocation + list that contains a too-short key. + - ssh(1): treat connections with ProxyJump specified the same as ones + with a ProxyCommand set with regards to hostname canonicalisation + (i.e. don't try to canonicalise the hostname unless + CanonicalizeHostname is set to 'always'). + - ssh(1): fix regression in OpenSSH 7.8 that could prevent public-key + authentication using certificates hosted in a ssh-agent(1) or against + sshd(8) from OpenSSH <7.8 (LP: #1790963). + - All: support building against the openssl-1.1 API (releases 1.1.0g and + later). The openssl-1.0 API will remain supported at least until + OpenSSL terminates security patch support for that API version + (closes: #828475). + - sshd(8): allow the futex(2) syscall in the Linux seccomp sandbox; + apparently required by some glibc/OpenSSL combinations. + * Remove dh_builddeb override to use xz compression; this has been the + default since dpkg 1.17.0. + * Simplify debian/rules using /usr/share/dpkg/default.mk. + * Remove /etc/network/if-up.d/openssh-server, as it causes more problems + than it solves (thanks, Christian Ehrhardt, Andreas Hasenack, and David + Britton; closes: #789532, LP: #1037738, #1674330, #1718227). Add an + "if-up hook removed" section to README.Debian documenting the corner + case that may need configuration adjustments. + + -- Colin Watson Sun, 21 Oct 2018 10:39:24 +0100 + +openssh (1:7.8p1-1) unstable; urgency=medium + + * New upstream release (https://www.openssh.com/txt/release-7.8, closes: + #907534): + - ssh-keygen(1): Write OpenSSH format private keys by default instead of + using OpenSSL's PEM format (closes: #905407). The OpenSSH format, + supported in OpenSSH releases since 2014 and described in the + PROTOCOL.key file in the source distribution, offers substantially + better protection against offline password guessing and supports key + comments in private keys. If necessary, it is possible to write old + PEM-style keys by adding "-m PEM" to ssh-keygen's arguments when + generating or updating a key. + - sshd(8): Remove internal support for S/Key multiple factor + authentication. S/Key may still be used via PAM or BSD auth. + - ssh(1): Remove vestigial support for running ssh(1) as setuid. This + used to be required for hostbased authentication and the (long gone) + rhosts-style authentication, but has not been necessary for a long + time. Attempting to execute ssh as a setuid binary, or with uid != + effective uid will now yield a fatal error at runtime. + - sshd(8): The semantics of PubkeyAcceptedKeyTypes and the similar + HostbasedAcceptedKeyTypes options have changed. These now specify + signature algorithms that are accepted for their respective + authentication mechanism, where previously they specified accepted key + types. This distinction matters when using the RSA/SHA2 signature + algorithms "rsa-sha2-256", "rsa-sha2-512" and their certificate + counterparts. Configurations that override these options but omit + these algorithm names may cause unexpected authentication failures (no + action is required for configurations that accept the default for + these options). + - sshd(8): The precedence of session environment variables has changed. + ~/.ssh/environment and environment="..." options in authorized_keys + files can no longer override SSH_* variables set implicitly by sshd. + - ssh(1)/sshd(8): The default IPQoS used by ssh/sshd has changed. They + will now use DSCP AF21 for interactive traffic and CS1 for bulk. For + a detailed rationale, please see the commit message: + https://cvsweb.openbsd.org/src/usr.bin/ssh/readconf.c#rev1.284 + - ssh(1)/sshd(8): Add new signature algorithms "rsa-sha2-256-cert- + v01@openssh.com" and "rsa-sha2-512-cert-v01@openssh.com" to explicitly + force use of RSA/SHA2 signatures in authentication. + - sshd(8): Extend the PermitUserEnvironment option to accept a whitelist + of environment variable names in addition to global "yes" or "no" + settings. + - sshd(8): Add a PermitListen directive to sshd_config(5) and a + corresponding permitlisten= authorized_keys option that control which + listen addresses and port numbers may be used by remote forwarding + (ssh -R ...). + - sshd(8): Add some countermeasures against timing attacks used for + account validation/enumeration. sshd will enforce a minimum time or + each failed authentication attempt consisting of a global 5ms minimum + plus an additional per-user 0-4ms delay derived from a host secret. + - sshd(8): Add a SetEnv directive to allow an administrator to + explicitly specify environment variables in sshd_config. Variables + set by SetEnv override the default and client-specified environment. + - ssh(1): Add a SetEnv directive to request that the server sets an + environment variable in the session. Similar to the existing SendEnv + option, these variables are set subject to server configuration. + - ssh(1): Allow "SendEnv -PATTERN" to clear environment variables + previously marked for sending to the server (closes: #573316). + - ssh(1)/sshd(8): Make UID available as a %-expansion everywhere that + the username is available currently. + - ssh(1): Allow setting ProxyJump=none to disable ProxyJump + functionality. + - sshd(8): Avoid observable differences in request parsing that could be + used to determine whether a target user is valid. + - ssh(1)/sshd(8): Fix some memory leaks. + - ssh(1): Fix a pwent clobber (introduced in openssh-7.7) that could + occur during key loading, manifesting as crash on some platforms. + - sshd_config(5): Clarify documentation for AuthenticationMethods + option. + - ssh(1): Ensure that the public key algorithm sent in a public key + SSH_MSG_USERAUTH_REQUEST matches the content of the signature blob. + Previously, these could be inconsistent when a legacy or non-OpenSSH + ssh-agent returned a RSA/SHA1 signature when asked to make a RSA/SHA2 + signature. + - sshd(8): Fix failures to read authorized_keys caused by faulty + supplemental group caching. + - scp(1): Apply umask to directories, fixing potential mkdir/chmod race + when copying directory trees. + - ssh-keygen(1): Return correct exit code when searching for and hashing + known_hosts entries in a single operation. + - ssh(1): Prefer the ssh binary pointed to via argv[0] to $PATH when + re-executing ssh for ProxyJump. + - sshd(8): Do not ban PTY allocation when a sshd session is restricted + because the user password is expired as it breaks password change + dialog. + - ssh(1)/sshd(8): Fix error reporting from select() failures. + - ssh(1): Improve documentation for -w (tunnel) flag, emphasising that + -w implicitly sets Tunnel=point-to-point. + - ssh-agent(1): Implement EMFILE mitigation for ssh-agent. ssh-agent + will no longer spin when its file descriptor limit is exceeded. + - ssh(1)/sshd(8): Disable SSH2_MSG_DEBUG messages for Twisted Conch + clients. Twisted Conch versions that lack a version number in their + identification strings will mishandle these messages when running on + Python 2.x (https://twistedmatrix.com/trac/ticket/9422). + - sftp(1): Notify user immediately when underlying ssh process dies + expectedly. + - ssh(1)/sshd(8): Fix tunnel forwarding; regression in 7.7 release. + - ssh-agent(1): Don't kill ssh-agent's listening socket entirely if it + fails to accept(2) a connection. + - ssh(1): Add some missing options in the configuration dump output (ssh + -G). + - sshd(8): Expose details of completed authentication to PAM auth + modules via SSH_AUTH_INFO_0 in the PAM environment. + * Switch debian/watch to HTTPS. + * Temporarily work around https://twistedmatrix.com/trac/ticket/9515 in + regression tests. + + -- Colin Watson Thu, 30 Aug 2018 15:35:27 +0100 + +openssh (1:7.7p1-4) unstable; urgency=high + + * CVE-2018-15473: Apply upstream patch to delay bailout for invalid + authenticating user until after the packet containing the request has + been fully parsed (closes: #906236). + + -- Colin Watson Fri, 17 Aug 2018 14:09:32 +0100 + +openssh (1:7.7p1-3) unstable; urgency=medium + + [ Colin Watson ] + * Adjust git-dpm tagging configuration. + * Remove no-longer-used Lintian overrides from openssh-server and ssh. + * Add Documentation keys to ssh-agent.service, ssh.service, and + ssh@.service. + + [ Juri Grabowski ] + * Add rescue.target with ssh support. + + [ Christian Ehrhardt ] + * Fix unintentional restriction of authorized keys environment options + to be alphanumeric (closes: #903474, LP: #1771011). + + -- Colin Watson Tue, 10 Jul 2018 16:07:16 +0100 + +openssh (1:7.7p1-2) unstable; urgency=medium + + * Fix parsing of DebianBanner option (closes: #894730). + + -- Colin Watson Wed, 04 Apr 2018 00:47:29 +0100 + +openssh (1:7.7p1-1) unstable; urgency=medium + + * New upstream release (https://www.openssh.com/txt/release-7.7): + - ssh(1)/sshd(8): Drop compatibility support for some very old SSH + implementations, including ssh.com <=2.* and OpenSSH <= 3.*. These + versions were all released in or before 2001 and predate the final SSH + RFCs. The support in question isn't necessary for RFC-compliant SSH + implementations. + - Add experimental support for PQC XMSS keys (Extended Hash-Based + Signatures). + - sshd(8): Add an "rdomain" criterion for the sshd_config Match keyword + to allow conditional configuration that depends on which routing + domain a connection was received on. + - sshd_config(5): Add an optional rdomain qualifier to the ListenAddress + directive to allow listening on different routing domains. + - sshd(8): Add "expiry-time" option for authorized_keys files to allow + for expiring keys. + - ssh(1): Add a BindInterface option to allow binding the outgoing + connection to an interface's address (basically a more usable + BindAddress; closes: #289592). + - ssh(1): Expose device allocated for tun/tap forwarding via a new %T + expansion for LocalCommand. This allows LocalCommand to be used to + prepare the interface. + - sshd(8): Expose the device allocated for tun/tap forwarding via a new + SSH_TUNNEL environment variable. This allows automatic setup of the + interface and surrounding network configuration automatically on the + server. + - ssh(1)/scp(1)/sftp(1): Add URI support to ssh, sftp and scp, e.g. + ssh://user@host or sftp://user@host/path. Additional connection + parameters described in draft-ietf-secsh-scp-sftp-ssh-uri-04 are not + implemented since the ssh fingerprint format in the draft uses the + deprecated MD5 hash with no way to specify any other algorithm. + - ssh-keygen(1): Allow certificate validity intervals that specify only + a start or stop time (instead of both or neither). + - sftp(1): Allow "cd" and "lcd" commands with no explicit path argument. + lcd will change to the local user's home directory as usual. cd will + change to the starting directory for session (because the protocol + offers no way to obtain the remote user's home directory). + - sshd(8): When doing a config test with sshd -T, only require the + attributes that are actually used in Match criteria rather than (an + incomplete list of) all criteria. + - ssh(1)/sshd(8): More strictly check signature types during key + exchange against what was negotiated. Prevents downgrade of RSA + signatures made with SHA-256/512 to SHA-1. + - sshd(8): Fix support for client that advertise a protocol version of + "1.99" (indicating that they are prepared to accept both SSHv1 and + SSHv2). This was broken in OpenSSH 7.6 during the removal of SSHv1 + support. + - ssh(1): Warn when the agent returns a ssh-rsa (SHA1) signature when a + rsa-sha2-256/512 signature was requested. This condition is possible + when an old or non-OpenSSH agent is in use. + - ssh-agent(1): Fix regression introduced in 7.6 that caused ssh-agent + to fatally exit if presented an invalid signature request message. + - sshd_config(5): Accept yes/no flag options case-insensitively, as has + been the case in ssh_config(5) for a long time (LP: #1656557). + - ssh(1): Improve error reporting for failures during connection. Under + some circumstances misleading errors were being shown. + - ssh-keyscan(1): Add -D option to allow printing of results directly in + SSHFP format. + - ssh(1): Compatibility fix for some servers that erroneously drop the + connection when the IUTF8 (RFC8160) option is sent. + - scp(1): Disable RemoteCommand and RequestTTY in the ssh session + started by scp (sftp was already doing this). + - ssh-keygen(1): Refuse to create a certificate with an unusable number + of principals. + - ssh-keygen(1): Fatally exit if ssh-keygen is unable to write all the + public key during key generation. Previously it would silently ignore + errors writing the comment and terminating newline. + - ssh(1): Do not modify hostname arguments that are addresses by + automatically forcing them to lower-case. Instead canonicalise them + jo resolve ambiguities (e.g. ::0001 => ::1) before they are matched + against known_hosts. + - ssh(1): Don't accept junk after "yes" or "no" responses to hostkey + prompts. + - sftp(1): Have sftp print a warning about shell cleanliness when + decoding the first packet fails, which is usually caused by shells + polluting stdout of non-interactive startups. + - ssh(1)/sshd(8): Switch timers in packet code from using wall-clock + time to monotonic time, allowing the packet layer to better function + over a clock step and avoiding possible integer overflows during + steps. + - sshd(8): Correctly detect MIPS ABI in use at configure time. Fixes + sandbox violations on some environments. + - Build and link with "retpoline" flags when available to mitigate the + "branch target injection" style (variant 2) of the Spectre + branch-prediction vulnerability. + + -- Colin Watson Tue, 03 Apr 2018 12:40:24 +0100 + +openssh (1:7.6p1-5) unstable; urgency=medium + + * Explicitly build-depend on pkg-config, rather than implicitly + build-depending on it via libgtk-3-dev (thanks, Aurelien Jarno; closes: + #894558). + + -- Colin Watson Sun, 01 Apr 2018 21:37:19 +0100 + +openssh (1:7.6p1-4) unstable; urgency=medium + + * Move VCS to salsa.debian.org. + * Add a preseeding-only openssh-server/password-authentication debconf + template that can be used to disable password authentication (closes: + #878945). + + -- Colin Watson Sat, 10 Feb 2018 02:31:46 +0000 + +openssh (1:7.6p1-3) unstable; urgency=medium + + [ Colin Watson ] + * Remove the decade-old ssh-krb5 transitional package; upgrades of + openssh-server will preserve existing configuration, and new + installations should just enable GSSAPIAuthentication and + GSSAPIKeyExchange in sshd_config (closes: #878626). + * Support the "noudeb" build profile. + * Fix putty-transfer regression test. + + [ Anders Kaseorg ] + * debian/systemd/ssh-agent.service: Add missing dbus dependency. + + [ Jason Duerstock ] + * Add a "pkg.openssh.nognome" build profile, which disables building the + ssh-askpass-gnome binary package and avoids the build-dependency on + libgtk-3-dev (closes: #883819). + + -- Colin Watson Tue, 16 Jan 2018 17:41:08 +0000 + +openssh (1:7.6p1-2) unstable; urgency=medium + + * Apply upstream patch to fix PermitOpen argument handling. + + -- Colin Watson Sat, 07 Oct 2017 13:44:13 +0100 + +openssh (1:7.6p1-1) unstable; urgency=medium + + * New upstream release (https://www.openssh.com/txt/release-7.6): + - CVE-2017-15906: sftp-server(8): In read-only mode, sftp-server was + incorrectly permitting creation of zero-length files. Reported by + Michal Zalewski. + - ssh(1): Delete SSH protocol version 1 support, associated + configuration options and documentation (LP: #1584321). + - 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. + - 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. + - 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. + - 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): Add -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". + - ssh(1): Add SyslogFacility option to ssh(1) matching the equivalent + option in sshd(8). + - ssh(1): Use HostKeyAlias if specified instead of hostname for matching + host certificate principal names. + - sftp(1): Implement sorting for globbed ls. + - 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. + - ssh(1): Accept unknown EXT_INFO extension values that contain \0 + characters. These are legal, but would previously cause fatal + connection errors if received. + - sftp(1): Print '?' instead of incorrect link count (that the protocol + doesn't provide) for remote listings. + - 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. + - ssh(1): Mention that the server may send debug messages to explain + public key authentication problems under some circumstances. + - Translate OpenSSL error codes to better report incorrect passphrase + errors when loading private keys. + - sshd(8): Adjust compatibility patterns for WinSCP to correctly + identify versions that implement only the legacy DH group exchange + scheme (closes: #877800). + - 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. + - 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. + - ssh-keyscan(1): Avoid double-close() on file descriptors. + - sshd(8): Avoid reliance on shared use of pointers shared between + monitor and child sshd processes. + - sshd_config(8): Document available AuthenticationMethods. + - ssh(1): Avoid truncation in some login prompts. + - ssh(1): Make "--" before the hostname terminate argument processing + after the hostname too (closes: #873201). + - ssh-keygen(1): Switch from aes256-cbc to aes256-ctr for encrypting + new-style private keys. + - ssh(1): Warn and do not attempt to use keys when the public and + private halves do not match. + - sftp(1): Don't print verbose error message when ssh disconnects from + under sftp. + - sshd(8): Fix keepalive scheduling problem: prevent activity on a + forwarded port from preventing the keepalive from being sent. + - sshd(8): When started without root privileges, don't require the + privilege separation user or path to exist. + - ssh(1)/sshd(8): Correctness fix for channels implementation: accept + channel IDs greater than 0x7FFFFFFF. + - sshd(8): Expose list of completed authentication methods to PAM via + the SSH_AUTH_INFO_0 PAM environment variable. + - ssh(1)/sshd(8): Fix several problems in the tun/tap forwarding code, + mostly to do with host/network byte order confusion. + - sshd(8): Avoid Linux seccomp violations on ppc64le over the socketcall + syscall. + * Build-depend on debhelper (>= 9.20160709~) rather than dh-systemd. + * Change priorities of ssh and ssh-krb5 binary packages to optional, since + "Priority: extra" is now deprecated. + * Use HTTPS form of copyright-format URL. + * Adjust "Running sshd from inittab" instructions in README.Debian to + recommend using service(8) rather than calling the init script directly. + * Policy version 4.1.0. + * Adjust "Per-connection sshd instances with systemd" instructions in + README.Debian to recommend using a drop-in file rather than copying and + modifying the ssh.socket unit file. + + -- Colin Watson Fri, 06 Oct 2017 12:36:48 +0100 + +openssh (1:7.5p1-10) unstable; urgency=medium + + * Tell haveged to create the pid file we expect. + * Give up and use systemctl to start haveged if running under systemd; + this shouldn't be necessary, but I can't seem to get things working in + the Ubuntu autopkgtest environment otherwise. + + -- Colin Watson Fri, 01 Sep 2017 11:17:19 +0100 + +openssh (1:7.5p1-9) unstable; urgency=medium + + * Run debian/tests/regress with "set -x". + * Run haveged without "-w 1024", as setting the low water mark doesn't + seem possible in all autopkgtest virtualisation environments. + + -- Colin Watson Thu, 31 Aug 2017 13:23:04 +0100 + +openssh (1:7.5p1-8) unstable; urgency=medium + + * Drop openssh-client-ssh1, now built by a separate source package. + * Run haveged during autopkgtests to ensure that they have enough entropy + for key generation (LP: #1712921). + * Apply patches from https://bugzilla.mindrot.org/show_bug.cgi?id=2752 to + allow some extra syscalls for crypto cards on s390x (LP: #1686618). + + -- Colin Watson Mon, 28 Aug 2017 12:16:35 +0100 + +openssh (1:7.5p1-7) unstable; urgency=medium + + * Fix spelling of RuntimeDirectoryMode (closes: #872976). + * Add RuntimeDirectory and RuntimeDirectoryMode to ssh@.service as well as + ssh.service (closes: #872978). + + -- Colin Watson Wed, 23 Aug 2017 12:12:59 +0100 + +openssh (1:7.5p1-6) unstable; urgency=medium + + [ Colin Watson ] + * Test configuration before starting or reloading sshd under systemd + (closes: #865770). + * Create /run/sshd under systemd using RuntimeDirectory rather than + tmpfiles.d (thanks, Dmitry Smirnov; closes: #864190). + + [ Dimitri John Ledkov ] + * Drop upstart system and user jobs (closes: #872851). + + [ Chris Lamb ] + * Quote IP address in suggested "ssh-keygen -f" calls (closes: #872643). + + -- Colin Watson Wed, 23 Aug 2017 01:41:06 +0100 + +openssh (1:7.5p1-5) unstable; urgency=medium + + * Upload to unstable. + * Fix syntax error in debian/copyright. + + -- Colin Watson Sun, 18 Jun 2017 12:08:42 +0100 + +openssh (1:7.5p1-4) experimental; urgency=medium + + * Drop README.Debian section on privilege separation, as it's no longer + optional. + * Only call "initctl set-env" from agent-launch if $UPSTART_SESSION is set + (LP: #1689299). + * Fix incoming compression statistics (thanks, Russell Coker; closes: + #797964). + * Relicense debian/* under a two-clause BSD licence for bidirectional + compatibility with upstream, with permission from Matthew Vernon and + others. + + -- Colin Watson Tue, 06 Jun 2017 15:17:58 +0100 + +openssh (1:7.5p1-3) experimental; urgency=medium + + * Fix debian/adjust-openssl-dependencies to account for preferring + libssl1.0-dev. + * Adjust OpenSSL dependencies for openssh-client-ssh1 too. + * Fix purge failure when /etc/ssh has already somehow been removed + (LP: #1682817). + * Ensure that /etc/ssh exists before trying to create /etc/ssh/sshd_config + (LP: #1685022). + + -- Colin Watson Tue, 02 May 2017 13:51:27 +0100 + +openssh (1:7.5p1-2) experimental; urgency=medium + + * Add missing header on Linux/s390. + * Fix syntax error on Linux/X32. + + -- Colin Watson Sun, 02 Apr 2017 13:20:11 +0100 + +openssh (1:7.5p1-1) experimental; urgency=medium + + * New upstream release (https://www.openssh.com/txt/release-7.5): + - SECURITY: ssh(1), sshd(8): Fix weakness in CBC padding oracle + countermeasures that allowed a variant of the attack fixed in OpenSSH + 7.3 to proceed. Note that the OpenSSH client disables CBC ciphers by + default, sshd offers them as lowest-preference options and will remove + them by default entirely in the next release. + - This release deprecates the sshd_config UsePrivilegeSeparation option, + thereby making privilege separation mandatory (closes: #407754). + - The format of several log messages emitted by the packet code has + changed to include additional information about the user and their + authentication state. Software that monitors ssh/sshd logs may need + to account for these changes. + - ssh(1), sshd(8): Support "=-" syntax to easily remove methods from + algorithm lists, e.g. Ciphers=-*cbc. + - sshd(1): Fix NULL dereference crash when key exchange start messages + are sent out of sequence. + - ssh(1), sshd(8): Allow form-feed characters to appear in configuration + files. + - sshd(8): Fix regression in OpenSSH 7.4 support for the server-sig-algs + extension, where SHA2 RSA signature methods were not being correctly + advertised. + - ssh(1), ssh-keygen(1): Fix a number of case-sensitivity bugs in + known_hosts processing. + - ssh(1): Allow ssh to use certificates accompanied by a private key + file but no corresponding plain *.pub public key. + - ssh(1): When updating hostkeys using the UpdateHostKeys option, accept + RSA keys if HostkeyAlgorithms contains any RSA keytype. Previously, + ssh could ignore RSA keys when only the ssh-rsa-sha2-* methods were + enabled in HostkeyAlgorithms and not the old ssh-rsa method. + - ssh(1): Detect and report excessively long configuration file lines. + - Merge a number of fixes found by Coverity and reported via Redhat and + FreeBSD. Includes fixes for some memory and file descriptor leaks in + error paths. + - ssh(1), sshd(8): When logging long messages to stderr, don't truncate + "\r\n" if the length of the message exceeds the buffer. + - ssh(1): Fully quote [host]:port in generated ProxyJump/-J command- + line; avoid confusion over IPv6 addresses and shells that treat square + bracket characters specially. + - Fix various fallout and sharp edges caused by removing SSH protocol 1 + support from the server, including the server banner string being + incorrectly terminated with only \n (instead of \r\n), confusing error + messages from ssh-keyscan, and a segfault in sshd if protocol v.1 was + enabled for the client and sshd_config contained references to legacy + keys. + - ssh(1), sshd(8): Free fd_set on connection timeout. + - sftp(1): Fix division by zero crash in "df" output when server returns + zero total filesystem blocks/inodes. + - ssh(1), ssh-add(1), ssh-keygen(1), sshd(8): Translate OpenSSL errors + encountered during key loading to more meaningful error codes. + - ssh-keygen(1): Sanitise escape sequences in key comments sent to + printf but preserve valid UTF-8 when the locale supports it. + - ssh(1), sshd(8): Return reason for port forwarding failures where + feasible rather than always "administratively prohibited". + - sshd(8): Fix deadlock when AuthorizedKeysCommand or + AuthorizedPrincipalsCommand produces a lot of output and a key is + matched early. + - ssh(1): Fix typo in ~C error message for bad port forward + cancellation. + - ssh(1): Show a useful error message when included config files can't + be opened. + - sshd_config(5): Repair accidentally-deleted mention of %k token in + AuthorizedKeysCommand. + - sshd(8): Remove vestiges of previously removed LOGIN_PROGRAM. + - ssh-agent(1): Relax PKCS#11 whitelist to include libexec and common + 32-bit compatibility library directories. + - sftp-client(1): Fix non-exploitable integer overflow in SSH2_FXP_NAME + response handling. + - ssh-agent(1): Fix regression in 7.4 of deleting PKCS#11-hosted keys. + It was not possible to delete them except by specifying their full + physical path. + - sshd(8): Avoid sandbox errors for Linux S390 systems using an ICA + crypto coprocessor. + - sshd(8): Fix non-exploitable weakness in seccomp-bpf sandbox arg + inspection. + - ssh-keygen(1), ssh(1), sftp(1): Fix output truncation for various that + contain non-printable characters where the codeset in use is ASCII. + + -- Colin Watson Sun, 02 Apr 2017 02:58:01 +0100 + +openssh (1:7.4p1-11) unstable; urgency=medium + + * Fix incoming compression statistics (thanks, Russell Coker; closes: + #797964). + + -- Colin Watson Tue, 06 Jun 2017 15:03:48 +0100 + +openssh (1:7.4p1-10) unstable; urgency=medium + + * Move privilege separation directory and PID file from /var/run/ to /run/ + (closes: #760422, #856825). + * Unbreak Unix domain socket forwarding for root (closes: #858252). + + -- Colin Watson Thu, 30 Mar 2017 11:19:04 +0100 + +openssh (1:7.4p1-9) unstable; urgency=medium + + * Fix null pointer dereference in ssh-keygen; this fixes an autopkgtest + regression introduced in 1:7.4p1-8. + + -- Colin Watson Thu, 16 Mar 2017 13:43:15 +0000 + +openssh (1:7.4p1-8) unstable; urgency=medium + + * Fix ssh-keygen -H accidentally corrupting known_hosts that contained + already-hashed entries (closes: #851734, LP: #1668093). + * Fix ssh-keyscan to correctly hash hosts with a port number (closes: + #857736, LP: #1670745). + + -- Colin Watson Tue, 14 Mar 2017 13:49:14 +0000 + +openssh (1:7.4p1-7) unstable; urgency=medium + + * Don't set "PermitRootLogin yes" on fresh installations (regression + introduced in 1:7.4p1-1; closes: #852781). + * Restore reading authorized_keys2 by default. Upstream seems to intend + to gradually phase this out, so don't assume that this will remain the + default forever. However, we were late in adopting the upstream + sshd_config changes, so it makes sense to extend the grace period + (closes: #852320). + + -- Colin Watson Sun, 05 Mar 2017 02:12:42 +0000 + +openssh (1:7.4p1-6) unstable; urgency=medium + + * Remove temporary file on exit from postinst (closes: #850275). + * Remove LOGIN_PROGRAM and LOGIN_NO_ENDOPT definitions, since UseLogin is + gone. + * Document sshd_config changes that may be needed following the removal of + protocol 1 support from sshd (closes: #851573). + * Remove ssh_host_dsa_key from HostKey default (closes: #850614). + * Fix rekeying failure with GSSAPI key exchange (thanks, Harald Barth; + closes: #819361, LP: #1608965). + + -- Colin Watson Mon, 16 Jan 2017 15:11:10 +0000 + +openssh (1:7.4p1-5) unstable; urgency=medium + + * Create mux socket for regression tests in a temporary directory. + * Work around clock_gettime kernel bug on Linux x32 (closes: #849923). + + -- Colin Watson Tue, 03 Jan 2017 14:43:28 +0000 + +openssh (1:7.4p1-4) unstable; urgency=medium + + * Run regression tests inside annotate-output to try to diagnose timeout + issues. + * Make integrity tests more robust against timeouts in the case where the + first test in a series for a given MAC happens to modify the low bytes + of a packet length. + * Fix race conditions in forwarding tests. + + -- Colin Watson Mon, 02 Jan 2017 19:37:23 +0000 + +openssh (1:7.4p1-3) unstable; urgency=medium + + * Revert attempted hack around regress/forwarding.sh test failure, since + it doesn't seem to help. + * Run regression tests using 'sh -x' to try to get more information about + failures. + * Dump some useful log files if regression tests fail. + * Tweak regression test setup to cope with the case where some of the + source directory is unreadable by the openssh-tests user. + + -- Colin Watson Sat, 31 Dec 2016 02:48:17 +0000 + +openssh (1:7.4p1-2) unstable; urgency=medium + + * Attempt to hack around regress/forwarding.sh test failure in some + environments. + * Avoid calling into Kerberos libraries from ssh_gssapi_server_mechanisms + in the privsep monitor. + + -- Colin Watson Thu, 29 Dec 2016 12:02:12 +0000 + +openssh (1:7.4p1-1) unstable; urgency=medium + + * New upstream release (http://www.openssh.com/txt/release-7.4): + - ssh(1): Remove 3des-cbc from the client's default proposal. 64-bit + block ciphers are not safe in 2016 and we don't want to wait until + attacks like SWEET32 are extended to SSH. As 3des-cbc was the only + mandatory cipher in the SSH RFCs, this may cause problems connecting + to older devices using the default configuration, but it's highly + likely that such devices already need explicit configuration for key + exchange and hostkey algorithms already anyway. + - sshd(8): When a forced-command appears in both a certificate and an + authorized keys/principals command= restriction, sshd will now refuse + to accept the certificate unless they are identical. The previous + (documented) behaviour of having the certificate forced-command + override the other could be a bit confusing and error-prone. + - sshd(8): Remove the UseLogin configuration directive and support for + having /bin/login manage login sessions. + - CVE-2016-10009: ssh-agent(1): Will now refuse to load PKCS#11 modules + from paths outside a trusted whitelist (run-time configurable). + Requests to load modules could be passed via agent forwarding and an + attacker could attempt to load a hostile PKCS#11 module across the + forwarded agent channel: PKCS#11 modules are shared libraries, so this + would result in code execution on the system running the ssh-agent if + the attacker has control of the forwarded agent-socket (on the host + running the sshd server) and the ability to write to the filesystem of + the host running ssh-agent (usually the host running the ssh client) + (closes: #848714). + - CVE-2016-10010: sshd(8): When privilege separation is disabled, + forwarded Unix-domain sockets would be created by sshd(8) with the + privileges of 'root' instead of the authenticated user. This release + refuses Unix-domain socket forwarding when privilege separation is + disabled (Privilege separation has been enabled by default for 14 + years) (closes: #848715). + - CVE-2016-10011: sshd(8): Avoid theoretical leak of host private key + material to privilege-separated child processes via realloc() when + reading keys. No such leak was observed in practice for normal-sized + keys, nor does a leak to the child processes directly expose key + material to unprivileged users (closes: #848716). + - CVE-2016-10012: sshd(8): The shared memory manager used by + pre-authentication compression support had a bounds checks that could + be elided by some optimising compilers. Additionally, this memory + manager was incorrectly accessible when pre-authentication compression + was disabled. This could potentially allow attacks against the + privileged monitor process from the sandboxed privilege-separation + process (a compromise of the latter would be required first). This + release removes support for pre-authentication compression from + sshd(8) (closes: #848717). + - SECURITY: sshd(8): Validate address ranges for AllowUser and DenyUsers + directives at configuration load time and refuse to accept invalid + ones. It was previously possible to specify invalid CIDR address + ranges (e.g. user@127.1.2.3/55) and these would always match, possibly + resulting in granting access where it was not intended. + - ssh(1): Add a proxy multiplexing mode to ssh(1) inspired by the + version in PuTTY by Simon Tatham. This allows a multiplexing client + to communicate with the master process using a subset of the SSH + packet and channels protocol over a Unix-domain socket, with the main + process acting as a proxy that translates channel IDs, etc. This + allows multiplexing mode to run on systems that lack file-descriptor + passing (used by current multiplexing code) and potentially, in + conjunction with Unix-domain socket forwarding, with the client and + multiplexing master process on different machines. Multiplexing proxy + mode may be invoked using "ssh -O proxy ...". + - sshd(8): Add a sshd_config DisableForwarding option that disables X11, + agent, TCP, tunnel and Unix domain socket forwarding, as well as + anything else we might implement in the future. Like the 'restrict' + authorized_keys flag, this is intended to be a simple and future-proof + way of restricting an account. + - sshd(8), ssh(1): Support the "curve25519-sha256" key exchange method. + This is identical to the currently-supported method named + "curve25519-sha256@libssh.org". + - sshd(8): Improve handling of SIGHUP by checking to see if sshd is + already daemonised at startup and skipping the call to daemon(3) if it + is. This ensures that a SIGHUP restart of sshd(8) will retain the + same process-ID as the initial execution. sshd(8) will also now + unlink the PidFile prior to SIGHUP restart and re-create it after a + successful restart, rather than leaving a stale file in the case of a + configuration error. + - sshd(8): Allow ClientAliveInterval and ClientAliveCountMax directives + to appear in sshd_config Match blocks. + - sshd(8): Add %-escapes to AuthorizedPrincipalsCommand to match those + supported by AuthorizedKeysCommand (key, key type, fingerprint, etc.) + and a few more to provide access to the contents of the certificate + being offered. + - ssh(1): Allow IdentityFile to successfully load and use certificates + that have no corresponding bare public key. + - ssh(1): Fix public key authentication when multiple authentication is + in use and publickey is not just the first method attempted. + - ssh(1): Improve reporting when attempting to load keys from PKCS#11 + tokens with fewer useless log messages and more detail in debug + messages. + - ssh(1): When tearing down ControlMaster connections, don't pollute + stderr when LogLevel=quiet. + - sftp(1): On ^Z wait for underlying ssh(1) to suspend before suspending + sftp(1) to ensure that ssh(1) restores the terminal mode correctly if + suspended during a password prompt. + - ssh(1): Avoid busy-wait when ssh(1) is suspended during a password + prompt (LP: #1646813). + - ssh(1), sshd(8): Correctly report errors during sending of ext-info + messages. + - sshd(8): Fix NULL-deref crash if sshd(8) received an out-of-sequence + NEWKEYS message. + - sshd(8): Correct list of supported signature algorithms sent in the + server-sig-algs extension. + - sshd(8): Fix sending ext_info message if privsep is disabled. + - sshd(8): More strictly enforce the expected ordering of privilege + separation monitor calls used for authentication and allow them only + when their respective authentication methods are enabled in the + configuration. + - sshd_config(5): Use 2001:db8::/32, the official IPv6 subnet for + configuration examples. + - On environments configured with Turkish locales, fall back to the + C/POSIX locale to avoid errors in configuration parsing caused by that + locale's unique handling of the letters 'i' and 'I' (LP: #1638338). + - contrib: Add a gnome-ssh-askpass3 with GTK+3 support. + - sshd(8): Improve PRNG reseeding across privilege separation and force + libcrypto to obtain a high-quality seed before chroot or sandboxing. + * Apply "wrap-and-sort -at -f debian/control -f debian/tests/control". + * Remove entries related to protocol 1 from the default sshd_config + generated on new installations. + * Remove some advice related to protocol 1 from README.Debian. + * Start handling /etc/ssh/sshd_config using ucf. The immediate motivation + for this is to deal with deprecations of options related to protocol 1, + but something like this has been needed for a long time (closes: + #419574, #848089): + - sshd_config is now a slightly-patched version of upstream's, and only + contains non-default settings (closes: #147201). + - I've included as many historical md5sums of default versions of + sshd_config as I could reconstruct from version control, but I'm sure + I've missed some. + - Explicitly synchronise the debconf database with the current + configuration file state in openssh-server.config, to ensure that the + PermitRootLogin setting is properly preserved. + - UsePrivilegeSeparation now defaults to the stronger "sandbox" rather + than "yes", per upstream. + * Remove redundant "GSSAPIDelegateCredentials no" from ssh_config (already + the upstream default), and document that setting ServerAliveInterval to + 300 by default if BatchMode is set is Debian-specific (closes: #765630). + * Build gnome-ssh-askpass with GTK+ 3 (LP: #801187). + * When running regression tests under autopkgtest, use a non-root user + with passwordless sudo. + + -- Colin Watson Tue, 27 Dec 2016 18:01:46 +0000 + +openssh (1:7.3p1-5) unstable; urgency=medium + + * debian/tests/control: Add dependency on openssl, required by the PuTTY + interoperability tests. + + -- Colin Watson Sat, 03 Dec 2016 03:43:21 +0000 + +openssh (1:7.3p1-4) unstable; urgency=medium + + * Adjust Build-Depends further to avoid considering libssl-dev >= 1.1.0~ + as sufficient. + * Move build directories under debian/. + * Remove the non-upstream .gitignore file and add the relevant entries to + debian/.gitignore, in order to make the source tree more + dgit-compatible. + * Build all upstream regression test binaries using the new + "regress-binaries" target. + * Fix and enable PuTTY interoperability tests under autopkgtest. + + -- Colin Watson Fri, 02 Dec 2016 20:49:30 +0000 + +openssh (1:7.3p1-3) unstable; urgency=medium + + * Avoid building with OpenSSL 1.1 for now (see #828475). + * Add a missing License line to debian/copyright. + * Policy version 3.9.8: no changes required. + + -- Colin Watson Sat, 05 Nov 2016 15:37:15 +0000 + +openssh (1:7.3p1-2) unstable; urgency=high + + * Rewrite debian/copyright using copyright-format 1.0. + * CVE-2016-8858: Unregister the KEXINIT handler after message has been + received (closes: #841884). + + -- Colin Watson Mon, 24 Oct 2016 11:18:00 +0100 + +openssh (1:7.3p1-1) unstable; urgency=medium + + * New upstream release (http://www.openssh.com/txt/release-7.3): + - SECURITY: sshd(8): Mitigate a potential denial-of-service attack + against the system's crypt(3) function via sshd(8). An attacker could + send very long passwords that would cause excessive CPU use in + crypt(3). sshd(8) now refuses to accept password authentication + requests of length greater than 1024 characters. + - SECURITY: ssh(1), sshd(8): Fix observable timing weakness in the CBC + padding oracle countermeasures. Note that CBC ciphers are disabled by + default and only included for legacy compatibility. + - SECURITY: ssh(1), sshd(8): Improve operation ordering of MAC + verification for Encrypt-then-MAC (EtM) mode transport MAC algorithms + to verify the MAC before decrypting any ciphertext. This removes the + possibility of timing differences leaking facts about the plaintext, + though no such leakage has been observed. + - ssh(1): Add a ProxyJump option and corresponding -J command-line flag + to allow simplified indirection through a one or more SSH bastions or + "jump hosts". + - ssh(1): Add an IdentityAgent option to allow specifying specific agent + sockets instead of accepting one from the environment. + - ssh(1): Allow ExitOnForwardFailure and ClearAllForwardings to be + optionally overridden when using ssh -W. + - ssh(1), sshd(8): Implement support for the IUTF8 terminal mode as per + draft-sgtatham-secsh-iutf8-00 (closes: #337041, LP: #394570). + - ssh(1), sshd(8): Add support for additional fixed Diffie-Hellman 2K, + 4K and 8K groups from draft-ietf-curdle-ssh-kex-sha2-03. + - ssh-keygen(1), ssh(1), sshd(8): Support SHA256 and SHA512 RSA + signatures in certificates. + - ssh(1): Add an Include directive for ssh_config(5) files (closes: + #536031). + - ssh(1): Permit UTF-8 characters in pre-authentication banners sent + from the server. + - ssh(1), sshd(8): Reduce the syslog level of some relatively common + protocol events from LOG_CRIT. + - sshd(8): Refuse AuthenticationMethods="" in configurations and accept + AuthenticationMethods=any for the default behaviour of not requiring + multiple authentication. + - sshd(8): Remove obsolete and misleading "POSSIBLE BREAK-IN ATTEMPT!" + message when forward and reverse DNS don't match. + - ssh(1): Deduplicate LocalForward and RemoteForward entries to fix + failures when both ExitOnForwardFailure and hostname canonicalisation + are enabled. + - sshd(8): Remove fallback from moduli to obsolete "primes" file that + was deprecated in 2001 (LP: #1528251). + - sshd_config(5): Correct description of UseDNS: it affects ssh hostname + processing for authorized_keys, not known_hosts. + - sshd(8): Send ClientAliveInterval pings when a time-based RekeyLimit + is set; previously keepalive packets were not being sent. + - sshd(8): Whitelist more architectures to enable the seccomp-bpf + sandbox. + - scp(1): Respect the local user's LC_CTYPE locale (closes: #396295). + - Take character display widths into account for the progressmeter + (closes: #407088). + + -- Colin Watson Sun, 07 Aug 2016 22:45:26 +0100 + +openssh (1:7.2p2-8) unstable; urgency=medium + + [ Colin Watson ] + * Stop enabling ssh-session-cleanup.service by default; instead, ship it + as an example and add a section to README.Debian. libpam-systemd >= 230 + and "UsePAM yes" should take care of the original problem for most + systemd users (thanks, Michael Biebl; closes: #832155). + + [ Martin Pitt ] + * Add debian/agent-launch: Helper script for conditionally starting the SSH + agent in the user session. Use it in ssh-agent.user-session.upstart. + * Add systemd user unit for graphical sessions that use systemd. Override + the corresponding upstart job in that case (closes: #832445). + * debian/openssh-server.if-up: Don't block on a finished reload of + openssh.service, to avoid deadlocking with restarting networking. + (closes: #832557, LP: #1584393) + + -- Colin Watson Fri, 29 Jul 2016 02:51:32 +0100 + +openssh (1:7.2p2-7) unstable; urgency=medium + + * Don't stop the ssh-session-cleanup service on upgrade (closes: #832155). + This may cause SSH sessions to be killed on upgrade to *this* version if + you had previously installed 1:7.2p2-6. Sorry! If your session is + killed, you can recover using "dpkg --unpack" on this openssh-server + .deb, followed by "dpkg --configure -a". + * Recommend libpam-systemd from openssh-server. It's a much better + solution than the above for systemd users, but I'm wary of depending on + it in case I cause an assortment of exciting dependency problems on + upgrade for non-systemd users. + + -- Colin Watson Sat, 23 Jul 2016 11:46:33 +0100 + +openssh (1:7.2p2-6) unstable; urgency=medium + + * debian/watch: Switch to HTTP (thanks, Nicholas Luedtke; closes: + #822997). + * Copy summary of supported SFTP protocol versions from upstream's + PROTOCOL file into the openssh-sftp-server package description (closes: + #766887). + * Set SSH_PROGRAM=/usr/bin/ssh1 when building openssh-client-ssh1 so that + scp1 works (reported by Olivier MATZ). + * Retroactively add a NEWS.Debian entry for the UseDNS change in 6.9 (see + LP #1588457). + * CVE-2016-6210: Mitigate user enumeration via covert timing channel + (closes: #831902). + * Backport upstream patch to close ControlPersist background process + stderr when not in debug mode or when logging to a file or syslog + (closes: #714526). + * Add a session cleanup script and a systemd unit file to trigger it, + which serves to terminate SSH sessions cleanly if systemd doesn't do + that itself, often because libpam-systemd is not installed (thanks, + Vivek Das Mohapatra, Tom Hutter, and others; closes: #751636). + * Stop generating DSA host keys by default (thanks, Santiago Vila; closes: + #823827). + + -- Colin Watson Fri, 22 Jul 2016 17:06:19 +0100 + +openssh (1:7.2p2-5) unstable; urgency=medium + + * Backport upstream patch to unbreak authentication using lone certificate + keys in ssh-agent: when attempting pubkey auth with a certificate, if no + separate private key is found among the keys then try with the + certificate key itself (thanks, Paul Querna; LP: #1575961). + + -- Colin Watson Thu, 28 Apr 2016 01:52:01 +0100 + +openssh (1:7.2p2-4) unstable; urgency=medium + + * Drop dependency on libnss-files-udeb (closes: #819686). + * Policy version 3.9.7: no changes required. + + -- Colin Watson Fri, 15 Apr 2016 16:40:07 +0100 + +openssh (1:7.2p2-3) unstable; urgency=high + + * Change all openssh.org references to openssh.com (closes: #819213). + * CVE-2015-8325: Ignore PAM environment vars when UseLogin=yes. + + -- Colin Watson Wed, 13 Apr 2016 16:42:28 +0100 + +openssh (1:7.2p2-2) unstable; urgency=medium + + * Fix kexgss_server to cope with DH_GRP_MIN/DH_GRP_MAX being stricter on + the server end than the client (thanks, Damien Miller; closes: #817870, + LP: #1558576). + + -- Colin Watson Mon, 21 Mar 2016 12:08:55 +0000 + +openssh (1:7.2p2-1) unstable; urgency=high + + * New upstream release (http://www.openssh.com/txt/release-7.2p2): + - CVE-2016-3115: sshd(8): Sanitise X11 authentication credentials to + avoid xauth command injection when X11Forwarding is enabled + (http://www.openssh.com/txt/x11fwd.adv). + + -- Colin Watson Thu, 10 Mar 2016 13:04:29 +0000 + +openssh (1:7.2p1-1) unstable; urgency=medium + + * New upstream release (http://www.openssh.com/txt/release-7.2): + - This release disables a number of legacy cryptographic algorithms by + default in ssh: + + Several ciphers blowfish-cbc, cast128-cbc, all arcfour variants and + the rijndael-cbc aliases for AES. + + MD5-based and truncated HMAC algorithms. + These algorithms are already disabled by default in sshd. + - ssh(1), sshd(8): Remove unfinished and unused roaming code (was + already forcibly disabled in OpenSSH 7.1p2). + - ssh(1): Eliminate fallback from untrusted X11 forwarding to trusted + forwarding when the X server disables the SECURITY extension. + - ssh(1), sshd(8): Increase the minimum modulus size supported for + diffie-hellman-group-exchange to 2048 bits. + - sshd(8): Pre-auth sandboxing is now enabled by default (previous + releases enabled it for new installations via sshd_config). + - all: Add support for RSA signatures using SHA-256/512 hash algorithms + based on draft-rsa-dsa-sha2-256-03.txt and draft-ssh-ext-info-04.txt. + - ssh(1): Add an AddKeysToAgent client option which can be set to 'yes', + 'no', 'ask', or 'confirm', and defaults to 'no'. When enabled, a + private key that is used during authentication will be added to + ssh-agent if it is running (with confirmation enabled if set to + 'confirm'). + - sshd(8): Add a new authorized_keys option "restrict" that includes all + current and future key restrictions (no-*-forwarding, etc.). Also add + permissive versions of the existing restrictions, e.g. "no-pty" -> + "pty". This simplifies the task of setting up restricted keys and + ensures they are maximally-restricted, regardless of any permissions + we might implement in the future. + - ssh(1): Add ssh_config CertificateFile option to explicitly list + certificates. + - ssh-keygen(1): Allow ssh-keygen to change the key comment for all + supported formats (closes: #811125). + - ssh-keygen(1): Allow fingerprinting from standard input, e.g. + "ssh-keygen -lf -" (closes: #509058). + - ssh-keygen(1): Allow fingerprinting multiple public keys in a file, + e.g. "ssh-keygen -lf ~/.ssh/authorized_keys". + - sshd(8): Support "none" as an argument for sshd_config Foreground and + ChrootDirectory. Useful inside Match blocks to override a global + default. + - ssh-keygen(1): Support multiple certificates (one per line) and + reading from standard input (using "-f -") for "ssh-keygen -L" + - ssh-keyscan(1): Add "ssh-keyscan -c ..." flag to allow fetching + certificates instead of plain keys. + - ssh(1): Better handle anchored FQDNs (e.g. 'cvs.openbsd.org.') in + hostname canonicalisation - treat them as already canonical and remove + the trailing '.' before matching ssh_config. + - sftp(1): Existing destination directories should not terminate + recursive uploads (regression in OpenSSH 6.8; LP: #1553378). + * Use HTTPS for Vcs-* URLs, and link to cgit rather than gitweb. + * Restore slogin symlinks for compatibility, although they were removed + upstream. + + -- Colin Watson Tue, 08 Mar 2016 11:47:20 +0000 + +openssh (1:7.1p2-2) unstable; urgency=medium + + * Remove protocol 1 host key generation from openssh-server.postinst + (closes: #811265). + + -- Colin Watson Sun, 17 Jan 2016 14:10:19 +0000 + +openssh (1:7.1p2-1) unstable; urgency=high + + * New upstream release (http://www.openssh.com/txt/release-7.1p2): + - CVE-2016-0777, CVE-2016-0778: Disable experimental client-side support + for roaming, which could be tricked by a malicious server into leaking + client memory to the server, including private client user keys; this + information leak is restricted to connections to malicious or + compromised servers (closes: #810984). + - SECURITY: Fix an out of-bound read access in the packet handling code. + Reported by Ben Hawkes. + - Further use of explicit_bzero has been added in various buffer + handling code paths to guard against compilers aggressively doing + dead-store removal. + + -- Colin Watson Thu, 14 Jan 2016 15:28:03 +0000 + +openssh (1:7.1p1-6) unstable; urgency=medium + + [ Colin Watson ] + * Remove explicit "XS-Testsuite: autopkgtest" from debian/control; + dpkg-source now figures that out automatically based on the existence of + debian/tests/control. + * Allow authenticating as root using gssapi-keyex even with + "PermitRootLogin prohibit-password" (closes: #809695). + * Shuffle PROPOSAL_KEX_ALGS mangling for GSSAPI key exchange a little + later in ssh_kex2 so that it's actually effective (closes: #809696). + + [ Michael Biebl ] + * Don't call sd_notify when sshd is re-execed (closes: #809035). + + -- Colin Watson Mon, 04 Jan 2016 15:09:10 +0000 + +openssh (1:7.1p1-5) unstable; urgency=medium + + [ Michael Biebl ] + * Add systemd readiness notification support (closes: #778913). + + -- Colin Watson Mon, 21 Dec 2015 22:10:07 +0000 + +openssh (1:7.1p1-4) unstable; urgency=medium + + * Backport upstream patch to unbreak connections with peers that set + first_kex_follows (LP: #1526357). + + -- Colin Watson Tue, 15 Dec 2015 15:40:18 +0000 + +openssh (1:7.1p1-3) unstable; urgency=medium + + * Drop priority of openssh-client-ssh1 to extra (closes: #807518). + * Redirect regression test input from /dev/zero, since otherwise conch + will immediately send EOF. + + -- Colin Watson Thu, 10 Dec 2015 15:12:10 +0000 + +openssh (1:7.1p1-2) unstable; urgency=medium + + * Really enable conch interoperability tests under autopkgtest. + * Drop SSH1 keepalive patch. Now that SSH1 is disabled at compile-time, + it's been rejected upstream and there isn't much point carrying it any + more. + * Add NEWS.Debian documenting cryptographic changes in OpenSSH 7.0 + (closes: #806962). + * Add an openssh-client-ssh1 binary package for people who need to connect + to outdated SSH1-only servers (closes: #807107). + * Update "Subsystem sftp" path in example sshd_config (closes: #691004, + LP: #1437005). + + -- Colin Watson Tue, 08 Dec 2015 15:33:08 +0000 + +openssh (1:7.1p1-1) unstable; urgency=medium + + * New upstream release (http://www.openssh.com/txt/release-7.0, closes: + #785190): + - Support for the legacy SSH version 1 protocol is disabled by default + at compile time. + - Support for the 1024-bit diffie-hellman-group1-sha1 key exchange is + disabled by default at run-time. It may be re-enabled using the + instructions at http://www.openssh.com/legacy.html + - Support for ssh-dss, ssh-dss-cert-* host and user keys is disabled by + default at run-time. These may be re-enabled using the instructions + at http://www.openssh.com/legacy.html + - Support for the legacy v00 cert format has been removed. + - The default for the sshd_config(5) PermitRootLogin option has changed + from "yes" to "prohibit-password". + - PermitRootLogin=without-password/prohibit-password now bans all + interactive authentication methods, allowing only public-key, + hostbased and GSSAPI authentication (previously it permitted + keyboard-interactive and password-less authentication if those were + enabled). + - ssh_config(5): Add PubkeyAcceptedKeyTypes option to control which + public key types are available for user authentication. + - sshd_config(5): Add HostKeyAlgorithms option to control which public + key types are offered for host authentications. + - ssh(1), sshd(8): Extend Ciphers, MACs, KexAlgorithms, + HostKeyAlgorithms, PubkeyAcceptedKeyTypes and HostbasedKeyTypes + options to allow appending to the default set of algorithms instead of + replacing it. Options may now be prefixed with a '+' to append to the + default, e.g. "HostKeyAlgorithms=+ssh-dss". + - sshd_config(5): PermitRootLogin now accepts an argument of + 'prohibit-password' as a less-ambiguous synonym of 'without- + password'. + - ssh(1), sshd(8): Add compatability workarounds for Cisco and more + PuTTY versions. + - Fix some omissions and errors in the PROTOCOL and PROTOCOL.mux + documentation relating to Unix domain socket forwarding. + - ssh(1): Improve the ssh(1) manual page to include a better description + of Unix domain socket forwarding (closes: #779068). + - ssh(1), ssh-agent(1): Skip uninitialised PKCS#11 slots, fixing + failures to load keys when they are present. + - ssh(1), ssh-agent(1): Do not ignore PKCS#11 hosted keys that wth empty + CKA_ID. + - sshd(8): Clarify documentation for UseDNS option. + - Check realpath(3) behaviour matches what sftp-server requires and use + a replacement if necessary. + * New upstream release (http://www.openssh.com/txt/release-7.1): + - sshd(8): OpenSSH 7.0 contained a logic error in PermitRootLogin= + prohibit-password/without-password that could, depending on + compile-time configuration, permit password authentication to root + while preventing other forms of authentication. This problem was + reported by Mantas Mikulenas. + - ssh(1), sshd(8): Add compatibility workarounds for FuTTY. + - ssh(1), sshd(8): Refine compatibility workarounds for WinSCP. + - Fix a number of memory faults (double-free, free of uninitialised + memory, etc) in ssh(1) and ssh-keygen(1). Reported by Mateusz + Kocielski. + * Change "PermitRootLogin without-password" to the new preferred spelling + of "PermitRootLogin prohibit-password" in sshd_config, and update + documentation to reflect the new upstream default. + * Enable conch interoperability tests under autopkgtest. + + -- Colin Watson Wed, 02 Dec 2015 20:18:35 +0000 + +openssh (1:6.9p1-3) unstable; urgency=medium + + * ssh_config(5): Fix markup errors in description of GSSAPITrustDns + (closes: #799271). + * Fix dh_install and dh_fixperms overrides to work properly with an + architecture-independent-only build (closes: #806090). + * Do much less work in architecture-independent-only builds. + * Drop ConsoleKit session registration patch; it was only ever enabled for + Ubuntu, which no longer needs it (LP: #1334916, #1502045). + + -- Colin Watson Tue, 24 Nov 2015 22:48:53 +0000 + +openssh (1:6.9p1-2) unstable; urgency=medium + + [ Colin Watson ] + * mention-ssh-keygen-on-keychange.patch: Move example ssh-keygen + invocation onto a separate line to make it easier to copy and paste + (LP: #1491532). + + [ Tyler Hicks ] + * Build with audit support on Linux (closes: #797727, LP: #1478087). + + -- Colin Watson Thu, 10 Sep 2015 12:26:11 +0100 + +openssh (1:6.9p1-1) unstable; urgency=medium + + * New upstream release (http://www.openssh.com/txt/release-6.8): + - sshd(8): UseDNS now defaults to 'no'. Configurations that match + against the client host name (via sshd_config or authorized_keys) may + need to re-enable it or convert to matching against addresses. + - Add FingerprintHash option to ssh(1) and sshd(8), and equivalent + command-line flags to the other tools to control algorithm used for + key fingerprints. The default changes from MD5 to SHA256 and format + from hex to base64. + Fingerprints now have the hash algorithm prepended. An example of the + new format: SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE + Please note that visual host keys will also be different. + - ssh(1), sshd(8): Experimental host key rotation support. Add a + protocol extension for a server to inform a client of all its + available host keys after authentication has completed. The client + may record the keys in known_hosts, allowing it to upgrade to better + host key algorithms and a server to gracefully rotate its keys. + The client side of this is controlled by a UpdateHostkeys config + option (default off). + - ssh(1): Add a ssh_config HostbasedKeyType option to control which host + public key types are tried during host-based authentication. + - ssh(1), sshd(8): Fix connection-killing host key mismatch errors when + sshd offers multiple ECDSA keys of different lengths. + - ssh(1): When host name canonicalisation is enabled, try to parse host + names as addresses before looking them up for canonicalisation. Fixes + bz#2074 and avoids needless DNS lookups in some cases. + - ssh(1), ssh-keysign(8): Make ed25519 keys work for host based + authentication. + - sshd(8): SSH protocol v.1 workaround for the Meyer, et al, + Bleichenbacher Side Channel Attack. Fake up a bignum key before RSA + decryption. + - sshd(8): Remember which public keys have been used for authentication + and refuse to accept previously-used keys. This allows + AuthenticationMethods=publickey,publickey to require that users + authenticate using two _different_ public keys. + - sshd(8): add sshd_config HostbasedAcceptedKeyTypes and + PubkeyAcceptedKeyTypes options to allow sshd to control what public + key types will be accepted (closes: #481133). Currently defaults to + all. + - sshd(8): Don't count partial authentication success as a failure + against MaxAuthTries. + - ssh(1): Add RevokedHostKeys option for the client to allow text-file + or KRL-based revocation of host keys. + - ssh-keygen(1), sshd(8): Permit KRLs that revoke certificates by serial + number or key ID without scoping to a particular CA. + - ssh(1): Add a "Match canonical" criteria that allows ssh_config Match + blocks to trigger only in the second config pass. + - ssh(1): Add a -G option to ssh that causes it to parse its + configuration and dump the result to stdout, similar to "sshd -T". + - ssh(1): Allow Match criteria to be negated. E.g. "Match !host". + - ssh-keyscan(1): ssh-keyscan has been made much more robust against + servers that hang or violate the SSH protocol (closes: #241119). + - ssh(1), ssh-keygen(1): Fix regression bz#2306: Key path names were + being lost as comment fields (closes: #787776). + - ssh(1): Allow ssh_config Port options set in the second config parse + phase to be applied (they were being ignored; closes: #774369). + - ssh(1): Tweak config re-parsing with host canonicalisation - make the + second pass through the config files always run when host name + canonicalisation is enabled (and not whenever the host name changes) + - ssh(1): Fix passing of wildcard forward bind addresses when connection + multiplexing is in use. + - ssh-keygen(1): Fix broken private key conversion from non-OpenSSH + formats. + - ssh-keygen(1): Fix KRL generation bug when multiple CAs are in use. + * New upstream release (http://www.openssh.com/txt/release-6.9): + - CVE-2015-5352: ssh(1): When forwarding X11 connections with + ForwardX11Trusted=no, connections made after ForwardX11Timeout expired + could be permitted and no longer subject to XSECURITY restrictions + because of an ineffective timeout check in ssh(1) coupled with "fail + open" behaviour in the X11 server when clients attempted connections + with expired credentials (closes: #790798). This problem was reported + by Jann Horn. + - SECURITY: ssh-agent(1): Fix weakness of agent locking (ssh-add -x) to + password guessing by implementing an increasing failure delay, storing + a salted hash of the password rather than the password itself and + using a timing-safe comparison function for verifying unlock attempts. + This problem was reported by Ryan Castellucci. + - sshd(8): Support admin-specified arguments to AuthorizedKeysCommand + (closes: #740494). + - sshd(8): Add AuthorizedPrincipalsCommand that allows retrieving + authorized principals information from a subprocess rather than a + file. + - ssh(1), ssh-add(1): Support PKCS#11 devices with external PIN entry + devices. + - ssh-keygen(1): Support "ssh-keygen -lF hostname" to search known_hosts + and print key hashes rather than full keys. + - ssh-agent(1): Add -D flag to leave ssh-agent in foreground without + enabling debug mode. + - ssh(1), sshd(8): Deprecate legacy SSH2_MSG_KEX_DH_GEX_REQUEST_OLD + message and do not try to use it against some 3rd-party SSH + implementations that use it (older PuTTY, WinSCP). + - ssh(1), sshd(8): Cap DH-GEX group size at 4Kbits for Cisco + implementations as some would fail when attempting to use group sizes + >4K (closes: #740307, LP: #1287222). + - ssh(1): Fix out-of-bound read in EscapeChar configuration option + parsing. + - sshd(8): Fix application of PermitTunnel, LoginGraceTime, + AuthenticationMethods and StreamLocalBindMask options in Match blocks. + - ssh(1), sshd(8): Improve disconnection message on TCP reset. + - ssh(1): Remove failed remote forwards established by multiplexing from + the list of active forwards. + - sshd(8): Make parsing of authorized_keys "environment=" options + independent of PermitUserEnv being enabled. + - sshd(8): Fix post-auth crash with permitopen=none (closes: #778807). + - ssh(1), ssh-add(1), ssh-keygen(1): Allow new-format private keys to be + encrypted with AEAD ciphers. + - ssh(1): Allow ListenAddress, Port and AddressFamily configuration + options to appear in any order. + - sshd(8): Check for and reject missing arguments for VersionAddendum + and ForceCommand. + - ssh(1), sshd(8): Don't treat unknown certificate extensions as fatal. + - ssh-keygen(1): Make stdout and stderr output consistent. + - ssh(1): Mention missing DISPLAY environment in debug log when X11 + forwarding requested. + - sshd(8): Correctly record login when UseLogin is set. + - sshd(8): Add some missing options to sshd -T output and fix output of + VersionAddendum and HostCertificate. + - Document and improve consistency of options that accept a "none" + argument: TrustedUserCAKeys, RevokedKeys, AuthorizedPrincipalsFile. + - ssh(1): Include remote username in debug output. + - sshd(8): Avoid compatibility problem with some versions of Tera Term, + which would crash when they received the hostkeys notification message + (hostkeys-00@openssh.com). + - sshd(8): Mention ssh-keygen -E as useful when comparing legacy MD5 + host key fingerprints. + - ssh(1): Clarify pseudo-terminal request behaviour and make manual + language consistent. + - ssh(1): Document that the TERM environment variable is not subject to + SendEnv and AcceptEnv; bz#2386 + - sshd(8): Format UsePAM setting when using sshd -T (closes: #767648). + - moduli(5): Update DH-GEX moduli (closes: #787037). + * There are some things I want to fix before upgrading to 7.0p1, though I + intend to do that soon. In the meantime, backport some patches, mainly + to fix security issues: + - SECURITY: sshd(8): OpenSSH 6.8 and 6.9 incorrectly set TTYs to be + world-writable. Local attackers may be able to write arbitrary + messages to logged-in users, including terminal escape sequences. + Reported by Nikolay Edigaryev. + - SECURITY: sshd(8): Fixed a privilege separation weakness related to + PAM support. Attackers who could successfully compromise the + pre-authentication process for remote code execution and who had valid + credentials on the host could impersonate other users. Reported by + Moritz Jodeit. + - SECURITY: sshd(8): Fixed a use-after-free bug related to PAM support + that was reachable by attackers who could compromise the + pre-authentication process for remote code execution (closes: + #795711). Also reported by Moritz Jodeit. + - CVE-2015-5600: sshd(8): Fix circumvention of MaxAuthTries using + keyboard-interactive authentication (closes: #793616). By specifying + a long, repeating keyboard-interactive "devices" string, an attacker + could request the same authentication method be tried thousands of + times in a single pass. The LoginGraceTime timeout in sshd(8) and any + authentication failure delays implemented by the authentication + mechanism itself were still applied. Found by Kingcope. + - Let principals-command.sh work for noexec /var/run. + * Thanks to Jakub Jelen of Red Hat for Fedora's rebased version of the + GSSAPI key exchange patch. + * Document the Debian-specific change to the default value of + ForwardX11Trusted in ssh(1) (closes: #781469). + + -- Colin Watson Thu, 20 Aug 2015 10:38:58 +0100 + +openssh (1:6.7p1-6) unstable; urgency=medium + + [ Martin Pitt ] + * openssh-server.postinst: Quiesce "Unable to connect to Upstart" error + message from initctl if upstart is installed, but not the current init + system. (LP: #1440070) + * openssh-server.postinst: Fix version comparisons of upgrade adjustments + to not apply to fresh installs. + + -- Colin Watson Sun, 19 Apr 2015 14:32:43 +0100 + +openssh (1:6.7p1-5) unstable; urgency=medium + + * Revert change from previous upload, which causes far more trouble than + it is worth (closes: #780797): + - Send/accept only specific known LC_* variables, rather than using a + wildcard. + * Add a NEWS.Debian entry documenting this reversion, as it is too + difficult to undo the sshd_config change automatically without + compounding the problem of (arguably) overwriting user configuration. + + -- Colin Watson Sun, 22 Mar 2015 23:20:56 +0000 + +openssh (1:6.7p1-4) unstable; urgency=medium + + * Send/accept only specific known LC_* variables, rather than using a + wildcard (closes: #765633). + * Document interactions between ListenAddress/Port and ssh.socket in + README.Debian (closes: #764842). + * Debconf translations: + - Brazilian Portuguese (thanks, José de Figueiredo; closes: #771859). + + -- Colin Watson Wed, 18 Mar 2015 15:34:13 +0000 + +openssh (1:6.7p1-3) unstable; urgency=medium + + * Debconf translations: + - Dutch (thanks, Frans Spiesschaert; closes: #765851). + * Assume that dpkg-statoverride exists and drop the test for an obsolete + compatibility path. + + -- Colin Watson Mon, 03 Nov 2014 20:29:52 +0000 + +openssh (1:6.7p1-2) unstable; urgency=medium + + * debian/tests/control: Drop isolation-container, since the tests run on a + high port. They're still not guaranteed to run correctly in an schroot, + but may manage to work, so this lets the tests at least try to run on + ci.debian.net. + + -- Colin Watson Fri, 10 Oct 2014 10:47:19 +0100 + +openssh (1:6.7p1-1) unstable; urgency=medium + + * New upstream release (http://www.openssh.com/txt/release-6.7): + - sshd(8): The default set of ciphers and MACs has been altered to + remove unsafe algorithms. In particular, CBC ciphers and arcfour* are + disabled by default. The full set of algorithms remains available if + configured explicitly via the Ciphers and MACs sshd_config options. + - ssh(1), sshd(8): Add support for Unix domain socket forwarding. A + remote TCP port may be forwarded to a local Unix domain socket and + vice versa or both ends may be a Unix domain socket (closes: #236718). + - ssh(1), ssh-keygen(1): Add support for SSHFP DNS records for ED25519 + key types. + - sftp(1): Allow resumption of interrupted uploads. + - ssh(1): When rekeying, skip file/DNS lookups of the hostkey if it is + the same as the one sent during initial key exchange. + - sshd(8): Allow explicit ::1 and 127.0.0.1 forwarding bind addresses + when GatewayPorts=no; allows client to choose address family. + - sshd(8): Add a sshd_config PermitUserRC option to control whether + ~/.ssh/rc is executed, mirroring the no-user-rc authorized_keys + option. + - ssh(1): Add a %C escape sequence for LocalCommand and ControlPath that + expands to a unique identifier based on a hash of the tuple of (local + host, remote user, hostname, port). Helps avoid exceeding miserly + pathname limits for Unix domain sockets in multiplexing control paths. + - sshd(8): Make the "Too many authentication failures" message include + the user, source address, port and protocol in a format similar to the + authentication success / failure messages. + - Use CLOCK_BOOTTIME in preference to CLOCK_MONOTONIC when it is + available. It considers time spent suspended, thereby ensuring + timeouts (e.g. for expiring agent keys) fire correctly (closes: + #734553). + - Use prctl() to prevent sftp-server from accessing + /proc/self/{mem,maps}. + * Restore TCP wrappers support, removed upstream in 6.7. It is true that + dropping this reduces preauth attack surface in sshd. On the other + hand, this support seems to be quite widely used, and abruptly dropping + it (from the perspective of users who don't read openssh-unix-dev) could + easily cause more serious problems in practice. It's not entirely clear + what the right long-term answer for Debian is, but it at least probably + doesn't involve dropping this feature shortly before a freeze. + * Replace patch to disable OpenSSL version check with an updated version + of Kurt Roeckx's patch from #732940 to just avoid checking the status + field. + * Build-depend on a new enough dpkg-dev for dpkg-buildflags, rather than + simply a new enough dpkg. + * Simplify debian/rules using /usr/share/dpkg/buildflags.mk. + * Use Package-Type rather than XC-Package-Type, now that it is an official + field. + * Run a subset of the upstream regression test suite at package build + time, and the rest of it under autopkgtest. + + -- Colin Watson Thu, 09 Oct 2014 14:05:56 +0100 + +openssh (1:6.6p1-8) unstable; urgency=medium + + * Make the if-up hook use "reload" rather than "restart" if the system was + booted using systemd (closes: #756547). + * Show fingerprints of new keys after creating them in the postinst + (closes: #762128). + * Policy version 3.9.6: no changes required. + * Don't link /usr/share/doc/ssh to openssh-client, as this is not safe + between Architecture: all and Architecture: any binary packages (closes: + #763375). + + -- Colin Watson Fri, 03 Oct 2014 12:23:57 +0100 + +openssh (1:6.6p1-7) unstable; urgency=medium + + * Make sure that DEB_HOST_ARCH is set, even when invoking debian/rules + directly. + * Use dh-exec to simplify override_dh_install target. + * Remove several unnecessary entries in debian/*.dirs. + * Pass noupdate to the second call to pam_motd, not the first (thanks, Ken + T Takusagawa; closes: #757059). + * Debconf translations: + - Turkish (thanks, Mert Dirik; closes: #756757). + + -- Colin Watson Tue, 05 Aug 2014 09:10:04 +0100 + +openssh (1:6.6p1-6) unstable; urgency=medium + + * Upgrade to debhelper v9. + * Only use pam_keyinit on Linux architectures (closes: #747245). + * Make get_config_option more robust against trailing whitespace (thanks, + LaMont Jones). + * Debconf translations: + - Czech (thanks, Michal Šimůnek; closes: #751419). + + -- Colin Watson Sat, 28 Jun 2014 14:50:04 +0100 + +openssh (1:6.6p1-5) unstable; urgency=medium + + * Force ssh-agent Upstart job to use sh syntax regardless of the user's + shell (thanks, Steffen Stempel; LP: #1312928). + + -- Colin Watson Thu, 01 May 2014 16:27:53 +0100 + +openssh (1:6.6p1-4) unstable; urgency=medium + + * Debconf translations: + - Spanish (thanks, Matías Bellone; closes: #744867). + * Apply upstream-recommended patch to fix bignum encoding for + curve25519-sha256@libssh.org, fixing occasional key exchange failures. + + -- Colin Watson Mon, 21 Apr 2014 21:29:53 +0100 + +openssh (1:6.6p1-3) unstable; urgency=medium + + * Debconf translations: + - French (thanks, Étienne Gilli; closes: #743242). + * Never signal the service supervisor with SIGSTOP more than once, to + prevent a hang on re-exec (thanks, Robie Basak; LP: #1306877). + + -- Colin Watson Mon, 14 Apr 2014 12:11:50 +0100 + +openssh (1:6.6p1-2) unstable; urgency=medium + + * If no root password is set, then switch to "PermitRootLogin + without-password" without asking (LP: #1300127). + + -- Colin Watson Mon, 31 Mar 2014 12:20:46 +0100 + +openssh (1:6.6p1-1) unstable; urgency=medium + + [ Colin Watson ] + * Apply various warning-suppression and regression-test fixes to + gssapi.patch from Damien Miller. + * New upstream release (http://www.openssh.com/txt/release-6.6, + LP: #1298280): + - CVE-2014-2532: sshd(8): when using environment passing with an + sshd_config(5) AcceptEnv pattern with a wildcard, OpenSSH prior to 6.6 + could be tricked into accepting any environment variable that contains + the characters before the wildcard character. + * Re-enable btmp logging, as its permissions were fixed a long time ago in + response to #370050 (closes: #341883). + * Change to "PermitRootLogin without-password" for new installations, and + ask a debconf question when upgrading systems with "PermitRootLogin yes" + from previous versions (closes: #298138). + * Debconf translations: + - Danish (thanks, Joe Hansen). + - Portuguese (thanks, Américo Monteiro). + - Russian (thanks, Yuri Kozlov; closes: #742308). + - Swedish (thanks, Andreas Rönnquist). + - Japanese (thanks, victory). + - German (thanks, Stephan Beck; closes: #742541). + - Italian (thanks, Beatrice Torracca). + * Don't start ssh-agent from the Upstart user session job if something + like Xsession has already done so (based on work by Bruno Vasselle; + LP: #1244736). + + [ Matthew Vernon ] + * CVE-2014-2653: Fix failure to check SSHFP records if server presents a + certificate (bug reported by me, patch by upstream's Damien Miller; + thanks also to Mark Wooding for his help in fixing this) (Closes: + #742513) + + -- Colin Watson Fri, 28 Mar 2014 18:04:41 +0000 + +openssh (1:6.5p1-6) unstable; urgency=medium + + * Fix Breaks/Replaces versions of openssh-sftp-server on openssh-server + (thanks, Axel Beckert). + + -- Colin Watson Thu, 06 Mar 2014 16:18:44 +0000 + +openssh (1:6.5p1-5) unstable; urgency=medium + + [ Colin Watson ] + * Add Alias=sshd.service to systemd ssh.service file, to match "Provides: + sshd" in the sysvinit script (thanks, Michael Biebl). + * Add Before=ssh.service to systemd ssh.socket file, since otherwise + nothing guarantees that ssh.service has stopped before ssh.socket starts + (thanks, Uoti Urpala). + + [ Axel Beckert ] + * Split sftp-server into its own package to allow it to also be used by + other SSH server implementations like dropbear (closes: #504290). + + -- Colin Watson Wed, 05 Mar 2014 13:53:08 +0000 + +openssh (1:6.5p1-4) unstable; urgency=medium + + * Configure --without-hardening on hppa, to work around + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155 (closes: #738798). + * Amend "Running sshd from inittab" instructions in README.Debian to + recommend 'update-rc.d ssh disable', rather than manual removal of rc*.d + symlinks that won't work with dependency-based sysv-rc. + * Remove code related to non-dependency-based sysv-rc ordering, since that + is no longer supported. + * Apply patch from https://bugzilla.mindrot.org/show_bug.cgi?id=2200 to + fix getsockname errors when using "ssh -W" (closes: #738693). + + -- Colin Watson Sat, 15 Feb 2014 02:19:36 +0000 + +openssh (1:6.5p1-3) unstable; urgency=medium + + * Clarify socket activation mode in README.Debian, as suggested by Uoti + Urpala. + * Stop claiming that "Protocol 2" is a Debian-specific default; this has + been upstream's default since 5.4p1. + * Avoid stdout noise from which(1) on purge of openssh-client. + * Fix sysvinit->systemd transition code to cope with still-running + sysvinit jobs being considered active by systemd (thanks, Uoti Urpala + and Michael Biebl). + * Bump guard version for sysvinit->systemd transition to 1:6.5p1-3; we may + have got it wrong before, and it's fairly harmless to repeat it. + * Remove tests for whether /dev/null is a character device from the + Upstart job and the systemd service files; it's there to avoid a + confusing failure mode in daemon(), but with modern init systems we use + the -D option to suppress daemonisation anyway. + * Refer to /usr/share/common-licenses/GPL-2 in debian/copyright (for the + Debian patch) rather than plain GPL. + * Drop some very old Conflicts and Replaces (ssh (<< 1:3.8.1p1-9), + rsh-client (<< 0.16.1-1), ssh-krb5 (<< 1:4.3p2-7), ssh-nonfree (<< 2), + and openssh-client (<< 1:3.8.1p1-11)). These all relate to pre-etch + versions, for which we no longer have maintainer script code, and per + policy they would have to become Breaks nowadays anyway. + * Policy version 3.9.5. + * Drop unnecessary -1 in zlib1g Build-Depends version. + * Tweak dh_systemd_enable invocations to avoid lots of error noise. + + -- Colin Watson Wed, 12 Feb 2014 13:10:08 +0000 + +openssh (1:6.5p1-2) unstable; urgency=medium + + * Only enable ssh.service for systemd, not both ssh.service and + ssh.socket. Thanks to Michael Biebl for spotting this. + * Backport upstream patch to unbreak case-sensitive matching of ssh_config + (closes: #738619). + + -- Colin Watson Tue, 11 Feb 2014 11:28:35 +0000 + +openssh (1:6.5p1-1) unstable; urgency=medium + + * New upstream release (http://www.openssh.com/txt/release-6.5, + LP: #1275068): + - ssh(1): Add support for client-side hostname canonicalisation using a + set of DNS suffixes and rules in ssh_config(5). This allows + unqualified names to be canonicalised to fully-qualified domain names + to eliminate ambiguity when looking up keys in known_hosts or checking + host certificate names (closes: #115286). + * Switch to git; adjust Vcs-* fields. + * Convert to git-dpm, and drop source package documentation associated + with the old bzr/quilt patch handling workflow. + * Drop ssh-vulnkey and the associated ssh/ssh-add/sshd integration code, + leaving only basic configuration file compatibility, since it has been + nearly six years since the original vulnerability and this code is not + likely to be of much value any more (closes: #481853, #570651). See + https://lists.debian.org/debian-devel/2013/09/msg00240.html for my full + reasoning. + * Add OpenPGP signature checking configuration to watch file (thanks, + Daniel Kahn Gillmor; closes: #732441). + * Add the pam_keyinit session module, to create a new session keyring on + login (closes: #734816). + * Incorporate default path changes from shadow 1:4.0.18.1-8, removing + /usr/bin/X11 (closes: #644521). + * Generate ED25519 host keys on fresh installations. Upgraders who wish + to add such host keys should manually add 'HostKey + /etc/ssh/ssh_host_ed25519_key' to /etc/ssh/sshd_config and run + 'ssh-keygen -q -f /etc/ssh/ssh_host_ed25519_key -N "" -t ed25519'. + * Drop long-obsolete "SSH now uses protocol 2 by default" section from + README.Debian. + * Add systemd support (thanks, Sven Joachim; closes: #676830). + + -- Colin Watson Mon, 10 Feb 2014 14:58:26 +0000 + +openssh (1:6.4p1-2) unstable; urgency=high + + * Increase ServerKeyBits value in package-generated sshd_config to 1024 + (closes: #727622, LP: #1244272). + * Restore patch to disable OpenSSL version check (closes: #732940). + + -- Colin Watson Mon, 23 Dec 2013 10:44:04 +0000 + +openssh (1:6.4p1-1) unstable; urgency=high + + * New upstream release. Important changes: + - 6.3/6.3p1 (http://www.openssh.com/txt/release-6.3): + + sftp(1): add support for resuming partial downloads using the + "reget" command and on the sftp commandline or on the "get" + commandline using the "-a" (append) option (closes: #158590). + + ssh(1): add an "IgnoreUnknown" configuration option to selectively + suppress errors arising from unknown configuration directives + (closes: #436052). + + sftp(1): update progressmeter when data is acknowledged, not when + it's sent (partially addresses #708372). + + ssh(1): do not fatally exit when attempting to cleanup multiplexing- + created channels that are incompletely opened (closes: #651357). + - 6.4/6.4p1 (http://www.openssh.com/txt/release-6.4): + + CVE-2013-4548: sshd(8): fix a memory corruption problem triggered + during rekeying when an AES-GCM cipher is selected (closes: + #729029). Full details of the vulnerability are available at: + http://www.openssh.com/txt/gcmrekey.adv + * When running under Upstart, only consider the daemon started once it is + ready to accept connections (by raising SIGSTOP at that point and using + "expect stop"). + + -- Colin Watson Sat, 09 Nov 2013 18:24:16 +0000 + +openssh (1:6.2p2-6) unstable; urgency=low + + * Update config.guess and config.sub automatically at build time. + dh_autoreconf does not take care of that by default because openssh does + not use automake. + + -- Colin Watson Tue, 02 Jul 2013 22:54:49 +0100 + +openssh (1:6.2p2-5) unstable; urgency=low + + [ Colin Watson ] + * Document consequences of ssh-agent being setgid in ssh-agent(1); see + #711623. + * Use 'set -e' rather than '#! /bin/sh -e' in maintainer scripts and + ssh-argv0. + + [ Yolanda Robla ] + * debian/rules: Include real distribution in SSH_EXTRAVERSION instead of + hardcoding Debian (LP: #1195342). + + -- Colin Watson Thu, 27 Jun 2013 15:24:14 +0100 + +openssh (1:6.2p2-4) unstable; urgency=low + + * Fix non-portable shell in ssh-copy-id (closes: #711162). + * Rebuild against debhelper 9.20130604 with fixed dependencies for + invoke-rc.d and Upstart jobs (closes: #711159, #711364). + * Set SELinux context on private host keys as well as public host keys + (closes: #687436). + + -- Colin Watson Thu, 06 Jun 2013 17:06:31 +0100 + +openssh (1:6.2p2-3) unstable; urgency=low + + * If the running init daemon is Upstart, then, on the first upgrade to + this version, check whether sysvinit is still managing sshd; if so, + manually stop it so that it can be restarted under upstart. We do this + near the end of the postinst, so it shouldn't result in any appreciable + extra window where sshd is not running during upgrade. + + -- Colin Watson Wed, 22 May 2013 17:42:10 +0100 + +openssh (1:6.2p2-2) unstable; urgency=low + + * Change start condition of Upstart job to be just the standard "runlevel + [2345]", rather than "filesystem or runlevel [2345]"; the latter makes + it unreasonably difficult to ensure that urandom starts before ssh, and + is not really necessary since one of static-network-up and failsafe-boot + is guaranteed to happen and will trigger entry to the default runlevel, + and we don't care about ssh starting before the network (LP: #1098299). + * Drop conffile handling for direct upgrades from pre-split ssh package; + this was originally added in 1:4.3p2-7 / 1:4.3p2-8, and contained a + truly ghastly hack around a misbehaviour in sarge's dpkg. Since this is + now four Debian releases ago, we can afford to drop this and simplify + the packaging. + * Remove ssh/use_old_init_script, which was a workaround for a very old + bug in /etc/init.d/ssh. If anyone has ignored this for >10 years then + they aren't going to be convinced now (closes: #214182). + * Remove support for upgrading directly from ssh-nonfree. + * Remove lots of maintainer script support for direct upgrades from + pre-etch (three releases before current stable). + * Add #DEBHELPER# tokens to openssh-client.postinst and + openssh-server.postinst. + * Replace old manual conffile handling code with dpkg-maintscript-helper, + via dh_installdeb. + * Switch to new unified layout for Upstart jobs as documented in + https://wiki.ubuntu.com/UpstartCompatibleInitScripts: the init script + checks for a running Upstart, and we now let dh_installinit handle most + of the heavy lifting in maintainer scripts. Ubuntu users should be + essentially unaffected except that sshd may no longer start + automatically in chroots if the running Upstart predates 0.9.0; but the + main goal is simply not to break when openssh-server is installed in a + chroot. + * Remove the check for vulnerable host keys; this was first added five + years ago, and everyone should have upgraded through a version that + applied these checks by now. The ssh-vulnkey tool and the blacklisting + support in sshd are still here, at least for the moment. + * This removes the last of our uses of debconf (closes: #221531). + * Use the pam_loginuid session module (thanks, Laurent Bigonville; closes: + #677440, LP: #1067779). + * Bracket our session stack with calls to pam_selinux close/open (thanks, + Laurent Bigonville; closes: #679458). + * Fix dh_builddeb invocation so that we really use xz compression for + binary packages, as intended since 1:6.1p1-2. + + -- Colin Watson Wed, 22 May 2013 09:07:42 +0100 + +openssh (1:6.2p2-1) unstable; urgency=low + + * New upstream release (http://www.openssh.com/txt/release-6.2p2): + - Only warn for missing identity files that were explicitly specified + (closes: #708275). + - Fix bug in contributed contrib/ssh-copy-id script that could result in + "rm *" being called on mktemp failure (closes: #708419). + + -- Colin Watson Thu, 16 May 2013 14:05:06 +0100 + +openssh (1:6.2p1-3) unstable; urgency=low + + * Renumber Debian-specific additions to enum monitor_reqtype so that they + fit within a single byte (thanks, Jason Conti; LP: #1179202). + + -- Colin Watson Mon, 13 May 2013 10:56:04 +0100 + +openssh (1:6.2p1-2) unstable; urgency=low + + * Fix build failure on Ubuntu: + - Include openbsd-compat/sys-queue.h from consolekit.c. + - Fix consolekit mismerges in monitor.c and monitor_wrap.c. + + -- Colin Watson Thu, 09 May 2013 09:45:57 +0100 + +openssh (1:6.2p1-1) unstable; urgency=low + + * New upstream release (http://www.openssh.com/txt/release-6.2). + - Add support for multiple required authentication in SSH protocol 2 via + an AuthenticationMethods option (closes: #195716). + - Fix Sophie Germain formula in moduli(5) (closes: #698612). + - Update ssh-copy-id to Phil Hands' greatly revised version (closes: + #99785, #322228, #620428; LP: #518883, #835901, #1074798). + * Use dh-autoreconf. + + -- Colin Watson Tue, 07 May 2013 11:48:16 +0100 + +openssh (1:6.1p1-4) experimental; urgency=low + + [ Gunnar Hjalmarsson ] + * debian/openssh-server.sshd.pam: Explicitly state that ~/.pam_environment + should be read, and move the pam_env calls from "auth" to "session" so + that it's also read when $HOME is encrypted (LP: #952185). + + [ Stéphane Graber ] + * Add ssh-agent upstart user job. This implements something similar to + the 90x11-common_ssh-agent Xsession script. That is, start ssh-agent + and set the appropriate environment variables (closes: #703906). + + -- Colin Watson Mon, 25 Mar 2013 16:58:04 +0000 + +openssh (1:6.1p1-3) experimental; urgency=low + + * Give ssh and ssh-krb5 versioned dependencies on openssh-client and + openssh-server, to try to reduce confusion when people run 'apt-get + install ssh' or similar and expect that to upgrade everything relevant. + * CVE-2010-5107: Improve DoS resistance by changing default of MaxStartups + to 10:30:100 (closes: #700102). + + -- Colin Watson Fri, 08 Feb 2013 21:07:31 +0000 + +openssh (1:6.1p1-2) experimental; urgency=low + + * Use xz compression for binary packages. + * Merge from Ubuntu: + - Add support for registering ConsoleKit sessions on login. (This is + currently enabled only when building for Ubuntu.) + - Drop openssh-blacklist and openssh-blacklist-extra to Suggests. It's + been long enough since the relevant vulnerability that we shouldn't + need these installed by default nowadays. + - Add an Upstart job (not currently used by default in Debian). + - Add mention of ssh-keygen in ssh connect warning (Scott Moser). + - Install apport hooks. + * Only build with -j if DEB_BUILD_OPTIONS=parallel=* is used (closes: + #694282). + + -- Colin Watson Mon, 26 Nov 2012 16:39:07 +0000 + +openssh (1:6.1p1-1) experimental; urgency=low + + * New upstream release (http://www.openssh.com/txt/release-6.1). + - Enable pre-auth sandboxing by default for new installs. + - Allow "PermitOpen none" to refuse all port-forwarding requests + (closes: #543683). + + -- Colin Watson Fri, 07 Sep 2012 00:22:44 +0100 + +openssh (1:6.0p1-3) unstable; urgency=low + + * debconf template translations: + - Add Indonesian (thanks, Andika Triwidada; closes: #681670). + * Call restorecon on copied ~/.ssh/authorized_keys if possible, since some + SELinux policies require this (closes: #658675). + * Add ncurses-term to openssh-server's Recommends, since it's often needed + to support unusual terminal emulators on clients (closes: #675362). + + -- Colin Watson Fri, 24 Aug 2012 06:55:36 +0100 + +openssh (1:6.0p1-2) unstable; urgency=low + + * Tighten libssl1.0.0 and libcrypto1.0.0-udeb dependencies to the current + "fix" version at build time (closes: #678661). + + -- Colin Watson Sun, 24 Jun 2012 12:16:06 +0100 + +openssh (1:6.0p1-1) unstable; urgency=low + + [ Roger Leigh ] + * Display dynamic part of MOTD from /run/motd.dynamic, if it exists + (closes: #669699). + + [ Colin Watson ] + * Update OpenSSH FAQ to revision 1.113, fixing missing line break (closes: + #669667). + * New upstream release (closes: #671010, + http://www.openssh.com/txt/release-6.0). + - Fix IPQoS not being set on non-mapped v4-in-v6 addressed connections + (closes: #643312, #650512, #671075). + - Add a new privilege separation sandbox implementation for Linux's new + seccomp sandbox, automatically enabled on platforms that support it. + (Note: privilege separation sandboxing is still experimental.) + * Fix a bashism in configure's seccomp_filter check. + * Add a sandbox fallback mechanism, so that behaviour on Linux depends on + whether the running system's kernel has seccomp_filter support, not the + build system's kernel (forwarded upstream as + https://bugzilla.mindrot.org/show_bug.cgi?id=2011). + + -- Colin Watson Sat, 26 May 2012 13:48:14 +0100 + +openssh (1:5.9p1-5) unstable; urgency=low + + * Use dpkg-buildflags, including for hardening support; drop use of + hardening-includes. + * Fix cross-building: + - Allow using a cross-architecture pkg-config. + - Pass default LDFLAGS to contrib/Makefile. + - Allow dh_strip to strip gnome-ssh-askpass, rather than calling + 'install -s'. + + -- Colin Watson Mon, 02 Apr 2012 11:20:33 +0100 + +openssh (1:5.9p1-4) unstable; urgency=low + + * Disable OpenSSL version check again, as its SONAME is sufficient + nowadays (closes: #664383). + + -- Colin Watson Mon, 19 Mar 2012 11:06:30 +0000 + +openssh (1:5.9p1-3) unstable; urgency=low + + * debconf template translations: + - Update Polish (thanks, Michał Kułach; closes: #659829). + * Ignore errors writing to console in init script (closes: #546743). + * Move ssh-krb5 to Section: oldlibs. + + -- Colin Watson Fri, 24 Feb 2012 08:56:18 +0000 + +openssh (1:5.9p1-2) unstable; urgency=low + + * Mark openssh-client and openssh-server as Multi-Arch: foreign. + + -- Colin Watson Wed, 09 Nov 2011 02:06:48 +0000 + +openssh (1:5.9p1-1) unstable; urgency=low + + * New upstream release (http://www.openssh.com/txt/release-5.9). + - Introduce sandboxing of the pre-auth privsep child using an optional + sshd_config(5) "UsePrivilegeSeparation=sandbox" mode that enables + mandatory restrictions on the syscalls the privsep child can perform. + - Add new SHA256-based HMAC transport integrity modes from + http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-02.txt. + - The pre-authentication sshd(8) privilege separation slave process now + logs via a socket shared with the master process, avoiding the need to + maintain /dev/log inside the chroot (closes: #75043, #429243, + #599240). + - ssh(1) now warns when a server refuses X11 forwarding (closes: + #504757). + - sshd_config(5)'s AuthorizedKeysFile now accepts multiple paths, + separated by whitespace (closes: #76312). The authorized_keys2 + fallback is deprecated but documented (closes: #560156). + - ssh(1) and sshd(8): set IPv6 traffic class from IPQoS, as well as IPv4 + ToS/DSCP (closes: #498297). + - ssh-add(1) now accepts keys piped from standard input. E.g. "ssh-add + - < /path/to/key" (closes: #229124). + - Clean up lost-passphrase text in ssh-keygen(1) (closes: #444691). + - Say "required" rather than "recommended" in unprotected-private-key + warning (LP: #663455). + * Update OpenSSH FAQ to revision 1.112. + + -- Colin Watson Wed, 07 Sep 2011 23:46:00 +0100 + +openssh (1:5.8p1-7) unstable; urgency=low + + * Only recommend ssh-import-id when built on Ubuntu (closes: #635887). + * Use 'dpkg-vendor --derives-from Ubuntu' to detect Ubuntu systems rather + than 'lsb_release -is' so that Ubuntu derivatives behave the same way as + Ubuntu itself. + + -- Colin Watson Fri, 29 Jul 2011 14:27:52 +0100 + +openssh (1:5.8p1-6) unstable; urgency=low + + * openssh-client and openssh-server Suggests: monkeysphere. + * Quieten logs when multiple from= restrictions are used in different + authorized_keys lines for the same key; it's still not ideal, but at + least you'll only get one log entry per key (closes: #630606). + * Merge from Ubuntu (Dustin Kirkland): + - openssh-server Recommends: ssh-import-id (no-op in Debian since that + package doesn't exist there, but this reduces the Ubuntu delta). + + -- Colin Watson Thu, 28 Jul 2011 17:10:18 +0100 + +openssh (1:5.8p1-5) unstable; urgency=low + + * Drop openssh-server's dependency on openssh-blacklist to a + recommendation (closes: #622604). + * Update Vcs-* fields and README.source for Alioth changes. + * Backport from upstream: + - Make hostbased auth with ECDSA keys work correctly (closes: #633368). + + -- Colin Watson Sun, 24 Jul 2011 11:06:47 +0100 + +openssh (1:5.8p1-4) unstable; urgency=low + + * Drop hardcoded dependencies on libssl0.9.8 and libcrypto0.9.8-udeb, + since the required minimum versions are rather old now anyway and + openssl has bumped its SONAME (thanks, Julien Cristau; closes: #620828). + * Remove unreachable code from openssh-server.postinst. + + -- Colin Watson Mon, 04 Apr 2011 15:56:18 +0100 + +openssh (1:5.8p1-3) unstable; urgency=low + + * Correct ssh-keygen instruction in the changelog for 1:5.7p1-1 (thanks, + Joel Stanley). + * Allow ssh-add to read from FIFOs (thanks, Daniel Kahn Gillmor; closes: + #614897). + + -- Colin Watson Fri, 18 Mar 2011 16:42:42 +0000 + +openssh (1:5.8p1-2) unstable; urgency=low + + * Upload to unstable. + + -- Colin Watson Tue, 08 Feb 2011 10:59:17 +0000 + +openssh (1:5.8p1-1) experimental; urgency=low + + * New upstream release (http://www.openssh.com/txt/release-5.8): + - Fix stack information leak in legacy certificate signing + (http://www.openssh.com/txt/legacy-cert.adv). + + -- Colin Watson Sat, 05 Feb 2011 11:13:11 +0000 + +openssh (1:5.7p1-2) experimental; urgency=low + + * Fix crash in ssh_selinux_setfscreatecon when SELinux is disabled + (LP: #708571). + + -- Colin Watson Thu, 27 Jan 2011 12:14:17 +0000 + +openssh (1:5.7p1-1) experimental; urgency=low + + * New upstream release (http://www.openssh.com/txt/release-5.7): + - Implement Elliptic Curve Cryptography modes for key exchange (ECDH) + and host/user keys (ECDSA) as specified by RFC5656. ECDH and ECDSA + offer better performance than plain DH and DSA at the same equivalent + symmetric key length, as well as much shorter keys. + - sftp(1)/sftp-server(8): add a protocol extension to support a hard + link operation. It is available through the "ln" command in the + client. The old "ln" behaviour of creating a symlink is available + using its "-s" option or through the preexisting "symlink" command. + - scp(1): Add a new -3 option to scp: Copies between two remote hosts + are transferred through the local host (closes: #508613). + - ssh(1): "atomically" create the listening mux socket by binding it on + a temporary name and then linking it into position after listen() has + succeeded. This allows the mux clients to determine that the server + socket is either ready or stale without races (closes: #454784). + Stale server sockets are now automatically removed (closes: #523250). + - ssh(1): install a SIGCHLD handler to reap expired child process + (closes: #594687). + - ssh(1)/ssh-agent(1): honour $TMPDIR for client xauth and ssh-agent + temporary directories (closes: #357469, although only if you arrange + for ssh-agent to actually see $TMPDIR since the setgid bit will cause + it to be stripped off). + * Update to current GSSAPI patch from + http://www.sxw.org.uk/computing/patches/openssh-5.7p1-gsskex-all-20110125.patch: + - Add GSSAPIServerIdentity option. + * Generate ECDSA host keys on fresh installations. Upgraders who wish to + add such host keys should manually add 'HostKey + /etc/ssh/ssh_host_ecdsa_key' to /etc/ssh/sshd_config and run 'ssh-keygen + -q -f /etc/ssh/ssh_host_ecdsa_key -N "" -t ecdsa'. + * Build-depend on libssl-dev (>= 0.9.8g) to ensure sufficient ECC support. + * Backport SELinux build fix from CVS. + * Rearrange selinux-role.patch so that it links properly given this + SELinux build fix. + + -- Colin Watson Wed, 26 Jan 2011 23:48:02 +0000 + +openssh (1:5.6p1-3) experimental; urgency=low + + * Drop override for desktop-file-but-no-dh_desktop-call, which Lintian no + longer issues. + * Merge 1:5.5p1-6. + + -- Colin Watson Thu, 30 Dec 2010 11:48:00 +0000 + +openssh (1:5.6p1-2) experimental; urgency=low + + * Backport upstream patch to install a SIGCHLD handler to reap expired ssh + child processes, preventing lots of zombies when using ControlPersist + (closes: #594687). + + -- Colin Watson Tue, 26 Oct 2010 14:46:40 +0100 + +openssh (1:5.6p1-1) experimental; urgency=low + + * New upstream release (http://www.openssh.com/txt/release-5.6): + - Added a ControlPersist option to ssh_config(5) that automatically + starts a background ssh(1) multiplex master when connecting. This + connection can stay alive indefinitely, or can be set to automatically + close after a user-specified duration of inactivity (closes: #335697, + #350898, #454787, #500573, #550262). + - Support AuthorizedKeysFile, AuthorizedPrincipalsFile, + HostbasedUsesNameFromPacketOnly, and PermitTunnel in sshd_config(5) + Match blocks (closes: #549858). + - sftp(1): fix ls in working directories that contain globbing + characters in their pathnames (LP: #530714). + + -- Colin Watson Tue, 24 Aug 2010 00:37:54 +0100 + +openssh (1:5.5p1-6) unstable; urgency=low + + * Touch /var/run/sshd/.placeholder in the preinst so that /var/run/sshd, + which is intentionally no longer shipped in the openssh-server package + due to /var/run often being a temporary directory, is not removed on + upgrade (closes: #575582). + + -- Colin Watson Sun, 26 Dec 2010 18:09:29 +0000 + +openssh (1:5.5p1-5) unstable; urgency=low + + * Use an architecture wildcard for libselinux1-dev (closes: #591740). + * debconf template translations: + - Update Danish (thanks, Joe Hansen; closes: #592800). + + -- Colin Watson Mon, 23 Aug 2010 22:59:03 +0100 + +openssh (1:5.5p1-4) unstable; urgency=low + + [ Sebastian Andrzej Siewior ] + * Add powerpcspe to architecture list for libselinux1-dev build-dependency + (closes: #579843). + + [ Colin Watson ] + * Allow ~/.ssh/authorized_keys and other secure files to be + group-writable, provided that the group in question contains only the + file's owner; this extends a patch previously applied to ~/.ssh/config + (closes: #581919). + * Check primary group memberships as well as supplementary group + memberships, and only allow group-writability by groups with exactly one + member, as zero-member groups are typically used by setgid binaries + rather than being user-private groups (closes: #581697). + + -- Colin Watson Sat, 22 May 2010 23:37:20 +0100 + +openssh (1:5.5p1-3) unstable; urgency=low + + * Discard error messages while checking whether rsh, rlogin, and rcp + alternatives exist (closes: #579285). + * Drop IDEA key check; I don't think it works properly any more due to + textual changes in error output, it's only relevant for direct upgrades + from truly ancient versions, and it breaks upgrades if + /etc/ssh/ssh_host_key can't be loaded (closes: #579570). + + -- Colin Watson Wed, 28 Apr 2010 22:12:47 +0100 + +openssh (1:5.5p1-2) unstable; urgency=low + + * Use dh_installinit -n, since our maintainer scripts already handle this + more carefully (thanks, Julien Cristau). + + -- Colin Watson Sat, 17 Apr 2010 12:55:56 +0100 + +openssh (1:5.5p1-1) unstable; urgency=low + + * New upstream release: + - Unbreak sshd_config's AuthorizedKeysFile option for $HOME-relative + paths. + - Include a language tag when sending a protocol 2 disconnection + message. + - Make logging of certificates used for user authentication more clear + and consistent between CAs specified using TrustedUserCAKeys and + authorized_keys. + + -- Colin Watson Fri, 16 Apr 2010 10:27:30 +0100 + +openssh (1:5.4p1-2) unstable; urgency=low + + * Borrow patch from Fedora to add DNSSEC support: if glibc 2.11 is + installed, the host key is published in an SSHFP RR secured with DNSSEC, + and VerifyHostKeyDNS=yes, then ssh will no longer prompt for host key + verification (closes: #572049). + * Convert to dh(1), and use dh_installdocs --link-doc. + * Drop lpia support, since Ubuntu no longer supports this architecture. + * Use dh_install more effectively. + * Add a NEWS.Debian entry about changes in smartcard support relative to + previous unofficial builds (closes: #231472). + + -- Colin Watson Sat, 10 Apr 2010 01:08:59 +0100 + +openssh (1:5.4p1-1) unstable; urgency=low + + * New upstream release (LP: #535029). + - After a transition period of about 10 years, this release disables SSH + protocol 1 by default. Clients and servers that need to use the + legacy protocol must explicitly enable it in ssh_config / sshd_config + or on the command-line. + - Remove the libsectok/OpenSC-based smartcard code and add support for + PKCS#11 tokens. This support is enabled by default in the Debian + packaging, since it now doesn't involve additional library + dependencies (closes: #231472, LP: #16918). + - Add support for certificate authentication of users and hosts using a + new, minimal OpenSSH certificate format (closes: #482806). + - Added a 'netcat mode' to ssh(1): "ssh -W host:port ...". + - Add the ability to revoke keys in sshd(8) and ssh(1). (For the Debian + package, this overlaps with the key blacklisting facility added in + openssh 1:4.7p1-9, but with different file formats and slightly + different scopes; for the moment, I've roughly merged the two.) + - Various multiplexing improvements, including support for requesting + port-forwardings via the multiplex protocol (closes: #360151). + - Allow setting an explicit umask on the sftp-server(8) commandline to + override whatever default the user has (closes: #496843). + - Many sftp client improvements, including tab-completion, more options, + and recursive transfer support for get/put (LP: #33378). The old + mget/mput commands never worked properly and have been removed + (closes: #270399, #428082). + - Do not prompt for a passphrase if we fail to open a keyfile, and log + the reason why the open failed to debug (closes: #431538). + - Prevent sftp from crashing when given a "-" without a command. Also, + allow whitespace to follow a "-" (closes: #531561). + + * Fix 'debian/rules quilt-setup' to avoid writing .orig files if some + patches apply with offsets. + * Include debian/ssh-askpass-gnome.png in the Debian tarball now that + we're using a source format that permits this, rather than messing + around with uudecode. + * Drop compatibility with the old gssapi mechanism used in ssh-krb5 << + 3.8.1p1-1. Simon Wilkinson refused this patch since the old gssapi + mechanism was removed due to a serious security hole, and since these + versions of ssh-krb5 are no longer security-supported by Debian I don't + think there's any point keeping client compatibility for them. + * Fix substitution of ETC_PAM_D_SSH, following the rename in 1:4.7p1-4. + * Hardcode the location of xauth to /usr/bin/xauth rather than + /usr/bin/X11/xauth (thanks, Aron Griffis; closes: #575725, LP: #8440). + xauth no longer depends on x11-common, so we're no longer guaranteed to + have the /usr/bin/X11 symlink available. I was taking advantage of the + /usr/bin/X11 symlink to smooth X's move to /usr/bin, but this is far + enough in the past now that it's probably safe to just use /usr/bin. + * Remove SSHD_OOM_ADJUST configuration. sshd now unconditionally makes + itself non-OOM-killable, and doesn't require configuration to avoid log + spam in virtualisation containers (closes: #555625). + * Drop Debian-specific removal of OpenSSL version check. Upstream ignores + the two patchlevel nybbles now, which is sufficient to address the + original reason this change was introduced, and it appears that any + change in the major/minor/fix nybbles would involve a new libssl package + name. (We'd still lose if the status nybble were ever changed, but that + would mean somebody had packaged a development/beta version rather than + a proper release, which doesn't appear to be normal practice.) + * Drop most of our "LogLevel SILENT" (-qq) patch. This was originally + introduced to match the behaviour of non-free SSH, in which -q does not + suppress fatal errors, but matching the behaviour of OpenSSH upstream is + much more important nowadays. We no longer document that -q does not + suppress fatal errors (closes: #280609). Migrate "LogLevel SILENT" to + "LogLevel QUIET" in sshd_config on upgrade. + * Policy version 3.8.4: + - Add a Homepage field. + + -- Colin Watson Tue, 06 Apr 2010 22:38:31 +0100 + +openssh (1:5.3p1-3) unstable; urgency=low + + * Convert to source format 3.0 (quilt). + * Update README.source to match, and add a 'quilt-setup' target to + debian/rules for the benefit of those checking out the package from + revision control. + * All patches are now maintained separately and tagged according to DEP-3. + * Add GSSAPIStoreCredentialsOnRekey to 'sshd -T' configuration dump. + * Remove documentation of building for Debian 3.0 in README.Debian. + Support for this was removed in 1:4.7p1-2. + * Remove obsolete header from README.Debian dating from when people + expected non-free SSH. + * Update copyright years for GSSAPI patch. + + -- Colin Watson Sun, 28 Feb 2010 01:35:53 +0000 + +openssh (1:5.3p1-2) unstable; urgency=low + + * Link with -Wl,--as-needed (closes: #560155). + * Install upstream sshd_config as an example (closes: #415008). + * Use dh_lintian. + * Honour DEB_BUILD_OPTIONS=nocheck. + + -- Colin Watson Mon, 22 Feb 2010 12:43:24 +0000 + +openssh (1:5.3p1-1) unstable; urgency=low + + * New upstream release. + * Update to GSSAPI patch from + http://www.sxw.org.uk/computing/patches/openssh-5.3p1-gsskex-all-20100124.patch. + * Backport from upstream: + - Do not fall back to adding keys without constraints (ssh-add -c / -t + ...) when the agent refuses the constrained add request. This was a + useful migration measure back in 2002 when constraints were new, but + just adds risk now (LP: #209447). + * Drop change from 1:3.8p1-3 to avoid setresuid() and setresgid() system + calls. This only applied to Linux 2.2, which it's no longer feasible to + run anyway (see 1:5.2p1-2 changelog). + + -- Colin Watson Tue, 26 Jan 2010 11:55:29 +0000 + +openssh (1:5.2p1-2) unstable; urgency=low + + [ Colin Watson ] + * Backport from upstream: + - After sshd receives a SIGHUP, ignore subsequent HUPs while sshd + re-execs itself. Prevents two HUPs in quick succession from resulting + in sshd dying (LP: #497781). + - Output a debug if we can't open an existing keyfile (LP: #505301). + * Use host compiler for ssh-askpass-gnome when cross-compiling. + * Don't run tests when cross-compiling. + * Drop change from 1:3.6.1p2-5 to disable cmsg_type check for file + descriptor passing when running on Linux 2.0. The previous stable + release of Debian dropped support for Linux 2.4, let alone 2.0, so this + very likely has no remaining users depending on it. + + [ Kees Cook ] + * Implement DebianBanner server configuration flag that can be set to "no" + to allow sshd to run without the Debian-specific extra version in the + initial protocol handshake (closes: #562048). + + -- Colin Watson Sat, 16 Jan 2010 01:28:58 +0000 + +openssh (1:5.2p1-1) unstable; urgency=low + + * New upstream release (closes: #536182). Yes, I know 5.3p1 has been out + for a while, but there's no GSSAPI patch available for it yet. + - Change the default cipher order to prefer the AES CTR modes and the + revised "arcfour256" mode to CBC mode ciphers that are susceptible to + CPNI-957037 "Plaintext Recovery Attack Against SSH". + - Add countermeasures to mitigate CPNI-957037-style attacks against the + SSH protocol's use of CBC-mode ciphers. Upon detection of an invalid + packet length or Message Authentication Code, ssh/sshd will continue + reading up to the maximum supported packet length rather than + immediately terminating the connection. This eliminates most of the + known differences in behaviour that leaked information about the + plaintext of injected data which formed the basis of this attack + (closes: #506115, LP: #379329). + - ForceCommand directive now accepts commandline arguments for the + internal-sftp server (closes: #524423, LP: #362511). + - Add AllowAgentForwarding to available Match keywords list (closes: + #540623). + - Make ssh(1) send the correct channel number for + SSH2_MSG_CHANNEL_SUCCESS and SSH2_MSG_CHANNEL_FAILURE messages to + avoid triggering 'Non-public channel' error messages on sshd(8) in + openssh-5.1. + - Avoid printing 'Non-public channel' warnings in sshd(8), since the + ssh(1) has sent incorrect channel numbers since ~2004 (this reverts a + behaviour introduced in openssh-5.1; closes: #496017). + - Disable nonfunctional ssh(1) ~C escape handler in multiplex slave + connections (closes: #507541). + - Fix "whitepsace" typo in ssh_config(5) (closes: #514313, LP: #303835). + * Update to GSSAPI patch from + http://www.sxw.org.uk/computing/patches/openssh-5.2p1-gsskex-all-20090726.patch, + including cascading credentials support (LP: #416958). + * Use x11.pc when compiling/linking gnome-ssh-askpass2 (closes: #555951). + * Moved to bzr.debian.org; add Vcs-Bzr and Vcs-Browser control fields. + * Add debian/README.source with instructions on bzr handling. + * Make ChrootDirectory work with SELinux (thanks, Russell Coker; closes: + #556644). + * Initialise sc to NULL in ssh_selinux_getctxbyname (thanks, Václav Ovsík; + closes: #498684). + * Don't duplicate backslashes when displaying server banner (thanks, + Michał Górny; closes: #505378, LP: #425346). + * Use hardening-includes for hardening logic (thanks, Kees Cook; closes: + #561887). + * Update OpenSSH FAQ to revision 1.110. + * Remove ssh/new_config, only needed for direct upgrades from potato which + are no longer particularly feasible anyway (closes: #420682). + * Cope with insserv reordering of init script links. + * Remove init script stop link in rc1, as killprocs handles it already. + * Adjust short descriptions to avoid relying on previous experience with + rsh, based on suggestions from Reuben Thomas (closes: #512198). + * Remove manual page references to login.conf, which aren't applicable on + non-BSD systems (closes: #154434). + * Remove/adjust manual page references to BSD-specific /etc/rc (closes: + #513417). + * Refer to sshd_config(5) rather than sshd(8) in postinst-written + /etc/ssh/sshd_config, and add UsePAM commentary from upstream-shipped + configuration file (closes: #415008, although unfortunately this will + only be conveniently visible on new installations). + * Include URL to OpenBSD's ssl(8) in ssh(1), since I don't see a better + source for the same information among Debian's manual pages (closes: + #530692, LP: #456660). + + -- Colin Watson Mon, 04 Jan 2010 13:23:35 +0000 + +openssh (1:5.1p1-8) unstable; urgency=low + + * Build with just -fPIC on mips/mipsel, not -fPIE as well (thanks, LIU Qi; + closes: #538313). + * Build-depend on libselinux1-dev on sh4 too (thanks, Nobuhiro Iwamatsu; + closes: #547103). + * Fix grammar in if-up script (closes: #549128). + * Pass $SSHD_OPTS when checking configuration too (thanks, "sobtwmxt"; + closes: #548662). + + -- Colin Watson Mon, 05 Oct 2009 13:30:49 +0100 + +openssh (1:5.1p1-7) unstable; urgency=low + + * Update config.guess and config.sub from autotools-dev 20090611.1 + (closes: #538301). + * Set umask to 022 in the init script as well as postinsts (closes: + #539030). + * Add ${misc:Depends} to keep Lintian happy. + * Use 'which' rather than 'type' in maintainer scripts. + * Upgrade to debhelper v7. + + -- Colin Watson Fri, 31 Jul 2009 16:28:10 +0100 + +openssh (1:5.1p1-6) unstable; urgency=low + + * Open /proc/self/oom_adj with O_RDONLY or O_WRONLY as necessary, rather + than O_RDWR. + * Disable OOM adjustment for vserver/OpenVZ (thanks, Karl Chen; closes: + #511771). + * Add ufw integration (thanks, Didier Roche; see + https://wiki.ubuntu.com/UbuntuFirewall#Integrating%20UFW%20with%20Packages; + LP: #261884). + * Add a comment above PermitRootLogin in sshd_config pointing to + README.Debian. + * Check if delgroup is present in openssh-client.postrm (closes: #530501). + * Build with -fPIC on mips/mipsel (thanks, Luk Claes; closes: #531942). + * Remove /var/run/sshd from openssh-server package; it will be created at + run-time before starting the server. + * Use invoke-rc.d in openssh-server's if-up script. + + -- Colin Watson Fri, 05 Jun 2009 11:56:03 +0100 + +openssh (1:5.1p1-5) unstable; urgency=low + + * Backport from upstream CVS (Markus Friedl): + - packet_disconnect() on padding error, too. Should reduce the success + probability for the CPNI-957037 Plaintext Recovery Attack to 2^-18. + * Check that /var/run/sshd.pid exists and that the process ID listed there + corresponds to sshd before running '/etc/init.d/ssh reload' from if-up + script; SIGHUP is racy if called at boot before sshd has a chance to + install its signal handler, but fortunately the pid file is written + after that which lets us avoid the race (closes: #502444). + * While the above is a valuable sanity-check, it turns out that it doesn't + really fix the bug (thanks to Kevin Price for testing), so for the + meantime we'll just use '/etc/init.d/ssh restart', even though it is + unfortunately heavyweight. + + -- Colin Watson Wed, 14 Jan 2009 00:34:08 +0000 + +openssh (1:5.1p1-4) unstable; urgency=low + + * ssh-copy-id: Strip trailing colons from hostname (closes: #226172, + LP: #249706; thanks to Karl Goetz for nudging this along; forwarded + upstream as https://bugzilla.mindrot.org/show_bug.cgi?id=1530). + * Backport from upstream CVS (Markus Friedl): + - Only send eow and no-more-sessions requests to openssh 5 and newer; + fixes interop problems with broken ssh v2 implementations (closes: + #495917). + * Fix double-free when failing to parse a forwarding specification given + using ~C (closes: #505330; forwarded upstream as + https://bugzilla.mindrot.org/show_bug.cgi?id=1539). + + -- Colin Watson Sun, 23 Nov 2008 14:46:10 +0000 + +openssh (1:5.1p1-3) unstable; urgency=low + + * Remove unnecessary ssh-vulnkey output in non-verbose mode when no + compromised or unknown keys were found (closes: #496495). + * Configure with --disable-strip; dh_strip will deal with stripping + binaries and will honour DEB_BUILD_OPTIONS (thanks, Bernhard R. Link; + closes: #498681). + * Fix handling of zero-length server banners (thanks, Tomas Mraz; closes: + #497026). + + -- Colin Watson Tue, 30 Sep 2008 23:09:58 +0100 + +openssh (1:5.1p1-2) unstable; urgency=low + + * Look for $SHELL on the path when executing ProxyCommands or + LocalCommands (closes: #492728). + + -- Colin Watson Tue, 29 Jul 2008 15:31:25 +0100 + +openssh (1:5.1p1-1) unstable; urgency=low + + * New upstream release (closes: #474301). Important changes not previously + backported to 4.7p1: + - 4.9/4.9p1 (http://www.openssh.com/txt/release-4.9): + + Added chroot(2) support for sshd(8), controlled by a new option + "ChrootDirectory" (closes: #139047, LP: #24777). + + Linked sftp-server(8) into sshd(8). The internal sftp server is used + when the command "internal-sftp" is specified in a Subsystem or + ForceCommand declaration. When used with ChrootDirectory, the + internal sftp server requires no special configuration of files + inside the chroot environment. + + Added a protocol extension method "posix-rename@openssh.com" for + sftp-server(8) to perform POSIX atomic rename() operations; sftp(1) + prefers this if available (closes: #308561). + + Removed the fixed limit of 100 file handles in sftp-server(8). + + ssh(8) will now skip generation of SSH protocol 1 ephemeral server + keys when in inetd mode and protocol 2 connections are negotiated. + This speeds up protocol 2 connections to inetd-mode servers that + also allow Protocol 1. + + Accept the PermitRootLogin directive in a sshd_config(5) Match + block. Allows for, e.g. permitting root only from the local network. + + Reworked sftp(1) argument splitting and escaping to be more + internally consistent (i.e. between sftp commands) and more + consistent with sh(1). Please note that this will change the + interpretation of some quoted strings, especially those with + embedded backslash escape sequences. + + Support "Banner=none" in sshd_config(5) to disable sending of a + pre-login banner (e.g. in a Match block). + + ssh(1) ProxyCommands are now executed with $SHELL rather than + /bin/sh. + + ssh(1)'s ConnectTimeout option is now applied to both the TCP + connection and the SSH banner exchange (previously it just covered + the TCP connection). This allows callers of ssh(1) to better detect + and deal with stuck servers that accept a TCP connection but don't + progress the protocol, and also makes ConnectTimeout useful for + connections via a ProxyCommand. + + scp(1) incorrectly reported "stalled" on slow copies (closes: + #140828). + + scp(1) date underflow for timestamps before epoch. + + ssh(1) used the obsolete SIG DNS RRtype for host keys in DNS, + instead of the current standard RRSIG. + + Correctly drain ACKs when a sftp(1) upload write fails midway, + avoids a fatal() exit from what should be a recoverable condition. + + Fixed ssh-keygen(1) selective host key hashing (i.e. "ssh-keygen -HF + hostname") to not include any IP address in the data to be hashed. + + Make ssh(1) skip listening on the IPv6 wildcard address when a + binding address of 0.0.0.0 is used against an old SSH server that + does not support the RFC4254 syntax for wildcard bind addresses. + + Enable IPV6_V6ONLY socket option on sshd(8) listen socket, as is + already done for X11/TCP forwarding sockets (closes: #439661). + + Fix FD leak that could hang a ssh(1) connection multiplexing master. + + Make ssh(1) -q option documentation consistent with reality. + + Fixed sshd(8) PAM support not calling pam_session_close(), or + failing to call it with root privileges (closes: #372680). + + Fix activation of OpenSSL engine support when requested in configure + (LP: #119295). + + Cache SELinux status earlier so we know if it's enabled after a + chroot (LP: #237557). + - 5.1/5.1p1 (http://www.openssh.com/txt/release-5.1): + + Introduce experimental SSH Fingerprint ASCII Visualisation to ssh(1) + and ssh-keygen(1). Visual fingerprint display is controlled by a new + ssh_config(5) option "VisualHostKey". The intent is to render SSH + host keys in a visual form that is amenable to easy recall and + rejection of changed host keys. + + sshd_config(5) now supports CIDR address/masklen matching in "Match + address" blocks, with a fallback to classic wildcard matching. + + sshd(8) now supports CIDR matching in ~/.ssh/authorized_keys + from="..." restrictions, also with a fallback to classic wildcard + matching. + + Added an extended test mode (-T) to sshd(8) to request that it write + its effective configuration to stdout and exit. Extended test mode + also supports the specification of connection parameters (username, + source address and hostname) to test the application of + sshd_config(5) Match rules. + + ssh(1) now prints the number of bytes transferred and the overall + connection throughput for SSH protocol 2 sessions when in verbose + mode (previously these statistics were displayed for protocol 1 + connections only). + + sftp-server(8) now supports extension methods statvfs@openssh.com + and fstatvfs@openssh.com that implement statvfs(2)-like operations. + + sftp(1) now has a "df" command to the sftp client that uses the + statvfs@openssh.com to produce a df(1)-like display of filesystem + space and inode utilisation (requires statvfs@openssh.com support on + the server). + + Added a MaxSessions option to sshd_config(5) to allow control of the + number of multiplexed sessions supported over a single TCP + connection. This allows increasing the number of allowed sessions + above the previous default of 10, disabling connection multiplexing + (MaxSessions=1) or disallowing login/shell/subsystem sessions + entirely (MaxSessions=0). + + Added a no-more-sessions@openssh.com global request extension that + is sent from ssh(1) to sshd(8) when the client knows that it will + never request another session (i.e. when session multiplexing is + disabled). This allows a server to disallow further session requests + and terminate the session in cases where the client has been + hijacked. + + ssh-keygen(1) now supports the use of the -l option in combination + with -F to search for a host in ~/.ssh/known_hosts and display its + fingerprint. + + ssh-keyscan(1) now defaults to "rsa" (protocol 2) keys, instead of + "rsa1" (LP: #129794). + + Added an AllowAgentForwarding option to sshd_config(8) to control + whether authentication agent forwarding is permitted. Note that this + is a loose control, as a client may install their own unofficial + forwarder. + + ssh(1) and sshd(8): avoid unnecessary malloc/copy/free when + receiving network data, resulting in a ~10% speedup. + + ssh(1) and sshd(8) will now try additional addresses when connecting + to a port forward destination whose DNS name resolves to more than + one address. The previous behaviour was to try the only first + address and give up if that failed. + + ssh(1) and sshd(8) now support signalling that channels are + half-closed for writing, through a channel protocol extension + notification "eow@openssh.com". This allows propagation of closed + file descriptors, so that commands such as "ssh -2 localhost od + /bin/ls | true" do not send unnecessary data over the wire. + + sshd(8): increased the default size of ssh protocol 1 ephemeral keys + from 768 to 1024 bits. + + When ssh(1) has been requested to fork after authentication ("ssh + -f") with ExitOnForwardFailure enabled, delay the fork until after + replies for any -R forwards have been seen. Allows for robust + detection of -R forward failure when using -f. + + "Match group" blocks in sshd_config(5) now support negation of + groups. E.g. "Match group staff,!guests". + + sftp(1) and sftp-server(8) now allow chmod-like operations to set + set[ug]id/sticky bits. + + The MaxAuthTries option is now permitted in sshd_config(5) match + blocks. + + Multiplexed ssh(1) sessions now support a subset of the ~ escapes + that are available to a primary connection. + + ssh(1) connection multiplexing will now fall back to creating a new + connection in most error cases (closes: #352830). + + Make ssh(1) deal more gracefully with channel requests that fail. + Previously it would optimistically assume that requests would always + succeed, which could cause hangs if they did not (e.g. when the + server runs out of file descriptors). + + ssh(1) now reports multiplexing errors via the multiplex slave's + stderr where possible (subject to LogLevel in the mux master). + + Fixed an UMAC alignment problem that manifested on Itanium + platforms. + * Remove our local version of moduli(5) now that there's one upstream. + * Say "GTK+" rather than "GTK" in ssh-askpass-gnome's description. + * Add lintian overrides for empty /usr/share/doc/openssh-client + directories in openssh-server and ssh (necessary due to being symlink + targets). + * Merge from Ubuntu: + - Add 'status' action to openssh-server init script, requiring lsb-base + (>= 3.2-13) (thanks, Dustin Kirkland). + * debconf template translations: + - Update Korean (thanks, Sunjae Park; closes: #484821). + + -- Colin Watson Fri, 25 Jul 2008 10:45:08 +0100 + +openssh (1:4.7p1-13) unstable; urgency=low + + * Add some helpful advice to the end of ssh-vulnkey's output if there are + unknown or compromised keys (thanks, Dan Jacobson; closes: #483756). + * Check compromised key blacklist in ssh or ssh-add, as well as in the + server (LP: #232391). To override the blacklist check in ssh + temporarily, use 'ssh -o UseBlacklistedKeys=yes'; there is no override + for the blacklist check in ssh-add. + * Add cross-references to ssh-vulnkey(1) to ssh(1), ssh-add(1), + ssh-keygen(1), and sshd(8) (closes: #484451). + * Change openssh-client-udeb's Installer-Menu-Item from 99900 to 99999 + (thanks, Frans Pop). + * Drop openssh-client-udeb isinstallable hack, as main-menu (>= 1.26) now + takes care of that (thanks, Frans Pop; closes: #484404). + * Update DEB_BUILD_OPTIONS parsing code from policy 3.8.0. + * Add documentation on removing openssh-blacklist locally (see #484269). + * Clarify documentation of SSHD_OOM_ADJUST, and make setting it to the + empty string actually skip adjustment as intended (closes: #487325). + * Remove empty /usr/share/applications directory in ssh-askpass-gnome. + * debconf template translations: + - Update Romanian (thanks, Cătălin Feștilă; closes: #485415). + + -- Colin Watson Mon, 21 Jul 2008 12:18:28 +0100 + +openssh (1:4.7p1-12) unstable; urgency=low + + * Fill in CVE identifier for ssh-vulnkey bug fixed in 1:4.7p1-10. + * Refactor rejection of blacklisted user keys into a single + reject_blacklisted_key function in auth.c (thanks, Dmitry V. Levin). + * Fix memory leak of blacklisted host keys (thanks, Dmitry V. Levin). + * debconf template translations: + - Update Dutch (thanks, Bart Cornelis; closes: #483004). + - Update Brazilian Portuguese (thanks, Eder L. Marques; closes: + #483142). + - Update Slovak (thanks, Ivan Masár; closes: #483517). + + -- Colin Watson Thu, 29 May 2008 21:41:29 +0100 + +openssh (1:4.7p1-11) unstable; urgency=low + + * Make init script depend on $syslog, and fix some other dependency + glitches (thanks, Petter Reinholdtsen; closes: #481018). + * Remove 0 and 6 from Default-Stop in init script (thanks, Kel Modderman; + closes: #481151). + * Restore OOM killer adjustment for child processes (thanks, Vaclav Ovsik; + closes: #480020). + * Allow building with heimdal-dev (LP: #125805). + + * Check RSA1 keys without the need for a separate blacklist. Thanks to + Simon Tatham for the idea. + * Generate two keys with the PID forced to the same value and test that + they differ, to defend against recurrences of the recent Debian OpenSSL + vulnerability. + * Recommend openssh-blacklist from openssh-client (closes: #481187). + * Recommend openssh-blacklist-extra from openssh-client and + openssh-server. + * Make ssh-vulnkey report the file name and line number for each key + (thanks, Heiko Schlittermann and Christopher Perry; closes: #481398). + * Check for blacklists in /usr/share/ssh/ as well as /etc/ssh/ (see + #481283). + * Log IP addresses of hosts attempting to use blacklisted keys (closes: + #481721). + * Incorporate various ssh-vulnkey suggestions from Hugh Daniel: + - Add -v (verbose) option, and don't print output for keys that have a + blacklist file but that are not listed unless in verbose mode. + - Move exit status documentation to a separate section. + - Document key status descriptions. + - Add key type to output. + - Fix error output if ssh-vulnkey fails to read key files, with the + exception of host keys unless -a was given. + - In verbose mode, output the name of each file examined. + * Handle leading IP addresses in ssh-vulnkey input (LP: #230497). + * Fix various ssh-vulnkey problems pointed out by Solar Designer: + - Fix some buffer handling inconsistencies. + - Use xasprintf to build user key file names, avoiding truncation + problems. + - Drop to the user's UID when reading user keys with -a. + - Use EUID rather than UID when run with no file names and without -a. + - Reword "Unknown (no blacklist information)" to "Unknown (blacklist + file not installed)". + + * Fix typo in ssh/vulnerable_host_keys message (thanks, Esko Arajärvi). + * debconf template translations: + - Update Finnish (thanks, Esko Arajärvi; closes: #481530). + - Update French (thanks, Christian Perrier; closes: #481576). + - Update Norwegian Bokmål (thanks, Bjørn Steensrud; closes: #481591). + - Update Galician (thanks, Jacobo Tarrio; closes: #481596). + - Update Japanese (thanks, Kenshi Muto; closes: #481621). + - Update Czech (thanks, Miroslav Kure; closes: #481624). + - Update German (thanks, Helge Kreutzmann; closes: #481676). + - Update Portuguese (thanks, Ricardo Silva; closes: #481781). + - Update Basque (thanks, Piarres Beobide; closes: #481836). + - Update Bulgarian (thanks, Damyan Ivanov; closes: #481870). + - Update Vietnamese (thanks, Clytie Siddall; closes: #481876). + - Update Spanish (thanks, Javier Fernandez-Sanguino Peña; closes: + #482341). + - Update Turkish (thanks, Mert Dirik; closes: #482548). + - Update Russian (thanks, Yuri Kozlov; closes: #482887). + - Update Swedish (thanks, Martin Bagge; closes: #482464). + - Update Italian (thanks, Luca Monducci; closes: #482808). + + -- Colin Watson Mon, 26 May 2008 12:21:39 +0100 + +openssh (1:4.7p1-10) unstable; urgency=low + + * Add a FILES section to ssh-vulnkey(1) (thanks, Hugh Daniel). + * CVE-2008-2285: ssh-vulnkey handles options in authorized_keys + (LP: #230029), and treats # as introducing a comment even if it is + preceded by whitespace. + + -- Colin Watson Wed, 14 May 2008 12:35:05 +0100 + +openssh (1:4.7p1-9) unstable; urgency=critical + + * Fill in CVE identifier for security vulnerability fixed in 1:4.7p1-8. + * Mitigate OpenSSL security vulnerability (CVE-2008-0166): + - Add key blacklisting support. Keys listed in + /etc/ssh/blacklist.TYPE-LENGTH will be rejected for authentication by + sshd, unless "PermitBlacklistedKeys yes" is set in + /etc/ssh/sshd_config. + - Add a new program, ssh-vulnkey, which can be used to check keys + against these blacklists. + - Depend on openssh-blacklist. + - Force dependencies on libssl0.9.8 / libcrypto0.9.8-udeb to at least + 0.9.8g-9. + - Automatically regenerate known-compromised host keys, with a + critical-priority debconf note. (I regret that there was no time to + gather translations.) + + -- Colin Watson Tue, 13 May 2008 12:33:38 +0100 + +openssh (1:4.7p1-8) unstable; urgency=high + + * Fill in CVE identifier for security vulnerability fixed in 1:4.7p1-5. + * Rename KeepAlive to TCPKeepAlive in sshd_config, cleaning up from old + configurations (LP: #211400). + * Tweak scp's reporting of filenames in verbose mode to be a bit less + confusing with spaces (thanks, Nicolas Valcárcel; LP: #89945). + * Backport from 4.9p1: + - CVE-2008-1657: Ignore ~/.ssh/rc if a sshd_config ForceCommand is + specified. + - Add no-user-rc authorized_keys option to disable execution of + ~/.ssh/rc. + * Backport from Simon Wilkinson's GSSAPI key exchange patch for 5.0p1: + - Add code to actually implement GSSAPIStrictAcceptorCheck, which had + somehow been omitted from a previous version of this patch (closes: + #474246). + + -- Colin Watson Sun, 06 Apr 2008 12:34:19 +0100 + +openssh (1:4.7p1-7) unstable; urgency=low + + * Ignore errors writing to oom_adj (closes: #473573). + + -- Colin Watson Mon, 31 Mar 2008 16:24:44 +0100 + +openssh (1:4.7p1-6) unstable; urgency=low + + * Disable the Linux kernel's OOM-killer for the sshd parent; tweak + SSHD_OOM_ADJUST in /etc/default/ssh to change this (closes: #341767). + + -- Colin Watson Sun, 30 Mar 2008 21:14:12 +0100 + +openssh (1:4.7p1-5) unstable; urgency=low + + * Recommends: xauth rather than Suggests: xbase-clients. + * Document in ssh(1) that '-S none' disables connection sharing + (closes: #471437). + * Patch from Red Hat / Fedora: + - CVE-2008-1483: Don't use X11 forwarding port which can't be bound on + all address families, preventing hijacking of X11 forwarding by + unprivileged users when both IPv4 and IPv6 are configured (closes: + #463011). + * Use printf rather than echo -en (a bashism) in openssh-server.config and + openssh-server.preinst. + * debconf template translations: + - Update Finnish (thanks, Esko Arajärvi; closes: #468563). + + -- Colin Watson Sat, 22 Mar 2008 12:37:00 +0000 + +openssh (1:4.7p1-4) unstable; urgency=low + + [ Caleb Case ] + * Fix configure detection of getseuserbyname and + get_default_context_with_level (closes: #465614, LP: #188136). + + [ Colin Watson ] + * Include the autogenerated debian/copyright in the source package. + * Move /etc/pam.d/ssh to /etc/pam.d/sshd, allowing us to stop defining + SSHD_PAM_SERVICE (closes: #255870). + + -- Colin Watson Wed, 13 Feb 2008 18:18:52 +0000 + +openssh (1:4.7p1-3) unstable; urgency=low + + * Improve grammar of ssh-askpass-gnome description. + * Backport from upstream: + - Use the correct packet maximum sizes for remote port and agent + forwarding. Prevents the server from killing the connection if too + much data is queued and an excessively large packet gets sent + (https://bugzilla.mindrot.org/show_bug.cgi?id=1360). + * Allow passing temporary daemon parameters on the init script's command + line, e.g. '/etc/init.d/ssh start "-o PermitRootLogin=yes"' (thanks, + Marc Haber; closes: #458547). + + -- Colin Watson Fri, 01 Feb 2008 21:59:59 +0000 + +openssh (1:4.7p1-2) unstable; urgency=low + + * Adjust many relative links in faq.html to point to + http://www.openssh.com/ (thanks, Dan Jacobson; mentioned in #459807). + * Pass --with-mantype=doc to configure rather than build-depending on + groff (closes: #460121). + * Add armel to architecture list for libselinux1-dev build-dependency + (closes: #460136). + * Drop source-compatibility with Debian 3.0: + - Remove support for building with GNOME 1. This allows simplification + of our GNOME build-dependencies (see #460136). + - Remove hacks to support the old PAM configuration scheme. + - Remove compatibility for building without po-debconf. + * Build-depend on libgtk2.0-dev rather than libgnomeui-dev. As far as I + can see, the GTK2 version of ssh-askpass-gnome has never required + libgnomeui-dev. + + -- Colin Watson Fri, 11 Jan 2008 00:14:10 +0000 + +openssh (1:4.7p1-1) unstable; urgency=low + + * New upstream release (closes: #453367). + - CVE-2007-4752: Prevent ssh(1) from using a trusted X11 cookie if + creation of an untrusted cookie fails; found and fixed by Jan Pechanec + (closes: #444738). + - sshd(8) in new installations defaults to SSH Protocol 2 only. Existing + installations are unchanged. + - The SSH channel window size has been increased, and both ssh(1) + sshd(8) now send window updates more aggressively. These improves + performance on high-BDP (Bandwidth Delay Product) networks. + - ssh(1) and sshd(8) now preserve MAC contexts between packets, which + saves 2 hash calls per packet and results in 12-16% speedup for + arcfour256/hmac-md5. + - A new MAC algorithm has been added, UMAC-64 (RFC4418) as + "umac-64@openssh.com". UMAC-64 has been measured to be approximately + 20% faster than HMAC-MD5. + - Failure to establish a ssh(1) TunnelForward is now treated as a fatal + error when the ExitOnForwardFailure option is set. + - ssh(1) returns a sensible exit status if the control master goes away + without passing the full exit status. + - When using a ProxyCommand in ssh(1), set the outgoing hostname with + gethostname(2), allowing hostbased authentication to work. + - Make scp(1) skip FIFOs rather than hanging (closes: #246774). + - Encode non-printing characters in scp(1) filenames. These could cause + copies to be aborted with a "protocol error". + - Handle SIGINT in sshd(8) privilege separation child process to ensure + that wtmp and lastlog records are correctly updated. + - Report GSSAPI mechanism in errors, for libraries that support multiple + mechanisms. + - Improve documentation for ssh-add(1)'s -d option. + - Rearrange and tidy GSSAPI code, removing server-only code being linked + into the client. + - Delay execution of ssh(1)'s LocalCommand until after all forwardings + have been established. + - In scp(1), do not truncate non-regular files. + - Improve exit message from ControlMaster clients. + - Prevent sftp-server(8) from reading until it runs out of buffer space, + whereupon it would exit with a fatal error (closes: #365541). + - pam_end() was not being called if authentication failed + (closes: #405041). + - Manual page datestamps updated (closes: #433181). + * Install the OpenSSH FAQ in /usr/share/doc/openssh-client. + - Includes documentation on copying files with colons using scp + (closes: #303453). + * Create /var/run/sshd on start even if /etc/ssh/sshd_not_to_be_run exists + (closes: #453285). + * Fix "overriden" typo in ssh(1) (thanks, A. Costa; closes: #390699). + * Refactor debian/rules configure and make invocations to make development + easier. + * Remove the hideously old /etc/ssh/primes on upgrade (closes: #123013). + * Update moduli(5) to revision 1.11 from OpenBSD CVS. + * Document the non-default options we set as standard in ssh_config(5) and + sshd_config(5) (closes: #327886, #345628). + * Recode LICENCE to UTF-8 when concatenating it to debian/copyright. + * Override desktop-file-but-no-dh_desktop-call lintian warning; the + .desktop file is intentionally not installed (see 1:3.8.1p1-10). + * Update copyright dates for Kerberos patch in debian/copyright.head. + * Policy version 3.7.3: no changes required. + + -- Colin Watson Mon, 24 Dec 2007 16:43:02 +0000 + +openssh (1:4.6p1-7) unstable; urgency=low + + * Don't build PIE executables on m68k (closes: #451192). + * Use autotools-dev's recommended configure --build and --host options. + * Adjust README.Debian to suggest mailing debian-ssh@lists.debian.org + rather than Matthew. + * Check whether deluser exists in postrm (closes: #454085). + + -- Colin Watson Mon, 03 Dec 2007 11:11:02 +0000 + +openssh (1:4.6p1-6) unstable; urgency=low + + * Remove blank line between head comment and first template in + debian/openssh-server.templates.master; apparently it confuses some + versions of debconf. + * Install authorized_keys(5) as a symlink to sshd(8) (thanks, Tomas + Pospisek; closes: #441817). + * Discard error output from dpkg-query in preinsts, in case the ssh + metapackage is not installed. + * Fix sshd/inittab advice in README.Debian to account for rc.d movement + (closes: #450632). + * Suppress error from debian/rules if lsb-release is not installed. + * Don't ignore errors from 'make -C contrib clean'. + * Adjust categories in ssh-askpass-gnome.desktop to comply with the + Desktop Menu Specification. + * debconf template translations: + - Add Slovak (thanks, Ivan Masár; closes: #441690). + - Update Brazilian Portuguese (thanks, Eder L. Marques; + closes: #447145). + + -- Colin Watson Mon, 12 Nov 2007 11:47:28 +0000 + +openssh (1:4.6p1-5) unstable; urgency=low + + * Identify ssh as a metapackage rather than a transitional package. It's + still useful as a quick way to install both the client and the server. + * ssh-copy-id now checks the exit status of ssh-add -L (thanks, Adeodato + Simó; closes: #221675). + * ssh-copy-id no longer prints the output of expr (thanks, Peter + Eisentraut; closes: #291534). + * ssh-copy-id defaults to ~/.ssh/id_rsa.pub rather than + ~/.ssh/identity.pub, in line with ssh-keygen (thanks, Greg Norris; + closes: #234627). + * Build-depend on libselinux1-dev on lpia. + * openssh-client Suggests: keychain. + * debconf template translations: + - Update Catalan (thanks, Jordà Polo; closes: #431970). + + -- Colin Watson Mon, 30 Jul 2007 09:34:38 +0100 + +openssh (1:4.6p1-4) unstable; urgency=low + + * Don't build PIE executables on hppa, as they crash. + + -- Colin Watson Thu, 05 Jul 2007 11:06:54 +0100 + +openssh (1:4.6p1-3) unstable; urgency=low + + * Only build PIE executables on Linux and NetBSD (closes: #430455). + * Fix broken switch fallthrough when SELinux is running in permissive mode + (closes: #430838). + * Document that HashKnownHosts may break tab-completion (closes: #430154). + + -- Colin Watson Fri, 29 Jun 2007 07:15:38 +0100 + +openssh (1:4.6p1-2) unstable; urgency=low + + * Fix ordering of SYSLOG_LEVEL_QUIET and SYSLOG_LEVEL_FATAL. + * Clarify that 'ssh -q -q' still prints errors caused by bad arguments + (i.e. before the logging system is initialised). + * Suppress "Connection to closed" and "Connection to master closed" + messages at loglevel SILENT (thanks, Jaap Eldering; closes: #409788). + * Suppress "Pseudo-terminal will not be allocated because stdin is not a + terminal" message at loglevels QUIET and SILENT (closes: #366814). + * Document the SILENT loglevel in sftp-server(8), ssh_config(5), and + sshd_config(5). + * Add try-restart action to init script. + * Add /etc/network/if-up.d/openssh-server to restart sshd when new + interfaces appear (LP: #103436). + * Backport from upstream: + - Move C/R -> kbdint special case to after the defaults have been + loaded, which makes ChallengeResponse default to yes again. This was + broken by the Match changes and not fixed properly subsequently + (closes: #428968). + - Silence spurious error messages from hang-on-exit fix + (http://bugzilla.mindrot.org/show_bug.cgi?id=1306, closes: #429531). + + -- Colin Watson Wed, 20 Jun 2007 11:52:44 +0100 + +openssh (1:4.6p1-1) unstable; urgency=low + + * New upstream release (closes: #395507, #397961, #420035). Important + changes not previously backported to 4.3p2: + - 4.4/4.4p1 (http://www.openssh.com/txt/release-4.4): + + On portable OpenSSH, fix a GSSAPI authentication abort that could be + used to determine the validity of usernames on some platforms. + + Implemented conditional configuration in sshd_config(5) using the + "Match" directive. This allows some configuration options to be + selectively overridden if specific criteria (based on user, group, + hostname and/or address) are met. So far a useful subset of + post-authentication options are supported and more are expected to + be added in future releases. + + Add support for Diffie-Hellman group exchange key agreement with a + final hash of SHA256. + + Added a "ForceCommand" directive to sshd_config(5). Similar to the + command="..." option accepted in ~/.ssh/authorized_keys, this forces + the execution of the specified command regardless of what the user + requested. This is very useful in conjunction with the new "Match" + option. + + Add a "PermitOpen" directive to sshd_config(5). This mirrors the + permitopen="..." authorized_keys option, allowing fine-grained + control over the port-forwardings that a user is allowed to + establish. + + Add optional logging of transactions to sftp-server(8). + + ssh(1) will now record port numbers for hosts stored in + ~/.ssh/known_hosts when a non-standard port has been requested + (closes: #50612). + + Add an "ExitOnForwardFailure" option to cause ssh(1) to exit (with a + non-zero exit code) when requested port forwardings could not be + established. + + Extend sshd_config(5) "SubSystem" declarations to allow the + specification of command-line arguments. + + Replacement of all integer overflow susceptible invocations of + malloc(3) and realloc(3) with overflow-checking equivalents. + + Many manpage fixes and improvements. + + Add optional support for OpenSSL hardware accelerators (engines), + enabled using the --with-ssl-engine configure option. + + Tokens in configuration files may be double-quoted in order to + contain spaces (closes: #319639). + + Move a debug() call out of a SIGCHLD handler, fixing a hang when the + session exits very quickly (closes: #307890). + + Fix some incorrect buffer allocation calculations (closes: #410599). + + ssh-add doesn't ask for a passphrase if key file permissions are too + liberal (closes: #103677). + + Likewise, ssh doesn't ask either (closes: #99675). + - 4.6/4.6p1 (http://www.openssh.com/txt/release-4.6): + + sshd now allows the enabling and disabling of authentication methods + on a per user, group, host and network basis via the Match directive + in sshd_config. + + Fixed an inconsistent check for a terminal when displaying scp + progress meter (closes: #257524). + + Fix "hang on exit" when background processes are running at the time + of exit on a ttyful/login session (closes: #88337). + * Update to current GSSAPI patch from + http://www.sxw.org.uk/computing/patches/openssh-4.6p1-gsskex-20070312.patch; + install ChangeLog.gssapi. + * Build the .deb --with-ssl-engine (closes: #408027, LP: #119295). + * Use LSB functions in init scripts, and add an LSB-style header (partly + from Ubuntu and partly thanks to Christian Perrier; closes: #389038). + * Move init script start links to S16, move rc1 stop link to K84, and + remove rc0 and rc6 stop links altogether (the last part from Ubuntu; + closes: #122188). + * Emit a slightly more informative message from the init script if + /dev/null has somehow become not a character device (closes: #369964). + * Belatedly build-depend on zlib1g-dev (>= 1:1.2.3-1) (closes: #333447). + * Merge from Ubuntu: + - Build position-independent executables (only for debs, not for udebs) + to take advantage of address space layout randomisation. + - If building on Ubuntu, add /sbin, /usr/sbin, and /usr/local/sbin to + the default path. + * Use ${binary:Version} rather than ${Source-Version} in openssh-server -> + openssh-client dependency. + + -- Colin Watson Wed, 13 Jun 2007 00:28:26 +0100 + +openssh (1:4.3p2-11) unstable; urgency=low + + * It's been four and a half years now since I took over as "temporary" + maintainer, so the Maintainer field is getting a bit inaccurate. Set + Maintainer to debian-ssh@lists.debian.org and leave Matthew and myself + as Uploaders. + * Use dpkg-query to fetch conffile md5sums rather than parsing + /var/lib/dpkg/status directly. + * openssh-client Suggests: libpam-ssh (closes: #427840). + * Use 'start-stop-daemon --oknodo' so that openssh-server's init script + exits successfully if sshd is already running (closes: #426858). + + * Apply results of debconf templates and package descriptions review by + debian-l10n-english (closes: #420107, #420742). + * debconf template translations: + - Update Dutch (thanks, Machteld de Kok; closes: #419260). + - Update Norwegian Bokmål (thanks, Bjørn Steensrud; closes: #420630). + - Update Galician (thanks, Jacobo Tarrio; closes: #420635). + - Update Spanish (thanks, Javier Fernández-Sanguino Peña; + closes: #420651). + - Update Swedish (thanks, Daniel Nylander; closes: #420663). + - Add Bulgarian (thanks, Damyan Ivanov; closes: #420703). + - Add Tamil (thanks, Tirumurti Vasudevan; closes: #420739). + - Update German (thanks, Helge Kreutzmann; closes: #420743). + - Update Japanese (thanks, Kenshi Muto; closes: #420946). + - Add Basque (thanks, Piarres Beobide; closes: #421238). + - Update Italian (thanks, Luca Monducci; closes: #421348). + - Update Czech (thanks, Miroslav Kure; closes: #421484). + - Update Romanian (thanks, Igor Stirbu; closes: #421760). + - Update Russian (thanks, Yuriy Talakan' and Sergey Alyoshin; + closes: #420862). + - Update Dutch (thanks, Bart Cornelis; closes: #422767). + - Update Portuguese (thanks, Ricardo Silva; closes: #423112). + - Update French (thanks, Christian Perrier). + - Add Korean (thanks, Sunjae Park; closes: #424008). + - Update Vietnamese (thanks, Clytie Siddall; closes: #426991). + + -- Colin Watson Sun, 10 Jun 2007 08:59:42 +0100 + +openssh (1:4.3p2-10) unstable; urgency=low + + * Multiply openssh-client-udeb's Installer-Menu-Item by 100. + * Increase MAX_SESSIONS to 64. + + -- Colin Watson Tue, 10 Apr 2007 19:17:20 +0100 + +openssh (1:4.3p2-9) unstable; urgency=high + + [ Russ Allbery ] + * Fix GSSAPIKeyExchange configuration file handling logic in ssh-krb5 + (closes: #404863). + * Fix uncommenting of GSSAPI options by ssh-krb5 (closes: #407766). + + [ Colin Watson ] + * debconf template translations: + - Add Norwegian Bokmål (thanks, Bjørn Steensrud; closes: #412330). + + -- Colin Watson Mon, 5 Mar 2007 16:13:50 +0000 + +openssh (1:4.3p2-8) unstable; urgency=medium + + [ Vincent Untz ] + * Give the ssh-askpass-gnome window a default icon; remove unnecessary + icon extension from .desktop file (closes: + https://launchpad.net/bugs/27152). + + [ Colin Watson ] + * Drop versioning on ssh/ssh-krb5 Replaces, as otherwise it isn't + sufficient to replace conffiles (closes: #402804). + * Make GSSAPICleanupCreds a compatibility alias for + GSSAPICleanupCredentials. Mark GSSUseSessionCCache and + GSSAPIUseSessionCredCache as known-but-unsupported options, and migrate + away from them on upgrade. + * It turns out that the people who told me that removing a conffile in the + preinst was sufficient to have dpkg replace it without prompting when + moving a conffile between packages were very much mistaken. As far as I + can tell, the only way to do this reliably is to write out the desired + new text of the conffile in the preinst. This is gross, and requires + shipping the text of all conffiles in the preinst too, but there's + nothing for it. Fortunately this nonsense is only required for smooth + upgrades from sarge. + * debconf template translations: + - Add Romanian (thanks, Stan Ioan-Eugen; closes: #403528). + + -- Colin Watson Sat, 23 Dec 2006 18:38:33 +0000 + +openssh (1:4.3p2-7) unstable; urgency=medium + + [ Colin Watson ] + * Ignore errors from usermod when changing sshd's shell, since it will + fail if the sshd user is not local (closes: #398436). + * Remove version control tags from /etc/ssh/moduli and /etc/ssh/ssh_config + to avoid unnecessary conffile resolution steps for administrators + (thanks, Jari Aalto; closes: #335259). + * Fix quoting error in configure.ac and regenerate configure (thanks, Ben + Pfaff; closes: #391248). + * When installing openssh-client or openssh-server from scratch, remove + any unchanged conffiles from the pre-split ssh package to work around a + bug in sarge's dpkg (thanks, Justin Pryzby and others; closes: #335276). + + [ Russ Allbery ] + * Create transitional ssh-krb5 package which enables GSSAPI configuration + in sshd_config (closes: #390986). + * Default client to attempting GSSAPI authentication. + * Remove obsolete GSSAPINoMICAuthentication from sshd_config if it's + found. + * Add ssh -K option, the converse of -k, to enable GSSAPI credential + delegation (closes: #401483). + + -- Colin Watson Wed, 6 Dec 2006 23:00:49 +0000 + +openssh (1:4.3p2-6) unstable; urgency=low + + * Acknowledge NMU (thanks, Manoj; closes: #394795). + * Backport from 4.5p1: + - Fix a bug in the sshd privilege separation monitor that weakened its + verification of successful authentication. This bug is not known to be + exploitable in the absence of additional vulnerabilities. + * openssh-server Suggests: molly-guard (closes: #395473). + * debconf template translations: + - Update German (thanks, Helge Kreutzmann; closes: #395947). + + -- Colin Watson Wed, 15 Nov 2006 00:07:32 +0000 + +openssh (1:4.3p2-5.1) unstable; urgency=low + + * NMU to update SELinux patch, bringing it in line with current selinux + releases. The patch for this NMU is simply the Bug#394795 patch, + and no other changes. (closes: #394795) + + -- Manoj Srivastava Mon, 23 Oct 2006 14:11:24 -0500 + +openssh (1:4.3p2-5) unstable; urgency=low + + * Remove ssh/insecure_telnetd check altogether (closes: #391081). + * debconf template translations: + - Update Danish (thanks, Claus Hindsgaul; closes: #390612). + + -- Colin Watson Thu, 5 Oct 2006 09:04:19 +0100 + +openssh (1:4.3p2-4) unstable; urgency=high + + * Backport from 4.4p1 (since I don't have an updated version of the GSSAPI + patch yet): + - CVE-2006-4924: Fix a pre-authentication denial of service found by + Tavis Ormandy, that would cause sshd(8) to spin until the login grace + time expired (closes: #389995). + - CVE-2006-5051: Fix an unsafe signal hander reported by Mark Dowd. The + signal handler was vulnerable to a race condition that could be + exploited to perform a pre-authentication denial of service. On + portable OpenSSH, this vulnerability could theoretically lead to + pre-authentication remote code execution if GSSAPI authentication is + enabled, but the likelihood of successful exploitation appears remote. + + * Read /etc/default/locale as well as /etc/environment (thanks, Raphaël + Hertzog; closes: #369395). + * Remove no-longer-used ssh/insecure_rshd debconf template. + * Make ssh/insecure_telnetd Type: error (closes: #388946). + + * debconf template translations: + - Update Portuguese (thanks, Rui Branco; closes: #381942). + - Update Spanish (thanks, Javier Fernández-Sanguino Peña; + closes: #382966). + + -- Colin Watson Fri, 29 Sep 2006 16:28:24 +0100 + +openssh (1:4.3p2-3) unstable; urgency=low + + * Document KeepAlive->TCPKeepAlive renaming in sshd_config(5) (closes: + https://launchpad.net/bugs/50702). + * Change sshd user's shell to /usr/sbin/nologin (closes: #366541). + Introduces dependency on passwd for usermod. + * debconf template translations: + - Update French (thanks, Denis Barbier; closes: #368503). + - Update Dutch (thanks, Bart Cornelis; closes: #375100). + - Update Japanese (thanks, Kenshi Muto; closes: #379950). + + -- Colin Watson Thu, 27 Jul 2006 00:12:36 +0100 + +openssh (1:4.3p2-2) unstable; urgency=low + + * Include commented-out pam_access example in /etc/pam.d/ssh. + * On '/etc/init.d/ssh restart', create /var/run/sshd before checking the + server configuration, as otherwise 'sshd -t' will complain about the + lack of /var/run/sshd (closes: https://launchpad.net/bugs/45234). + * debconf template translations: + - Update Russian (thanks, Yuriy Talakan'; closes: #367143). + - Update Czech (thanks, Miroslav Kure; closes: #367161). + - Update Italian (thanks, Luca Monducci; closes: #367186). + - Update Galician (thanks, Jacobo Tarrio; closes: #367318). + - Update Swedish (thanks, Daniel Nylander; closes: #367971). + + -- Colin Watson Fri, 19 May 2006 09:14:27 +0100 + +openssh (1:4.3p2-1) unstable; urgency=low + + * New upstream release (closes: #361032). + - CVE-2006-0225: scp (as does rcp, on which it is based) invoked a + subshell to perform local to local, and remote to remote copy + operations. This subshell exposed filenames to shell expansion twice; + allowing a local attacker to create filenames containing shell + metacharacters that, if matched by a wildcard, could lead to execution + of attacker-specified commands with the privilege of the user running + scp (closes: #349645). + - Add support for tunneling arbitrary network packets over a connection + between an OpenSSH client and server via tun(4) virtual network + interfaces. This allows the use of OpenSSH (4.3+) to create a true VPN + between the client and server providing real network connectivity at + layer 2 or 3. This feature is experimental. + - Reduce default key length for new DSA keys generated by ssh-keygen + back to 1024 bits. DSA is not specified for longer lengths and does + not fully benefit from simply making keys longer. As per FIPS 186-2 + Change Notice 1, ssh-keygen will refuse to generate a new DSA key + smaller or larger than 1024 bits. + - Fixed X forwarding failing to start when the X11 client is executed in + background at the time of session exit. + - Change ssh-keygen to generate a protocol 2 RSA key when invoked + without arguments (closes: #114894). + - Fix timing variance for valid vs. invalid accounts when attempting + Kerberos authentication. + - Ensure that ssh always returns code 255 on internal error + (closes: #259865). + - Cleanup wtmp files on SIGTERM when not using privsep. + - Set SO_REUSEADDR on X11 listeners to avoid problems caused by + lingering sockets from previous session (X11 applications can + sometimes not connect to 127.0.0.1:60xx) (closes: + https://launchpad.net/bugs/25528). + - Ensure that fds 0, 1 and 2 are always attached in all programs, by + duping /dev/null to them if necessary. + - Xauth list invocation had bogus "." argument. + - Remove internal assumptions on key exchange hash algorithm and output + length, preparing OpenSSH for KEX methods with alternate hashes. + - Ignore junk sent by a server before it sends the "SSH-" banner. + - Many manual page improvements. + - Lots of cleanups, including fixes to memory leaks on error paths and + possible crashes. + * Update to current GSSAPI patch from + http://www.sxw.org.uk/computing/patches/openssh-4.3p2-gsskex-20060223.patch + (closes: #352042). + * debian/rules: Resynchronise CFLAGS with that generated by configure. + * Restore pam_nologin to /etc/pam.d/ssh; sshd no longer checks this itself + when PAM is enabled, but relies on PAM to do it. + * Rename KeepAlive to TCPKeepAlive in default sshd_config + (closes: #349896). + * Rephrase ssh/new_config and ssh/encrypted_host_key_but_no_keygen debconf + templates to make boolean short descriptions end with a question mark + and to avoid use of the first person. + * Ship README.tun. + * Policy version 3.7.2: no changes required. + * debconf template translations: + - Update Italian (thanks, Luca Monducci; closes: #360348). + - Add Galician (thanks, Jacobo Tarrio; closes: #361220). + + -- Colin Watson Fri, 12 May 2006 12:48:24 +0100 + +openssh (1:4.2p1-8) unstable; urgency=low + + [ Frans Pop ] + * Use udeb support introduced in debhelper 4.2.0 (available in sarge) + rather than constructing udebs by steam. + * Require debhelper 5.0.22, which generates correct shared library + dependencies for udebs (closes: #360068). This build-dependency can be + ignored if building on sarge. + + [ Colin Watson ] + * Switch to debhelper compatibility level 4, since we now require + debhelper 4 even on sarge anyway for udeb support. + + -- Colin Watson Fri, 31 Mar 2006 09:44:55 +0100 + +openssh (1:4.2p1-7) unstable; urgency=low + + * I accidentally applied the default $PATH change in 1:4.2p1-6 to the udeb + rather than the deb. Fixed. + + -- Colin Watson Wed, 1 Mar 2006 16:19:00 +0000 + +openssh (1:4.2p1-6) unstable; urgency=low + + * Sync default values of $PATH from shadow 1:4.0.12-6, adding /usr/bin/X11 + to the normal and superuser paths and /usr/games to the normal path. + * When the client receives a signal, don't fatal() with "Killed by signal + %d." (which produces unhelpful noise on stderr and causes confusion for + users of some applications that wrap ssh); instead, generate a debug + message and exit with the traditional status (closes: #313371). + * debconf template translations: + - Add Swedish (thanks, Daniel Nylander; closes: #333133). + - Update Spanish (thanks, Javier Fernández-Sanguino Peña; + closes: #341371). + - Correct erroneously-changed Last-Translator headers in Greek and + Spanish translations. + + -- Colin Watson Mon, 20 Feb 2006 16:50:55 +0000 + +openssh (1:4.2p1-5) unstable; urgency=low + + * Add a CVE name to the 1:4.0p1-1 changelog entry. + * Build-depend on libselinux1-dev on armeb. + * Only send GSSAPI proposal if GSSAPIAuthentication is enabled. + * Build-depend on libssl-dev (>= 0.9.8-1) to cope with surprise OpenSSL + transition, since otherwise who knows what the buildds will do. If + you're building openssh yourself, you can safely ignore this and use an + older libssl-dev. + + -- Colin Watson Fri, 7 Oct 2005 12:23:42 +0100 + +openssh (1:4.2p1-4) unstable; urgency=low + + * Initialise token to GSS_C_EMPTY_BUFFER in ssh_gssapi_check_mechanism + (closes: #328606). + + -- Colin Watson Fri, 16 Sep 2005 12:50:16 +0100 + +openssh (1:4.2p1-3) unstable; urgency=low + + * Add prototype for ssh_gssapi_server_mechanisms (closes: #328372). + * Interoperate with ssh-krb5 << 3.8.1p1-1 servers, which used a slightly + different version of the gssapi authentication method (thanks, Aaron M. + Ucko; closes: #328388). + * Explicitly tell po2debconf to use the 'popular' output encoding, so that + the woody-compatibility hack works even with po-debconf 0.9.0. + + -- Colin Watson Thu, 15 Sep 2005 09:28:21 +0100 + +openssh (1:4.2p1-2) unstable; urgency=low + + * Annotate 1:4.2p1-1 changelog with CVE references. + * Add remaining pieces of Kerberos support (closes: #152657, #275472): + - Add GSSAPI key exchange support from + http://www.sxw.org.uk/computing/patches/openssh.html (thanks, Stephen + Frost). + - Build-depend on libkrb5-dev and configure --with-kerberos5=/usr. + - openssh-client and openssh-server replace ssh-krb5. + - Update commented-out Kerberos/GSSAPI options in default sshd_config. + - Fix HAVE_GSSAPI_KRB5_H/HAVE_GSSAPI_GSSAPI_KRB5_H typos in + gss-serv-krb5.c. + + -- Colin Watson Wed, 14 Sep 2005 18:28:49 +0100 + +openssh (1:4.2p1-1) unstable; urgency=low + + * New upstream release. + - SECURITY (CAN-2005-2797): Fix a bug introduced in OpenSSH 4.0 that + caused GatewayPorts to be incorrectly activated for dynamic ("-D") + port forwardings when no listen address was explicitly specified + (closes: #326065). + - SECURITY (CAN-2005-2798): Fix improper delegation of GSSAPI + credentials. This code is only built in openssh-krb5, not openssh, but + I mention the CVE reference here anyway for completeness. + - Add a new compression method ("Compression delayed") that delays zlib + compression until after authentication, eliminating the risk of zlib + vulnerabilities being exploited by unauthenticated users. Note that + users of OpenSSH versions earlier than 3.5 will need to disable + compression on the client or set "Compression yes" (losing this + security benefit) on the server. + - Increase the default size of new RSA/DSA keys generated by ssh-keygen + from 1024 to 2048 bits (closes: #181162). + - Many bugfixes and improvements to connection multiplexing. + - Don't pretend to accept $HOME (closes: #208648). + * debian/rules: Resynchronise CFLAGS with that generated by configure. + * openssh-client and openssh-server conflict with pre-split ssh to avoid + problems when ssh is left un-upgraded (closes: #324695). + * Set X11Forwarding to yes in the default sshd_config (new installs only). + At least when X11UseLocalhost is turned on, which is the default, the + security risks of using X11 forwarding are risks to the client, not to + the server (closes: #320104). + + -- Colin Watson Wed, 14 Sep 2005 15:16:14 +0100 + +openssh (1:4.1p1-7) unstable; urgency=low + + * Do the IDEA host key check on a temporary file to avoid altering + /etc/ssh/ssh_host_key itself (closes: #312312). + * Work around the ssh-askpass alternative somehow ending up in manual mode + pointing to the obsolete /usr/lib/ssh/gnome-ssh-askpass. + * Add GNU/kFreeBSD support (thanks, Aurelien Jarno; closes: #318113). + * Fix XSIish uses of 'test' in openssh-server.preinst. + * Policy version 3.6.2: no changes required. + + -- Colin Watson Fri, 2 Sep 2005 16:18:11 +0100 + +openssh (1:4.1p1-6) unstable; urgency=low + + * Fix one-character typo that meant the binaries in openssh-client and + openssh-server got recompiled with the wrong options during + 'debian/rules install' (closes: #317088, #317238, #317241). + + -- Colin Watson Thu, 7 Jul 2005 10:56:16 +0100 + +openssh (1:4.1p1-5) unstable; urgency=low + + * Build-depend on libselinux1-dev on ppc64 too (closes: #314625). + * Drop priority of ssh to extra to match the override file. + * Make /usr/share/doc/openssh-server and /usr/share/doc/ssh symlinks to + /usr/share/doc/openssh-client (closes: #314745). + * Ship README.dns (closes: #284874). + * Disable btmp logging, since Debian's /var/log/btmp has inappropriate + permissions (closes: #314956). + * Allow ~/.ssh/config to be group-writable, provided that the group in + question contains only the file's owner (closes: #314347). + * debconf template translations: + - Update Brazilian Portuguese (thanks, André Luís Lopes; + closes: #315477). + - Add Vietnamese (thanks, Clytie Siddall; closes: #316636). + + -- Colin Watson Sun, 3 Jul 2005 17:08:08 +0100 + +openssh (1:4.1p1-4) unstable; urgency=low + + * openssh-client and openssh-server conflict with ssh-krb5, as ssh-krb5 + only conflicts with ssh (closes: #312475). + * SELinux support (thanks, Manoj Srivastava; closes: #308555): + - Added SELinux capability, and turned it on be default. Added + restorecon calls in preinst and postinst (should not matter if the + machine is not SELinux aware). By and large, the changes made should + have no effect unless the rules file calls --with-selinux; and even + then there should be no performance hit for machines not actively + running SELinux. + - Modified the preinst and postinst to call restorecon to set the + security context for the generated public key files. + - Added a comment to /etc/pam.d/ssh to indicate that an SELinux system + may want to also include pam_selinux.so. + * Re-enable ssh-askpass-gnome on the Hurd, now that its build-dependencies + are available. + * Restore /usr/lib/sftp-server temporarily, as a symlink to + /usr/lib/openssh/sftp-server (closes: #312891). + * Switch to debhelper compatibility level 3, since 2 is deprecated. + * debconf template translations: + - Update German (thanks, Jens Seidel; closes: #313949). + + -- Colin Watson Fri, 17 Jun 2005 14:20:20 +0100 + +openssh (1:4.1p1-3) unstable; urgency=low + + * Upload to unstable. + + -- Colin Watson Mon, 6 Jun 2005 22:28:33 +0100 + +openssh (1:4.1p1-2) experimental; urgency=low + + * Drop debconf support for allowing SSH protocol 1, which is discouraged + and has not been the default since openssh 1:3.0.1p1-1. Users who need + this should edit sshd_config instead (closes: #147212). + * Since ssh-keysign isn't used by default (you need to set + EnableSSHKeysign to "yes" in /etc/ssh/ssh_config), having a debconf + question to ask whether it should be setuid is overkill, and the + question text had got out of date anyway. Remove this question, ship + ssh-keysign setuid in openssh-client.deb, and set a statoverride if the + debconf question was previously set to false. + * Add lintian overrides for the above (setuid-binary, + no-debconf-templates). + * Fix picky lintian errors about slogin symlinks. + * Fix DEB_HOST_ARCH_OS/DEB_HOST_GNU_SYSTEM compatibility handling. + * Apply Linux 2.2 workaround (see #239999) only on Linux. + + -- Colin Watson Thu, 2 Jun 2005 00:55:58 +0100 + +openssh (1:4.1p1-1) experimental; urgency=low + + * New upstream release. + - Normalise socket addresses returned by get_remote_hostname(), fixing + 4-in-6 mapping issues with AllowUsers et al (closes: #192234). + * Take upstream's hint and disable the unsupported USE_POSIX_THREADS + (closes: #295757, #308868, and possibly others; may open other bugs). + Use PAM password authentication to avoid #278394. In future I may + provide two sets of binaries built with and without this option, since + it seems I can't win. + * Disable ChallengeResponseAuthentication in new installations, returning + to PasswordAuthentication by default, since it now supports PAM and + apparently works better with a non-threaded sshd (closes: #247521). + * openssh-server Suggests: rssh (closes: #233012). + * Change libexecdir to /usr/lib/openssh, and fix up various alternatives + and configuration files to match (closes: #87900, #151321). + * Fix up very old sshd_config files that refer to /usr/libexec/sftp-server + (closes: #141979). + + -- Colin Watson Tue, 31 May 2005 01:33:33 +0100 + +openssh (1:4.0p1-1) experimental; urgency=low + + * New upstream release. + - Port-forwarding specifications now take optional bind addresses, and + the server allows client-specified bind addresses for remote port + forwardings when configured with "GatewayPorts clientspecified" + (closes: #87253, #192206). + - ssh and ssh-keyscan now support hashing of known_hosts files for + improved privacy (CAN-2005-2666). ssh-keygen has new options for + managing known_hosts files, which understand hashing. + - sftp supports command history and editing support using libedit + (closes: #287013). + - Have scp and sftp wait for the spawned ssh to exit before they exit + themselves, allowing ssh to restore terminal modes (closes: #257130). + - Improved the handling of bad data in authorized_keys files, + eliminating fatal errors on corrupt or very large keys; e.g. linefeeds + in keys only produce errors in auth.log now (closes: #220726). + - Add "command mode" to ssh connection multiplexing (closes: #303452). + - Mention $HOME/.hushlogin in sshd(8) FILES section (closes: #163933). + * Make gnome-ssh-askpass stay above other windows (thanks, Liyang HU; + closes: #296487). + * Remove obsolete and unnecessary ssh/forward_warning debconf note. + * Hurd build fixes (although sshd still doesn't work): + - Restore X forwarding fix from #102991, lost somewhere along the way. + - Link with -lcrypt. + - Link with -lpthread rather than -pthread. + - Don't build ssh-askpass-gnome on the Hurd, until GNOME is available to + satisfy build-dependencies. + * Drop workaround for #242462 on amd64; it's been fixed properly upstream. + * Enable HashKnownHosts by default. This only affects new entries; use + 'ssh-keygen -H' to convert an entire known_hosts file to hashed format. + * Note in ssh_config(5) that the SetupTimeOut option is Debian-specific + (closes: #307069). + * debconf template translations: + - Update Czech (thanks, Miroslav Kure; closes: #298744). + - Update Finnish (thanks, Matti Pöllä; closes: #303787). + - Synchronise Spanish with sarge branch (thanks, Javier + Fernández-Sanguino Peña; closes: #298536). + - Add Ukrainian (thanks, Eugeniy Meshcheryakov; closes: #301852). + + -- Colin Watson Thu, 26 May 2005 11:23:18 +0100 + +openssh (1:3.9p1-3) experimental; urgency=low + + * Explain how to run sshd from inittab in README.Debian (closes: #147360). + * Add debian/watch file. + + -- Colin Watson Fri, 18 Feb 2005 00:20:16 +0000 + +openssh (1:3.9p1-2) experimental; urgency=low + + * Remove pam_nologin from /etc/pam.d/ssh, as sshd's built-in support + appears to be sufficient and more useful (closes: #162996). + * Depend on debconf | debconf-2.0. + * Drop LoginGraceTime back to the upstream default of two minutes on new + installs (closes: #289573). + * debconf template translations from Ubuntu bug #1232: + - Update Greek (thanks, Logiotatidis George). + - Update Spanish (thanks, Santiago Erquicia). + + -- Colin Watson Sat, 15 Jan 2005 12:37:54 +0000 + +openssh (1:3.9p1-1) experimental; urgency=low + + * New upstream release. + - PAM password authentication implemented again (closes: #238699, + #242119). + - Implemented the ability to pass selected environment variables between + the client and the server. + - Fix ssh-keyscan breakage when remote server doesn't speak SSH protocol + (closes: #228828). + - Fix res_query detection (closes: #242462). + - 'ssh -c' documentation improved (closes: #265627). + * Pass LANG and LC_* environment variables from the client by default, and + accept them to the server by default in new installs, although not on + upgrade (closes: #264024). + * Build ssh in binary-indep, not binary-arch (thanks, LaMont Jones). + * Expand on openssh-client package description (closes: #273831). + + -- Colin Watson Tue, 4 Jan 2005 14:18:31 +0000 + +openssh (1:3.8.1p1-14) experimental; urgency=low + + * We use DH_COMPAT=2, so build-depend on debhelper (>= 2). + * Fix timing information leak allowing discovery of invalid usernames in + PAM keyboard-interactive authentication (backported from a patch by + Darren Tucker; closes: #281595). + * Make sure that there's a delay in PAM keyboard-interactive + authentication when PermitRootLogin is not set to yes and the correct + root password is entered (closes: #248747). + + -- Colin Watson Sun, 28 Nov 2004 18:09:37 +0000 + +openssh (1:3.8.1p1-13) experimental; urgency=low + + * Enable threading for PAM, on Sam Hartman's advice (closes: #278394). + * debconf template translations: + - Update Dutch (thanks, cobaco; closes: #278715). + * Correct README.Debian's ForwardX11Trusted description (closes: #280190). + + -- Colin Watson Fri, 12 Nov 2004 12:03:13 +0000 + +openssh (1:3.8.1p1-12) experimental; urgency=low + + * Preserve /etc/ssh/sshd_config ownership/permissions (closes: #276754). + * Shorten the version string from the form "OpenSSH_3.8.1p1 Debian + 1:3.8.1p1-8.sarge.1" to "OpenSSH_3.8.1p1 Debian-8.sarge.1", as some SSH + implementations apparently have problems with the long version string. + This is of course a bug in those implementations, but since the extent + of the problem is unknown it's best to play safe (closes: #275731). + * debconf template translations: + - Add Finnish (thanks, Matti Pöllä; closes: #265339). + - Update Danish (thanks, Morten Brix Pedersen; closes: #275895). + - Update French (thanks, Denis Barbier; closes: #276703). + - Update Japanese (thanks, Kenshi Muto; closes: #277438). + + -- Colin Watson Sun, 24 Oct 2004 19:21:17 +0100 + +openssh (1:3.8.1p1-11) experimental; urgency=high + + * Move sshd_config(5) to openssh-server, where it belongs. + * If PasswordAuthentication is disabled, then offer to disable + ChallengeResponseAuthentication too. The current PAM code will attempt + password-style authentication if ChallengeResponseAuthentication is + enabled (closes: #250369). + * This will ask a question of anyone who installed fresh with 1:3.8p1-2 or + later and then upgraded. Sorry about that ... for this reason, the + default answer is to leave ChallengeResponseAuthentication enabled. + + -- Colin Watson Wed, 6 Oct 2004 14:28:20 +0100 + +openssh (1:3.8.1p1-10) experimental; urgency=low + + * Don't install the ssh-askpass-gnome .desktop file by default; I've had + too many GNOME people tell me it's the wrong thing to be doing. I've + left it in /usr/share/doc/ssh-askpass-gnome/examples/ for now. + + -- Colin Watson Wed, 25 Aug 2004 18:18:14 +0100 + +openssh (1:3.8.1p1-9) experimental; urgency=low + + * Split the ssh binary package into openssh-client and openssh-server + (closes: #39741). openssh-server depends on openssh-client for some + common functionality; it didn't seem worth creating yet another package + for this. openssh-client is priority standard, openssh-server optional. + * New transitional ssh package, priority optional, depending on + openssh-client and openssh-server. May be removed once nothing depends + on it. + * When upgrading from ssh to openssh-{client,server}, it's very difficult + for the maintainer scripts to find out what version we're upgrading from + without dodgy dpkg hackery. I've therefore taken the opportunity to move + a couple of debconf notes into NEWS files, namely ssh/ssh2_keys_merged + and ssh/user_environment_tell. + * Add a heuristic to try to make sure the sshd_config upgrade to >= 3.7 + happens even though we don't know what version we're upgrading from. + * Remove /etc/ssh/sshd_not_to_be_run on purge of openssh-server. For now + (until sarge+2) it's still honoured to avoid breaking existing + configurations, but the right approach is now to remove the + openssh-server package if you don't want to run the server. Add a NEWS + item to that effect. + + -- Colin Watson Mon, 2 Aug 2004 20:48:54 +0100 + +openssh (1:3.8.1p1-8.sarge.4) unstable; urgency=high + + * Fix timing information leak allowing discovery of invalid usernames in + PAM keyboard-interactive authentication (backported from a patch by + Darren Tucker; closes: #281595). + * Make sure that there's a delay in PAM keyboard-interactive + authentication when PermitRootLogin is not set to yes and the correct + root password is entered (closes: #248747). + + -- Colin Watson Sun, 28 Nov 2004 12:37:16 +0000 + +openssh (1:3.8.1p1-8.sarge.3) unstable; urgency=low + + * Enable threading for PAM, on Sam Hartman's advice (closes: #278394). + * debconf template translations: + - Update Dutch (thanks, cobaco; closes: #278715). + * Correct README.Debian's ForwardX11Trusted description (closes: #280190). + + -- Colin Watson Fri, 12 Nov 2004 10:31:12 +0000 + +openssh (1:3.8.1p1-8.sarge.2) unstable; urgency=low + + * Preserve /etc/ssh/sshd_config ownership/permissions (closes: #276754). + * Shorten the version string from the form "OpenSSH_3.8.1p1 Debian + 1:3.8.1p1-8.sarge.1" to "OpenSSH_3.8.1p1 Debian-8.sarge.1", as some SSH + implementations apparently have problems with the long version string. + This is of course a bug in those implementations, but since the extent + of the problem is unknown it's best to play safe (closes: #275731). + * debconf template translations: + - Add Finnish (thanks, Matti Pöllä; closes: #265339). + - Update Danish (thanks, Morten Brix Pedersen; closes: #275895). + - Update French (thanks, Denis Barbier; closes: #276703). + - Update Japanese (thanks, Kenshi Muto; closes: #277438). + + -- Colin Watson Sun, 24 Oct 2004 17:57:14 +0100 + +openssh (1:3.8.1p1-8.sarge.1) unstable; urgency=high + + * If PasswordAuthentication is disabled, then offer to disable + ChallengeResponseAuthentication too. The current PAM code will attempt + password-style authentication if ChallengeResponseAuthentication is + enabled (closes: #250369). + * This will ask a question of anyone who installed fresh with 1:3.8p1-2 or + later and then upgraded. Sorry about that ... for this reason, the + default answer is to leave ChallengeResponseAuthentication enabled. + + -- Colin Watson Wed, 6 Oct 2004 14:21:55 +0100 + +openssh (1:3.8.1p1-8) unstable; urgency=high + + * Matthew Vernon: + - Add a GPL exception to the licensing terms of the Debian patch + (closes: #211644). + + -- Colin Watson Thu, 29 Jul 2004 13:28:47 +0100 + +openssh (1:3.8.1p1-7) unstable; urgency=low + + * Re-enable shadow password support in openssh-server-udeb, at Bastian + Blank's request (closes: #260800). + + -- Colin Watson Thu, 22 Jul 2004 10:56:06 +0100 + +openssh (1:3.8.1p1-6) unstable; urgency=low + + * Implement hack in + http://lists.debian.org/debian-boot/2004/07/msg01207.html to get + openssh-client-udeb to show up as a retrievable debian-installer + component. + * Generate host keys in postinst only if the relevant HostKey directives + are found in sshd_config (closes: #87946). + + -- Colin Watson Wed, 21 Jul 2004 15:14:46 +0100 + +openssh (1:3.8.1p1-5) unstable; urgency=medium + + * Update German debconf template translation (thanks, Helge Kreutzmann; + closes: #252226). + * Remove Suggests: dnsutils, as it was only needed for + make-ssh-known-hosts (#93265), which has been replaced by ssh-keyscan. + * Disable shadow password support in openssh-server-udeb. + * Fix non-portable shell constructs in maintainer scripts, Makefile, and + ssh-copy-id (thanks, David Weinehall; closes: #258517). + * Apply patch from Darren Tucker to make the PAM authentication SIGCHLD + handler kill the PAM thread if its waitpid() call returns 0, as well as + the previous check for -1 (closes: #252676). + * Add scp and sftp to openssh-client-udeb. It might not be very 'u' any + more; oh well. + + -- Colin Watson Sat, 10 Jul 2004 13:57:27 +0100 + +openssh (1:3.8.1p1-4) unstable; urgency=medium + + * Kill off PAM thread if privsep slave dies (closes: #248125). + + -- Colin Watson Fri, 28 May 2004 17:58:45 -0300 + +openssh (1:3.8.1p1-3) unstable; urgency=low + + * Add ssh-keygen to openssh-server-udeb. + + -- Colin Watson Thu, 20 May 2004 16:31:52 +0100 + +openssh (1:3.8.1p1-2) unstable; urgency=low + + * Add Catalan debconf template translation (thanks, Aleix Badia i Bosch; + closes: #248748). + * openssh-client-udeb and openssh-server-udeb depend on libnss-files-udeb + (not yet uploaded). + * Restore ssh-askpass-gnome binary, lost by mistake. + * Don't link against libnsl in udeb builds. + + -- Colin Watson Thu, 20 May 2004 11:15:58 +0100 + +openssh (1:3.8.1p1-1) unstable; urgency=low + + * New upstream release. + - Use a longer buffer for tty names in utmp (closes: #247538). + * Make sure there's a newline at the end of sshd_config before adding + 'UsePAM yes' (closes: #244829). + * Generate a new .orig.tar.gz without RFC.nroff, and remove + /usr/share/doc/ssh/RFC.gz (closes: #211640). It isn't DFSG-free and only + documents the obsolete SSH1 protocol, not to mention that it was never a + real RFC but only an Internet-Draft. It's available from + http://www.free.lp.se/bamse/draft-ylonen-ssh-protocol-00.txt if you want + it for some reason. + * Add openssh-client-udeb and openssh-server-udeb binary packages for use + in debian-installer. They still need libnss_files to be supplied in udeb + form by glibc. + * Work around lack of res_query weak alias in libresolv on amd64 (see + #242462, awaiting real fix upstream). + * Fix grammar in sshd(8) (closes: #238753). + * Add .desktop file and icon for ssh-askpass-gnome (closes: #232333). + * Update Polish debconf template translation (thanks, Emil Nowak; + closes: #242808). + * Add Turkish debconf template translation (thanks, Recai Oktaş; + closes: #246068). + + -- Colin Watson Tue, 11 May 2004 23:38:10 +0100 + +openssh (1:3.8p1-3) unstable; urgency=low + + * Remove deprecated ReverseMappingCheck option from newly generated + sshd_config files (closes: #239987). + * Build everything apart from contrib in a subdirectory, to allow for + multiple builds. + * Some older kernels are missing setresuid() and setresgid(), so don't try + to use them. setreuid() and setregid() will do well enough for our + purposes (closes: #239999). + + -- Colin Watson Mon, 5 Apr 2004 21:23:43 +0100 + +openssh (1:3.8p1-2) unstable; urgency=medium + + * Disable PasswordAuthentication for new installations (closes: #236810). + * Turn off the new ForwardX11Trusted by default, returning to the + semantics of 3.7 and earlier, since it seems immature and causes far too + many problems with existing setups. See README.Debian for details + (closes: #237021). + + -- Colin Watson Wed, 10 Mar 2004 10:33:07 +0000 + +openssh (1:3.8p1-1) unstable; urgency=low + + * New upstream release (closes: #232281): + - New PAM implementation based on that in FreeBSD. This runs PAM session + modules before dropping privileges (closes: #132681, #150968). + - Since PAM session modules are run as root, we can turn pam_limits back + on by default, and it no longer spits out "Operation not permitted" to + syslog (closes: #171673). + - Password expiry works again (closes: #153235). + - 'ssh -q' suppresses login banner (closes: #134589). + - sshd doesn't lie to PAM about invalid usernames (closes: #157078). + - ssh-add prints key comment on each prompt (closes: #181869). + - Punctuation formatting fixed in man pages (closes: #191131). + - EnableSSHKeysign documented in ssh_config(5) (closes: #224457). + * Add 'UsePAM yes' to /etc/ssh/sshd_config on upgrade from versions older + than this, to maintain the standard Debian sshd configuration. + * Comment out PAMAuthenticationViaKbdInt and RhostsAuthentication in + sshd_config on upgrade. Neither option is supported any more. + * Privilege separation and PAM are now properly supported together, so + remove both debconf questions related to them and simply set it + unconditionally in newly generated sshd_config files (closes: #228838). + * ServerAliveInterval implemented upstream, so ProtocolKeepAlives is now a + compatibility alias. The semantics differ slightly, though; see + ssh_config(5) for details. + * Implement SSH1 support for ServerAliveInterval using SSH_MSG_IGNORE. As + documented in ssh_config(5), it's not as good as the SSH2 version. + * Remove -fno-builtin-log, -DHAVE_MMAP_ANON_SHARED, and + -D__FILE_OFFSET_BITS=64 compiler options, which are no longer necessary. + * Update config.guess and config.sub from autotools-dev 20040105.1. + * Darren Tucker: + - Reset signal status when starting pam auth thread, prevent hanging + during PAM keyboard-interactive authentications. + - Fix a non-security-critical segfault in PAM authentication. + * Add debconf template translations: + - Greek (thanks, Konstantinos Margaritis; closes: #232843). + - Italian (thanks, Renato Gini; closes: #234777). + + -- Colin Watson Sat, 6 Mar 2004 18:43:44 +0000 + +openssh (1:3.6.1p2-12) unstable; urgency=low + + * Update Spanish debconf template translation (thanks, Javier + Fernández-Sanguino Peña; closes: #228242). + * Add debconf template translations: + - Czech (thanks, Miroslav Kure; closes: #230110). + - Simplified Chinese (thanks, Hiei Xu; closes: #230726). + + -- Colin Watson Wed, 11 Feb 2004 09:37:57 +0000 + +openssh (1:3.6.1p2-11) unstable; urgency=low + + * Comment out pam_limits in default configuration, for now at least + (closes: #198254). + * Use invoke-rc.d (if it exists) to run the init script. + * Backport format string bug fix in sshconnect.c (closes: #225238). + * ssh-copy-id exits if ssh fails (closes: #215252). + + -- Colin Watson Sun, 4 Jan 2004 18:59:21 +0000 + +openssh (1:3.6.1p2-10) unstable; urgency=low + + * Use --retry in init script when restarting rather than sleeping, to make + sure the old process is dead (thanks, Herbert Xu; closes: #212117). + Depend on dpkg (>= 1.9.0) for start-stop-daemon's --retry option. + * Update debconf template translations: + - Brazilian Portuguese (thanks, Andre Luis Lopes; closes: #219844). + - Danish (thanks, Morten Brix Pedersen; closes: #217964). + - Japanese (thanks, Kenshi Muto; closes: #212497). + - Russian (thanks, Ilgiz Kalmetev). + - Spanish (thanks, Carlos Valdivia Yagüe; closes: #211832). + * Add Dutch debconf template translation (thanks, cobaco; + closes: #215372). + * Update config.guess and config.sub from autotools-dev 20031007.1 + (closes: #217696). + * Implement New World Order for PAM configuration, including + /etc/pam.d/common-* from /etc/pam.d/ssh (closes: #212959). + - To backport this release to woody, you need to set DEB_BUILD_SSH_WOODY + in your environment. See README.Debian. + * Add more commentary to /etc/pam.d/ssh. + + -- Colin Watson Sun, 16 Nov 2003 01:14:16 +0000 + +openssh (1:3.6.1p2-9) unstable; urgency=high + + * Merge even more buffer allocation fixes from upstream (CAN-2003-0682; + closes: #211434). + + -- Colin Watson Fri, 19 Sep 2003 10:25:25 +0100 + +openssh (1:3.6.1p2-8) unstable; urgency=high + + * Merge more buffer allocation fixes from new upstream version 3.7.1p1 + (closes: #211324). + + -- Colin Watson Wed, 17 Sep 2003 03:07:19 +0100 + +openssh (1:3.6.1p2-7) unstable; urgency=high + + * Update debconf template translations: + - French (thanks, Christian Perrier; closes: #208801). + - Japanese (thanks, Kenshi Muto; closes: #210380). + * Some small improvements to the English templates courtesy of Christian + Perrier. I've manually unfuzzied a few translations where it was + obvious, on Christian's advice, but the others will have to be updated. + * Document how to generate an RSA1 host key (closes: #141703). + * Incorporate NMU fix for early buffer expansion vulnerability, + CAN-2003-0693 (closes: #211205). Thanks to Michael Stone. + + -- Colin Watson Tue, 16 Sep 2003 14:32:28 +0100 + +openssh (1:3.6.1p2-6.0) unstable; urgency=high + + * SECURITY: fix for CAN-2003-0693, buffer allocation error + + -- Michael Stone Tue, 16 Sep 2003 08:27:07 -0400 + +openssh (1:3.6.1p2-6) unstable; urgency=medium + + * Use a more CVS-friendly means of setting SSH_VERSION. + * Update Brazilian Portuguese debconf template translation (thanks, Andre + Luis Lopes; closes: #208036). + * Don't run 'sshd -t' in init script if the server isn't to be run + (closes: #197576). + * Fix login delay, spurious auth.log entry, and PermitRootLogin + information leakage due to PAM issues with upstream's recent security + update (thanks, Darren Tucker; closes: #99168, #192207, #193546). + * Policy version 3.6.1: recode this changelog to UTF-8. + + -- Colin Watson Wed, 3 Sep 2003 19:14:02 +0100 + +openssh (1:3.6.1p2-5) unstable; urgency=low + + * Disable cmsg_type check for file descriptor passing when running on + Linux 2.0 (closes: #150976). Remove comments about non-functional + privilege separation on 2.0 from ssh/privsep_ask and ssh/privsep_tell + debconf questions and from README.Debian, since it should all now work. + * Fix "defails" typo in generated sshd_config (closes: #206484). + * Backport upstream patch to strip trailing whitespace (including + newlines) from configuration directives (closes: #192079). + + -- Colin Watson Wed, 27 Aug 2003 02:19:57 +0100 + +openssh (1:3.6.1p2-4) unstable; urgency=low + + * getent can get just one key; no need to use grep (thanks, James Troup). + * Move /usr/local/bin to the front of the default path, following + /etc/login.defs (closes: #201150). + * Remove specifics of problematic countries from package description + (closes: #197040). + * Update Spanish debconf template translation (thanks, Carlos Valdivia + Yagüe; closes: #198456). + * Backport upstream patch to pass monitor signals through to child + (closes: #164797). + + -- Colin Watson Sun, 27 Jul 2003 17:31:15 +0100 + +openssh (1:3.6.1p2-3) unstable; urgency=low + + * Update French debconf template translation (thanks, Christian Perrier; + closes: #194323). + * Version the adduser dependency for --no-create-home (closes: #195756). + * Add a version of moduli(5), namely revision 1.7 of + http://www.openbsd.org/cgi-bin/cvsweb/src/share/man/man5/moduli.5 with + '/etc/moduli' changed to '/etc/ssh/moduli' throughout (closes: #196061). + + -- Colin Watson Mon, 9 Jun 2003 02:51:35 +0100 + +openssh (1:3.6.1p2-2) unstable; urgency=low + + * Force /etc/default/ssh to be non-executable, since dpkg apparently + doesn't deal with permissions changes on conffiles (closes: #192966). + * Use debconf 0.5's seen flag rather than the deprecated isdefault. + * Add GPL location to copyright file. + * Remove debian/postinst.old. + * Switch to po-debconf, with some careful manual use of po2debconf to + ensure that the source package continues to build smoothly on woody + (closes: #183986). + * Update debconf template translations: + - Brazilian Portugese (thanks, Andre Luis Lopes; see #183986). + - Japanese (thanks, Tomohiro KUBOTA; closes: #192429). + * Compile with -fno-builtin-log for now, otherwise gcc-3.3 complains + "log.h:59: warning: conflicting types for built-in function `log'". The + OpenSSH log() function has been renamed in upstream CVS. + + -- Colin Watson Mon, 19 May 2003 01:52:38 +0100 + +openssh (1:3.6.1p2-1) unstable; urgency=medium + + * New upstream release, including fix for PAM user-discovery security hole + (closes: #191681). + * Fix ChallengeResponseAuthentication default in generated sshd_config + (closes: #106037). + * Put newlines after full stops in man page documentation for + ProtocolKeepAlives and SetupTimeOut. + * Policy version 3.5.9: support DEB_BUILD_OPTIONS=noopt, build + gnome-ssh-askpass with -g and -Wall flags. + * Really ask ssh/new_config debconf question before trying to fetch its + value (closes: #188721). + * On purge, remove only the files we know about in /etc/ssh rather than + the whole thing, and remove the directory if that leaves it empty + (closes: #176679). + * ssh has depended on debconf for some time now with no complaints, so: + - Simplify the postinst by relying on debconf being present. (The absent + case was buggy anyway.) + - Get rid of "if you have not installed debconf" text in README.Debian, + and generally update the "/usr/bin/ssh not SUID" entry. + * More README.Debian work: + - Reorganize into "UPGRADE ISSUES" and "OTHER ISSUES", in an effort to + make it easier for people to find the former. The upgrade issues + should probably be sorted by version somehow. + - Document X11UseLocalhost under "X11 Forwarding" (closes: #150913). + * Fix setting of IP flags for interactive sessions (upstream bug #541). + + -- Colin Watson Mon, 5 May 2003 17:47:40 +0100 + +openssh (1:3.6.1p1-1) unstable; urgency=low + + * New upstream release (thanks, Laurence J. Lane). + * debian/control: ssh-askpass-gnome is now Section: gnome, following the + override file. + + -- Colin Watson Wed, 2 Apr 2003 00:51:02 +0100 + +openssh (1:3.6p1-1) unstable; urgency=low + + * New upstream release. + - Workaround applied upstream for a bug in the interaction of glibc's + getaddrinfo() with the Linux 2.2 kernel (closes: #155814). + - As such, it should now be safe to remove --with-ipv4-default, so + starting sshd with -6 is no longer necessary (closes: #79861 and lots + of other merged bugs). + - ssh-copy-id prints usage when run without arguments (closes: #71376). + - scp exits 1 if ssh fails (closes: #138400). + - sshd writes to utmp's ut_addr_v6 field in IPv6 mode (closes: #167867). + - 'ssh-add -c' causes ssh-agent to ask the user each time a key is used + (closes: #109795). + * Install /etc/default/ssh non-executable (closes: #185537). + + -- Colin Watson Mon, 31 Mar 2003 23:00:59 +0100 + +openssh (1:3.5p1-5) unstable; urgency=low + + * Add /etc/default/ssh (closes: #161049). + * Run the init script under 'set -e' (closes: #175010). + * Change the default superuser path to include /sbin, /usr/sbin, and + /usr/local/sbin (closes: #128235, #151267). Using login.defs would be + nice, but that belongs to another package. Without a defined API to + retrieve its settings, parsing it is off-limits. + * Build ssh-askpass-gnome with GNOME 2. The source package should still + support building on stable with GNOME 1, using the alternate + libgnome-dev build-dependency (thanks, Colin Walters; closes: #167582). + + -- Colin Watson Sun, 9 Mar 2003 20:12:10 +0000 + +openssh (1:3.5p1-4) unstable; urgency=low + + * Point rlogin and rcp alternatives at slogin and scp respectively rather + than ssh (closes: #121103, #151666). Fix alternative removal to match; + previously it was completely wrong anyway. + * Find out whether /etc/ssh/sshd_not_to_be_run exists and set the debconf + question's default using that information, rather than using debconf as + a registry. Other solutions may be better in the long run, but this is + at least correct (thanks, Matthew Woodcraft; closes: #84725). + * Stop using pam_lastlog, as it doesn't currently work well as a session + module when privilege separation is enabled; it can usually read + /var/log/lastlog but can't write to it. Instead, just use sshd's + built-in support, already enabled by default (closes: #151297, #169938). + * Use 'ssh-keygen -q' rather than redirecting output to /dev/null. + * Add a "this may take some time" warning when creating host keys on + installation (part of #110094). + * When restarting via the init script, check for sshd_not_to_be_run after + stopping sshd (idea from Tomas Pospisek; closes: #149850). + * Append /usr/sbin:/sbin to the init script's $PATH, just in case of + strangeness (closes: #115138). + * Fix a dpkg-statoverride call to redirect stdout to /dev/null, not + stderr. + * Correct copyright file typo: "orignal" -> "original" (closes: #176490). + * Rebuild with libssl0.9.7 (closes: #176983). + * We're up to policy version 3.5.6. DEB_BUILD_OPTIONS stuff still needs to + be looked at. + + -- Colin Watson Sat, 18 Jan 2003 01:37:23 +0000 + +openssh (1:3.5p1-3) unstable; urgency=low + + * Happy new year! + * Use getent rather than id to find out whether the sshd user exists + (closes: #150974). + * Remove some duplication from the postinst's ssh-keysign setuid code. + * Replace db_text with db_input throughout debian/config. (db_text has + been a compatibility wrapper since debconf 0.1.5.) + * Warn about PermitUserEnvironment on upgrade (closes: #167895). + * Use 'make install-nokeys', and disable unused debhelper commands, + thereby forward-porting the last pieces of Zack Weinberg's patch + (closes: #68341). + * Move the man page for gnome-ssh-askpass from the ssh package to + ssh-askpass-gnome (closes: #174449). + * Build with -DLOGIN_NO_ENDOPT, since Debian's /bin/login doesn't accept + '--' to terminate the list of options (closes: #171554). + * Add Jonathan Amery's ssh-argv0 script (closes: #111341). + * Update Danish debconf template (thanks, Morten Brix Pedersen; + closes: #174757). + * Document setgid ssh-agent's effect on certain environment variables in + README.Debian (closes: #167974). + * Document interoperability problems between scp and ssh.com's server in + README.Debian, and suggest some workarounds (closes: #174662). + + -- Colin Watson Wed, 1 Jan 2003 14:18:30 +0000 + +openssh (1:3.5p1-2) unstable; urgency=low + + * Mention in the ssh package description that it provides both ssh and + sshd (closes: #99680). + * Create a system group for ssh-agent, not a user group (closes: #167669). + + -- Colin Watson Mon, 4 Nov 2002 13:43:53 +0000 + +openssh (1:3.5p1-1) unstable; urgency=low + + * New upstream release. + - Fixes typo in ssh-add usage (closes: #152239). + - Fixes 'PermitRootLogin forced-commands-only' (closes: #166184). + - ~/.ssh/environment and environment= options in ~/.ssh/authorized_keys + are deprecated for security reasons and will eventually go away. For + now they can be re-enabled by setting 'PermitUserEnvironment yes' in + sshd_config. + - ssh-agent is installed setgid to prevent ptrace() attacks. The group + actually doesn't matter, as it drops privileges immediately, but to + avoid confusion the postinst creates a new 'ssh' group for it. + * Obsolete patches: + - Solar Designer's privsep+compression patch for Linux 2.2 (see + 1:3.3p1-0.0woody1). + - Hostbased auth ssh-keysign backport (see 1:3.4p1-4). + + * Remove duplicated phrase in ssh_config(5) (closes: #152404). + * Source the debconf confmodule at the top of the postrm rather than at + the bottom, to avoid making future non-idempotency problems worse (see + #151035). + * Debconf templates: + - Add Polish (thanks, Grzegorz Kusnierz). + - Update French (thanks, Denis Barbier; closes: #132509). + - Update Spanish (thanks, Carlos Valdivia Yagüe; closes: #164716). + * Write a man page for gnome-ssh-askpass, and link it to ssh-askpass.1 if + this is the selected ssh-askpass alternative (closes: #67775). + + -- Colin Watson Sat, 26 Oct 2002 19:41:51 +0100 + +openssh (1:3.4p1-4) unstable; urgency=low + + * Allow ssh-krb5 in ssh-askpass-gnome's dependencies (closes: #129532). + * Restore Russia to list of countries where encryption is problematic (see + #148951 and http://www.average.org/freecrypto/). + * Drop ssh-askpass-gnome's priority to optional, per the override file. + * Drop the PAM special case for hurd-i386 (closes: #99157). + * s/dile/idle/ in ssh_config(5) (closes: #118331). + * Note in README.Debian that you need xauth from xbase-clients on the + server for X11 forwarding (closes: #140269). + * Use correct path to upstream README in copyright file (closes: #146037). + * Document the units for ProtocolKeepAlives (closes: #159479). + * Backport upstream patch to fix hostbased auth (closes: #117114). + * Add -g to CFLAGS. + + -- Colin Watson Sun, 13 Oct 2002 18:58:53 +0100 + +openssh (1:3.4p1-3) unstable; urgency=low + + * Add myself to Uploaders: and begin acting as temporary maintainer, at + Matthew's request. (Normal service will resume in some months' time.) + * Add sharutils to Build-Depends (closes: #138465). + * Stop creating the /usr/doc/ssh symlink. + + * Fix some debconf template typos (closes: #160358). + * Split debconf templates into one file per language. + * Add debconf template translations: + - Brazilian Portuguese (thanks, Andre Luis Lopes; closes: #106173). + - Danish (thanks, Claus Hindsgaul; closes: #126607). + - Japanese (thanks, Tomohiro KUBOTA; closes: #137427). + - Russian (thanks, Ilgiz Kalmetev; closes: #136610). + - Spanish (thanks, Carlos Valdivia Yagüe; closes: #129041). + * Update debconf template translations: + - French (thanks, Igor Genibel; closes: #151361). + - German (thanks, Axel Noetzold; closes: #147069). + * Some of these translations are fuzzy. Please send updates. + + -- Colin Watson Sun, 13 Oct 2002 14:09:57 +0100 + +openssh (1:3.4p1-2) unstable; urgency=high + + * Get a security-fixed version into unstable + * Also tidy README.Debian up a little + + -- Matthew Vernon Fri, 28 Jun 2002 17:20:59 +0100 + +openssh (1:3.4p1-1) testing; urgency=high + + * Extend my tendrils back into this package (Closes: #150915, #151098) + * thanks to the security team for their work + * no thanks to ISS/Theo de Raadt for their handling of these bugs + * save old sshd_configs to sshd_config.dpkg-old when auto-generating a + new one + * tell/ask the user about PriviledgeSeparation + * /etc/init.d/ssh run will now create the chroot empty dir if necessary + * Remove our previous statoverride on /usr/bin/ssh (only for people + upgrading from a version where we'd put one in ourselves!) + * Stop slandering Russia, since someone asked so nicely (Closes: #148951) + * Reduce the sleep time in /etc/init.d/ssh during a restart + + -- Matthew Vernon Fri, 28 Jun 2002 15:52:10 +0100 + +openssh (1:3.4p1-0.0woody1) testing-security; urgency=high + + * NMU by the security team. + * New upstream version + + -- Michael Stone Wed, 26 Jun 2002 15:40:38 -0400 + +openssh (1:3.3p1-0.0woody4) testing-security; urgency=high + + * NMU by the security team. + * fix error when /etc/ssh/sshd_config exists on new install + * check that user doesn't exist before running adduser + * use openssl internal random unconditionally + + -- Michael Stone Tue, 25 Jun 2002 19:44:39 -0400 + +openssh (1:3.3p1-0.0woody3) testing-security; urgency=high + + * NMU by the security team. + * use correct home directory when sshd user is created + + -- Michael Stone Tue, 25 Jun 2002 08:59:50 -0400 + +openssh (1:3.3p1-0.0woody2) testing-security; urgency=high + + * NMU by the security team. + * Fix rsa1 key creation (Closes: #150949) + * don't fail if sshd user removal fails + * depends: on adduser (Closes: #150907) + + -- Michael Stone Tue, 25 Jun 2002 08:59:50 -0400 + +openssh (1:3.3p1-0.0woody1) testing-security; urgency=high + + * NMU by the security team. + * New upstream version. + - Enable privilege separation by default. + * Include patch from Solar Designer for privilege separation and + compression on 2.2.x kernels. + * Remove --disable-suid-ssh from configure. + * Support setuid ssh-keysign binary instead of setuid ssh client. + * Check sshd configuration before restarting. + + -- Daniel Jacobowitz Mon, 24 Jun 2002 13:43:44 -0400 + +openssh (1:3.0.2p1-9) unstable; urgency=high + + * Thanks to those who NMUd + * The only change in this version is to debian/control - I've removed + the bit that says you can't export it from the US - it would look + pretty daft to say this about a package in main! Also, it's now OK + to use crypto in France, so I've edited that comment slightly + * Correct a path in README.Debian too (Closes: #138634) + + -- Matthew Vernon Sun, 4 Apr 2002 09:52:59 +0100 + +openssh (1:3.0.2p1-8.3) unstable; urgency=medium + + * NMU + * Really set urgency to medium this time (oops) + * Fix priority to standard per override while I'm at it + + -- Aaron M. Ucko Sun, 24 Mar 2002 09:00:08 -0500 + +openssh (1:3.0.2p1-8.2) unstable; urgency=low + + * NMU with maintainer's permission + * Prepare for upcoming ssh-nonfree transitional packages per + + * Urgency medium because it would really be good to get this into woody + before it releases + * Fix sections to match override file + * Reissued due to clash with non-US -> main move + + -- Aaron M. Ucko Sat, 23 Mar 2002 21:21:52 -0500 + +openssh (1:3.0.2p1-8.1) unstable; urgency=low + + * NMU + * Move from non-US to mani + + -- LaMont Jones Thu, 21 Mar 2002 09:33:50 -0700 + +openssh (1:3.0.2p1-8) unstable; urgency=critical + + * Security fix - patch from upstream (Closes: #137209, #137210) + * Undo the changes in the unreleased -7, since they appear to break + things here. Accordingly, the code change is minimal, and I'm + happy to get it into testing ASAP + + -- Matthew Vernon Thu, 7 Mar 2002 14:25:23 +0000 + +openssh (1:3.0.2p1-7) unstable; urgency=high + + * Build to support IPv6 and IPv4 by default again + + -- Matthew Vernon Sat, 2 Mar 2002 00:25:05 +0000 + +openssh (1:3.0.2p1-6) unstable; urgency=high + + * Correct error in the clean target (Closes: #130868) + + -- Matthew Vernon Sat, 26 Jan 2002 00:32:00 +0000 + +openssh (1:3.0.2p1-5) unstable; urgency=medium + + * Include the Debian version in our identification, to make it easier to + audit networks for patched versions in future + + -- Matthew Vernon Mon, 21 Jan 2002 17:16:10 +0000 + +openssh (1:3.0.2p1-4) unstable; urgency=medium + + * If we're asked to not run sshd, stop any running sshd's first + (Closes: #129327) + + -- Matthew Vernon Wed, 16 Jan 2002 21:24:16 +0000 + +openssh (1:3.0.2p1-3) unstable; urgency=high + + * Fix /etc/pam.d/ssh to not set $MAIL (Closes: #128913) + * Remove extra debconf suggestion (Closes: #128094) + * Mmm. speedy bug-fixing :-) + + -- Matthew Vernon Sat, 12 Jan 2002 17:23:58 +0000 + +openssh (1:3.0.2p1-2) unstable; urgency=high + + * Fix postinst to not automatically overwrite sshd_config (!) + (Closes: #127842, #127867) + * Add section in README.Debian about the PermitRootLogin setting + + -- Matthew Vernon Sat, 5 Jan 2003 05:26:30 +0000 + +openssh (1:3.0.2p1-1) unstable; urgency=high + + * Incorporate fix from Colin's NMU + * New upstream version (fixes the bug Wichert fixed) (Closes: #124035) + * Capitalise IETF (Closes: #125379) + * Refer to the correct sftp-server location (Closes: #126854, #126224) + * Do what we're asked re SetUID ssh (Closes: #124065, #124154, #123247) + * Ask people upgrading from potato if they want a new conffile + (Closes: #125642) + * Fix a typo in postinst (Closes: #122192, #122410, #123440) + * Frob the default config a little (Closes: #122284, #125827, #125696, + #123854) + * Make /etc/init.d/ssh be more clear about ssh not running (Closes: + #123552) + * Fix typo in templates file (Closes: #123411) + + -- Matthew Vernon Fri, 4 Jan 2002 16:01:52 +0000 + +openssh (1:3.0.1p1-1.2) unstable; urgency=high + + * Non-maintainer upload + * Prevent local users from passing environment variables to the login + process when UseLogin is enabled + + -- Wichert Akkerman Mon, 3 Dec 2001 19:34:45 +0100 + +openssh (1:3.0.1p1-1.1) unstable; urgency=low + + * Non-maintainer upload, at Matthew's request. + * Remove sa_restorer assignment to fix compilation on alpha, hppa, and + ia64 (closes: #122086). + + -- Colin Watson Sun, 2 Dec 2001 18:54:16 +0000 + +openssh (1:3.0.1p1-1) unstable; urgency=high + + * New upstream version (Closes: #113646, #113513, #114707, #118564) + * Building with a libc that works (!) (Closes: #115228) + * Patches forward-ported are -1/-2 options for scp, the improvement to + 'waiting for forwarded connections to terminate...' + * Fix /etc/init.d/ssh to stop sshd properly (Closes: #115228) + * /etc/ssh/sshd_config is no longer a conffile but generated in the postinst + * Remove suidregister leftover from postrm + * Mention key we are making in the postinst + * Default to not enable SSH protocol 1 support, since protocol 2 is + much safer anyway. + * New version of the vpn-fixes patch, from Ian Jackson + * New handling of -q, and added new -qq option; thanks to Jon Amery + * Experimental smartcard support not enabled, since I have no way of + testing it. + + -- Matthew Vernon Thu, 28 Nov 2001 17:43:01 +0000 + +openssh (1:2.9p2-6) unstable; urgency=low + + * check for correct file in /etc/init.d/ssh (Closes: #110876) + * correct location of version 2 keys in ssh.1 (Closes: #110439) + * call update-alternatives --quiet (Closes: #103314) + * hack ssh-copy-id to chmod go-w (Closes: #95551) + * TEMPORARY fix to provide largefile support using a -D in the cflags + line. long-term, upstream will patch the autoconf stuff + (Closes: #106809, #111849) + * remove /etc/rc references in ssh-keygen.1 (Closes: #68350) + * scp.1 patch from Adam McKenna to document -r properly (Closes: #76054) + * Check for files containing a newline character (Closes: #111692) + + -- Matthew Vernon Thu, 13 Sep 2001 16:47:36 +0100 + +openssh (1:2.9p2-5) unstable; urgency=high + + * Thanks to all the bug-fixers who helped! + * remove sa_restorer assignment (Closes: #102837) + * patch from Peter Benie to DTRT wrt X forwarding if the server refuses + us access (Closes: #48297) + * patch from upstream CVS to fix port forwarding (Closes: #107132) + * patch from Jonathan Amery to document ssh-keygen behaviour + (Closes:#106643, #107512) + * patch to postinst from Jonathan Amery (Closes: #106411) + * patch to manpage from Jonathan Amery (Closes: #107364) + * patch from Matthew Vernon to make -q emit fatal errors as that is the + documented behaviour (Closes: #64347) + * patch from Ian Jackson to cause us to destroy a file when we scp it + onto itself, rather than dumping bits of our memory into it, which was + a security hole (see #51955) + * patch from Jonathan Amery to document lack of Kerberos support + (Closes: #103726) + * patch from Matthew Vernon to make the 'waiting for connections to + terminate' message more helpful (Closes: #50308) + + -- Matthew Vernon Thu, 23 Aug 2001 02:14:09 +0100 + +openssh (1:2.9p2-4) unstable; urgency=high + + * Today's build of ssh is strawberry flavoured + * Patch from mhp to reduce length of time sshd is stopped for (Closes: #106176) + * Tidy up debconf template (Closes: #106152) + * If called non-setuid, then setgid()'s failure should not be fatal (see + #105854) + + -- Matthew Vernon Sun, 22 Jul 2001 14:19:43 +0100 + +openssh (1:2.9p2-3) unstable; urgency=low + + * Patch from yours truly to add -1 and -2 options to scp (Closes: #106061) + * Improve the IdentityFile section in the man page (Closes: #106038) + + -- Matthew Vernon Sat, 21 Jul 2001 14:47:27 +0100 + +openssh (1:2.9p2-2) unstable; urgency=low + + * Document the protocol version 2 and IPV6 changes (Closes: #105845, #105868) + * Make PrintLastLog 'no' by default (Closes: #105893) + + -- Matthew Vernon Thu, 19 Jul 2001 18:36:41 +0100 + +openssh (1:2.9p2-1) unstable; urgency=low + + * new (several..) upstream version (Closes: #96726, #81856, #96335) + * Hopefully, this will close some other bugs too + + -- Matthew Vernon Tue, 17 Jul 2001 19:41:58 +0100 + +openssh (1:2.5.2p2-3) unstable; urgency=low + + * Taking Over this package + * Patches from Robert Bihlmeyer for the Hurd (Closes: #102991) + * Put PermitRootLogin back to yes (Closes: #67334, #67371, #78274) + * Don't fiddle with conf-files any more (Closes: #69501) + + -- Matthew Vernon Tue, 03 Jul 2001 02:58:13 +0100 + +openssh (1:2.5.2p2-2.2) unstable; urgency=low + + * NMU + * Include Hurd compatibility patches from Robert Bihlmeyer (Closes: #76033) + * Patch from Richard Kettlewell for protocolkeepalives (Closes: #99273) + * Patch from Matthew Vernon for BannerTimeOut, batchmode, and + documentation for protocolkeepalives. Makes ssh more generally useful + for scripting uses (Closes: #82877, #99275) + * Set a umask, so ourpidfile isn't world-writable (closes: #100012, + #98286, #97391) + + -- Matthew Vernon Thu, 28 Jun 2001 23:15:42 +0100 + +openssh (1:2.5.2p2-2.1) unstable; urgency=low + + * NMU + * Remove duplicate Build-Depends for libssl096-dev and change it to + depend on libssl-dev instaed. Also adding in virtual | real package + style build-deps. (Closes: #93793, #75228) + * Removing add-log entry (Closes: #79266) + * This was a pam bug from a while back (Closes: #86908, #88457, #86843) + * pam build-dep already exists (Closes: #93683) + * libgnome-dev build-dep already exists (Closes: #93694) + * No longer in non-free (Closes: #85401) + * Adding in fr debconf translations (Closes: #83783) + * Already suggests xbase-clients (Closes: #79741) + * No need to suggest libpam-pwdb anymore (Closes: #81658) + * Providing rsh-client (Closes: #79437) + * hurd patch was already applied (Closes: #76033) + * default set to no (Closes: #73682) + * Adding in a suggests for dnsutils (Closes: #93265) + * postinst bugs fixed (Closes: #88057, #88066, #88196, #88405, #88612) + (Closes: #88774, #88196, #89556, #90123, #90228, #90833, #87814, #85465) + * Adding in debconf dependency + + -- Ivan E. Moore II Mon, 16 Apr 2001 14:11:04 +0100 + +openssh (1:2.5.2p2-2) unstable; urgency=high + + * disable the OpenSSL version check in entropy.c + (closes: #93581, #93588, #93590, #93614, #93619, #93635, #93648) + + -- Philip Hands Wed, 11 Apr 2001 20:30:04 +0100 + +openssh (1:2.5.2p2-1) unstable; urgency=low + + * New upstream release + * removed make-ssh-known-hosts, since ssh-keyscan does that job (closes: #86069, #87748) + * fix double space indent in german templates (closes: #89493) + * make postinst check for ssh_host_rsa_key + * get rid of the last of the misguided debian/rules NMU debris :-/ + + -- Philip Hands Sat, 24 Mar 2001 20:59:33 +0000 + +openssh (1:2.5.1p2-2) unstable; urgency=low + + * rebuild with new debhelper (closes: #89558, #89536, #90225) + * fix broken dpkg-statoverride test in postinst + (closes: #89612, #90474, #90460, #89605) + * NMU bug fixed but not closed in last upload (closes: #88206) + + -- Philip Hands Fri, 23 Mar 2001 16:11:33 +0000 + +openssh (1:2.5.1p2-1) unstable; urgency=high + + * New upstream release + * fix typo in postinst (closes: #88110) + * revert to setting PAM service name in debian/rules, backing out last + NMU, which also (closes: #88101) + * restore the pam lastlog/motd lines, lost during the NMUs, and sshd_config + * restore printlastlog option patch + * revert to using debhelper, which had been partially disabled in NMUs + + -- Philip Hands Tue, 13 Mar 2001 01:41:34 +0000 + +openssh (1:2.5.1p1-1.8) unstable; urgency=high + + * And now the old pam-bug s/sshd/ssh in ssh.c is also fixed + + -- Christian Kurz Thu, 1 Mar 2001 19:48:01 +0100 + +openssh (1:2.5.1p1-1.7) unstable; urgency=high + + * And now we mark the correct binary as setuid, when a user requested + to install it setuid. + + -- Christian Kurz Thu, 1 Mar 2001 07:19:56 +0100 + +openssh (1:2.5.1p1-1.6) unstable; urgency=high + + * Fixes postinst to handle overrides that are already there. Damn, I + should have noticed the bug earlier. + + -- Christian Kurz Wed, 28 Feb 2001 22:35:00 +0100 + +openssh (1:2.5.1p1-1.5) unstable; urgency=high + + * Rebuild ssh with pam-support. + + -- Christian Kurz Mon, 26 Feb 2001 21:55:51 +0100 + +openssh (1:2.5.1p1-1.4) unstable; urgency=low + + * Added Build-Depends on libssl096-dev. + * Fixed sshd_config file to disallow root logins again. + + -- Christian Kurz Sun, 25 Feb 2001 20:03:55 +0100 + +openssh (1:2.5.1p1-1.3) unstable; urgency=low + + * Fixed missing manpages for sftp.1 and ssh-keyscan.1 + * Made package policy 3.5.2 compliant. + + -- Christian Kurz Sun, 25 Feb 2001 15:46:26 +0100 + +openssh (1:2.5.1p1-1.2) unstable; urgency=low + + * Added Conflict with sftp, since we now provide our own sftp-client. + * Added a fix for our broken dpkg-statoverride call in the + 2.3.0p1-13. + * Fixed some config pathes in the comments of sshd_config. + * Removed ssh-key-exchange-vulnerability-patch since it's not needed + anymore because upstream included the fix. + + -- Christian Kurz Sun, 25 Feb 2001 13:46:58 +0100 + +openssh (1:2.5.1p1-1.1) unstable; urgency=high + + * Another NMU to get the new upstream version 2.5.1p1 into + unstable. (Closes: #87123) + * Corrected postinst to mark ssh as setuid. (Closes: #86391, #85766) + * Key Exchange patch is already included by upstream. (Closes: #86015) + * Upgrading should be possible now. (Closes: #85525, #85523) + * Added --disable-suid-ssh as compile option, so ssh won't get installed + suid per default. + * Fixed postinst to run dpkg-statoverride only, when dpkg-statoverride + is available and the mode of the binary should be 4755. And also added + suggestion for a newer dpkg. + (Closes: #85734, #85741, #86876) + * sftp and ssh-keyscan will also be included from now on. (Closes: #79994) + * scp now understands spaces in filenames (Closes: #53783, #58958, + #66723) + * ssh-keygen now supports showing DSA fingerprints. (Closes: #68623) + * ssh doesn' t show motd anymore when switch -t is used. (Closes #69035) + * ssh supports the usage of other dsa keys via the ssh command line + options. (Closes: #81250) + * Documentation in sshd_config fixed. (Closes: #81088) + * primes file included by upstream and included now. (Closes: #82101) + * scp now allows dots in the username. (Closes: #82477) + * Spelling error in ssh-copy-id.1 corrected by upstream. (Closes: #78124) + + -- Christian Kurz Sun, 25 Feb 2001 10:06:08 +0100 + +openssh (1:2.3.0p1-1.13) unstable; urgency=low + + * Config should now also be fixed with this hopefully last NMU. + + -- Christian Kurz Sat, 10 Feb 2001 22:56:36 +0100 + +openssh (1:2.3.0p1-1.12) unstable; urgency=high + + * Added suggest for xbase-clients to control-file. (Closes #85227) + * Applied patch from Markus Friedl to fix a vulnerability in + the rsa keyexchange. + * Fixed position of horizontal line. (Closes: #83613) + * Fixed hopefully the grep problem in the config-file. (Closes: #78802) + * Converted package from suidregister to dpkg-statoverride. + + -- Christian Kurz Fri, 9 Feb 2001 19:43:55 +0100 + +openssh (1:2.3.0p1-1.11) unstable; urgency=medium + + * Fixed some typos in the german translation of the debconf + template. + + -- Christian Kurz Wed, 24 Jan 2001 18:22:38 +0100 + +openssh (1:2.3.0p1-1.10) unstable; urgency=medium + + * Fixed double printing of motd. (Closes: #82618) + + -- Christian Kurz Tue, 23 Jan 2001 21:03:43 +0100 + +openssh (1:2.3.0p1-1.9) unstable; urgency=high + + * And the next NMU which includes the patch from Andrew Bartlett + and Markus Friedl to fix the root privileges handling of openssh. + (Closes: #82657) + + -- Christian Kurz Wed, 17 Jan 2001 22:20:54 +0100 + +openssh (1:2.3.0p1-1.8) unstable; urgency=high + + * Applied fix from Ryan Murray to allow building on other architectures + since the hurd patch was wrong. (Closes: #82471) + + -- Christian Kurz Tue, 16 Jan 2001 22:45:51 +0100 + +openssh (1:2.3.0p1-1.7) unstable; urgency=medium + + * Fixed another typo on sshd_config + + -- Christian Kurz Sun, 14 Jan 2001 19:01:31 +0100 + +openssh (1:2.3.0p1-1.6) unstable; urgency=high + + * Added Build-Dependency on groff (Closes: #81886) + * Added Build-Depencency on debhelper (Closes: #82072) + * Fixed entry for known_hosts in sshd_config (Closes: #82096) + + -- Christian Kurz Thu, 11 Jan 2001 23:08:16 +0100 + +openssh (1:2.3.0p1-1.5) unstable; urgency=high + + * Fixed now also the problem with sshd used as default ipv4 and + didn't use IPv6. This should be now fixed. + + -- Christian Kurz Thu, 11 Jan 2001 21:25:55 +0100 + +openssh (1:2.3.0p1-1.4) unstable; urgency=high + + * Fixed buggy entry in postinst. + + -- Christian Kurz Wed, 10 Jan 2001 23:12:16 +0100 + +openssh (1:2.3.0p1-1.3) unstable; urgency=high + + * After finishing the rewrite of the rules-file I had to notice that + the manpage installation was broken. This should now work again. + + -- Christian Kurz Wed, 10 Jan 2001 22:11:59 +0100 + +openssh (1:2.3.0p1-1.2) unstable; urgency=high + + * Fixed the screwed up build-dependency. + * Removed --with-ipv4-default to support ipv6. + * Changed makefile to use /etc/pam.d/ssh instead of /etc/pam.d/sshd. + * Fixed location to sftp-server in config. + * Since debian still relies on /etc/pam.d/ssh instead of moving to + /etc/pam.d/sshd, I had to hack ssh.h to get ssh to use this name. + * Fixed path to host key in sshd_config. + + -- Christian Kurz Wed, 10 Jan 2001 08:23:47 +0100 + +openssh (1:2.3.0p1-1.1) unstable; urgency=medium + + * NMU with permission of Phil Hands. + * New upstream release + * Update Build-Depends to point to new libssl096. + * This upstream release doesn't leak any information depending + on the setting of PermitRootLogin (Closes: #59933) + * New upstream release contains fix against forcing a client to + do X/agent forwarding (Closes: #76788) + * Changed template to contain correct path to the documentation + (Closes: #67245) + * Added --with-4in6 switch as compile option into debian/rules. + * Added --with-ipv4-default as compile option into debian/rules. + (Closes: #75037) + * Changed default path to also contain /usr/local/bin and + /usr/X11R6/bin (Closes: #62472,#54567,#62810) + * Changed path to sftp-server in sshd_config to match the + our package (Closes: #68347) + * Replaced OpenBSDh with OpenBSD in the init-script. + * Changed location to original source in copyright.head + * Changed behaviour of init-script when invoked with the option + restart (Closes: #68706,#72560) + * Added a note about -L option of scp to README.Debian + * ssh won't print now the motd if invoked with -t option + (Closes: #59933) + * RFC.nroff.gz get's now converted into RFC.gz. (Closes: #63867) + * Added a note about tcp-wrapper support to README.Debian + (Closes: #72807,#22190) + * Removed two unneeded options from building process. + * Added sshd.pam into debian dir and install it. + * Commented out unnecessary call to dh_installinfo. + * Added a line to sshd.pam so that limits will be paid attention + to (Closes: #66904) + * Restart Option has a Timeout of 10 seconds (Closes: 51264) + * scp won't override files anymore (Closes: 51955) + * Removed pam_lastlog module, so that the lastlog is now printed + only once (Closes: #71742, #68335, #69592, #71495, #77781) + * If password is expired, openssh now forces the user to change it. + (Closes: #51747) + * scp should now have no more problems with shell-init-files that + produces ouput (Closes: #56280,#59873) + * ssh now prints the motd correctly (Closes: #66926) + * ssh upgrade should disable ssh daemon only if users has choosen + to do so (Closes: #67478) + * ssh can now be installed suid (Closes: #70879) + * Modified debian/rules to support hurd. + + -- Christian Kurz Wed, 27 Dec 2000 20:06:57 +0100 + +openssh (1:2.2.0p1-1.1) unstable; urgency=medium + + * Non-Maintainer Upload + * Check for new returns in the new libc + (closes: #72803, #74393, #72797, #71307, #71702) + * Link against libssl095a (closes: #66304) + * Correct check for PermitRootLogin (closes: #69448) + + -- Ryan Murray Wed, 18 Oct 2000 00:48:18 -0700 + +openssh (1:2.2.0p1-1) unstable; urgency=low + + * New upstream release + + -- Philip Hands Mon, 11 Sep 2000 14:49:43 +0100 + +openssh (1:2.1.1p4-3) unstable; urgency=low + + * add rsh alternatives + * add -S option to scp (using Tommi Virtanen's patch) (closes: #63097) + * do the IPV4_DEFAULT thing properly this time + + -- Philip Hands Fri, 11 Aug 2000 18:14:37 +0100 + +openssh (1:2.1.1p4-2) unstable; urgency=low + + * reinstate manpage .out patch from 1:1.2.3 + * fix typo in postinst + * only compile ssh with IPV4_DEFAULT + * apply James Troup's patch to add a -o option to scp and updated manpage + + -- Philip Hands Sun, 30 Jul 2000 00:12:49 +0100 + +openssh (1:2.1.1p4-1) unstable; urgency=low + + * New upstream release + + -- Philip Hands Sat, 29 Jul 2000 14:46:16 +0100 + +openssh (1:1.2.3-10) unstable; urgency=low + + * add version to libpam-modules dependency, because old versions of + pam_motd make it impossible to log in. + + -- Philip Hands Sat, 29 Jul 2000 13:28:22 +0100 + +openssh (1:1.2.3-9) frozen unstable; urgency=low + + * force location of /usr/bin/X11/xauth + (closes: #64424, #66437, #66859) *RC* + * typos in config (closes: #66779, #66780) + * sshd_not_to_be_run could be assumed to be true, in error, if the config + script died in an unusual way --- I've reversed this (closes: #66335) + * Apply Zack Weinberg 's patch to ssh-askpass-ptk + (closes: #65981) + * change default for PermitRootLogin to "no" (closes: #66406) + + -- Philip Hands Tue, 11 Jul 2000 20:51:18 +0100 + +openssh (1:1.2.3-8) frozen unstable; urgency=low + + * get rid of Provides: rsh-server (this will mean that rstartd + will need to change it's depends to deal with #63948, which I'm + reopening) (closes: #66257) + Given that this is also a trivial change, and is a reversal of a + change that was mistakenly made after the freeze, I think this should + also go into frozen. + + -- Philip Hands Wed, 28 Jun 2000 03:26:30 +0100 + +openssh (1:1.2.3-7) frozen unstable; urgency=low + + * check if debconf is installed before calling db_stop in postinst. + This is required to allow ssh to be installed when debconf is not + wanted, which probably makes it an RC upload (hopefully the last of + too many). + + -- Philip Hands Wed, 28 Jun 2000 03:19:47 +0100 + +openssh (1:1.2.3-6) frozen unstable; urgency=low + + * fixed depressing little bug involving a line wrap looking like + a blank line in the templates file *RC* + (closes: #66090, #66078, #66083, #66182) + + -- Philip Hands Mon, 26 Jun 2000 00:45:05 +0100 + +openssh (1:1.2.3-5) frozen unstable; urgency=low + + * add code to prevent UseLogin exploit, although I think our PAM + conditional code breaks UseLogin in a way that protects us from this + exploit anyway. ;-) (closes: #65495) *RC* + * Apply Zack Weinberg 's patch to fix keyboard + grab vulnerability in ssh-askpass-gnome (closes: #64795) *RC* + * stop redirection of sshd's file descriptors (introduced in 1:1.2.3-3) + and use db_stop in the postinst to solve that problem instead + (closes: #65104) + * add Provides: rsh-server to ssh (closes: #63948) + * provide config option not to run sshd + + -- Philip Hands Mon, 12 Jun 2000 23:05:11 +0100 + +openssh (1:1.2.3-4) frozen unstable; urgency=low + + * fixes #63436 which is *RC* + * add 10 second pause in init.d restart (closes: #63844) + * get rid of noenv in PAM mail line (closes: #63856) + * fix host key path in make-ssh-known-hosts (closes: #63713) + * change wording of SUID template (closes: #62788, #63436) + + -- Philip Hands Sat, 27 May 2000 11:18:06 +0100 + +openssh (1:1.2.3-3) frozen unstable; urgency=low + + * redirect sshd's file descriptors to /dev/null in init to + prevent debconf from locking up during installation + ** grave bug just submited by me ** + + -- Philip Hands Thu, 20 Apr 2000 17:10:59 +0100 + +openssh (1:1.2.3-2) frozen unstable; urgency=low + + * allow user to select SUID status of /usr/bin/ssh (closes: 62462) ** RC ** + * suggest debconf + * conflict with debconf{,-tiny} (<<0.2.17) so I can clean up the preinst + + -- Philip Hands Wed, 19 Apr 2000 17:49:15 +0100 + +openssh (1:1.2.3-1) frozen unstable; urgency=low + + * New upstream release + * patch sshd to create extra xauth key required for localhost + (closes: #49944) *** RC *** + * FallbacktoRsh now defaults to ``no'' to match impression + given in sshd_config + * stop setting suid bit on ssh (closes: #58711, #58558) + This breaks Rhosts authentication (which nobody uses) and allows + the LD_PRELOAD trick to get socks working, so seems like a net benefit. + + -- Philip Hands Thu, 13 Apr 2000 20:01:54 +0100 + +openssh (1:1.2.2-1.4) frozen unstable; urgency=low + + * Recompile for frozen, contains fix for RC bug. + + -- Tommi Virtanen Tue, 29 Feb 2000 22:14:58 +0200 + +openssh (1:1.2.2-1.3) unstable; urgency=low + + * Integrated man page addition for PrintLastLog. + This bug was filed on "openssh", and I ended up + creating my own patch for this (closes: #59054) + * Improved error message when ssh_exchange_identification + gets EOF (closes: #58904) + * Fixed typo (your -> you're) in debian/preinst. + * Added else-clauses to config to make this upgradepath possible: + oldssh -> openssh preinst fails due to upgrade_to_openssh=false + -> ssh-nonfree -> openssh. Without these, debconf remembered + the old answer, config didn't force asking it, and preinst always + aborted (closes: #56596, #57782) + * Moved setting upgrade_to_openssh isdefault flag to the place + where preinst would abort. This means no double question to most + users, people who currently suffer from "can't upgrade" may need + to run apt-get install ssh twice. Did not do the same for + use_old_init_script, as the situation is a bit different, and + less common (closes: #54010, #56224) + * Check for existance of ssh-keygen before attempting to use it in + preinst, added warning for non-existant ssh-keygen in config. This + happens when the old ssh is removed (say, due to ssh-nonfree getting + installed). + + -- Tommi Virtanen Sun, 27 Feb 2000 21:36:43 +0200 + +openssh (1:1.2.2-1.2) frozen unstable; urgency=low + + * Non-maintainer upload. + * Added configuration option PrintLastLog, default off due to PAM + (closes: #54007, #55042) + * ssh-askpass-{gnome,ptk} now provide ssh-askpass, making ssh's + Suggests: line more accurate. Also closing related bugs fixed + earlier, when default ssh-askpass moved to /usr/bin. + (closes: #52403, #54741, #50607, #52298, #50967, #51661) + * Patched to call vhangup, with autoconf detection and all + (closes: #55379) + * Added --with-ipv4-default workaround to a glibc bug causing + slow DNS lookups, as per UPGRADING. Use -6 to really use + IPv6 addresses. (closes: #57891, #58744, #58713, #57970) + * Added noenv to PAM pam_mail line. Thanks to Ben Collins. + (closes: #58429) + * Added the UPGRADING file to the package. + * Added frozen to the changelog line and recompiled before + package was installed into the archive. + + -- Tommi Virtanen Fri, 25 Feb 2000 22:08:57 +0200 + +openssh (1:1.2.2-1.1) frozen unstable; urgency=low + + * Non-maintainer upload. + * Integrated scp pipe buffer patch from Ben Collins + , should now work even if reading + a pipe gives less than fstat st_blksize bytes. + Should now work on Alpha and Sparc Linux (closes: #53697, #52071) + * Made ssh depend on libssl09 (>= 0.9.4-3) (closes: #51393) + * Integrated patch from Ben Collins + to do full shadow account locking and expiration + checking (closes: #58165, #51747) + + -- Tommi Virtanen Tue, 22 Feb 2000 20:46:12 +0200 + +openssh (1:1.2.2-1) frozen unstable; urgency=medium + + * New upstream release (closes: #56870, #56346) + * built against new libesd (closes: #56805) + * add Colin Watson =NULL patch + (closes: #49902, #54894) + * use socketpairs as suggested by Andrew Tridgell to eliminate rsync + (and other) lockups + * patch SSHD_PAM_SERVICE back into auth-pam.c, again :-/ + (closes: #49902, #55872, #56959) + * uncoment the * line in ssh_config (closes: #56444) + + * #54894 & #49902 are release critical, so this should go in frozen + + -- Philip Hands Wed, 9 Feb 2000 04:52:04 +0000 + +openssh (1:1.2.1pre24-1) unstable; urgency=low + + * New upstream release + + -- Philip Hands Fri, 31 Dec 1999 02:47:24 +0000 + +openssh (1:1.2.1pre23-1) unstable; urgency=low + + * New upstream release + * excape ? in /etc/init.d/ssh (closes: #53269) + + -- Philip Hands Wed, 29 Dec 1999 16:50:46 +0000 + +openssh (1:1.2pre17-1) unstable; urgency=low + + * New upstream release + + -- Philip Hands Thu, 9 Dec 1999 16:50:40 +0000 + +openssh (1:1.2pre16-1) unstable; urgency=low + + * New upstream release + * upstream release (1.2pre14) (closes: #50299) + * make ssh depend on libwrap0 (>= 7.6-1.1) (closes: #50973, #50776) + * dispose of grep -q broken pipe message in config script (closes: #50855) + * add make-ssh-known-hosts (closes: #50660) + * add -i option to ssh-copy-id (closes: #50657) + * add check for *LK* in password, indicating a locked account + + -- Philip Hands Wed, 8 Dec 1999 22:59:38 +0000 + +openssh (1:1.2pre13-1) unstable; urgency=low + + * New upstream release + * make sshd.c use SSHD_PAM_SERVICE and define it as "ssh" in debian/rules + * remove duplicate line in /etc/pam.d/ssh (closes: #50310) + * mention ssh -A option in ssh.1 & ssh_config + * enable forwarding to localhost in default ssh_config (closes: #50373) + * tweak preinst to deal with debconf being `unpacked' + * use --with-tcp-wrappers (closes: #49545) + + -- Philip Hands Sat, 20 Nov 1999 14:20:04 +0000 + +openssh (1:1.2pre11-2) unstable; urgency=low + + * oops, just realised that I forgot to strip out the unpleasant + fiddling mentioned below (which turned not to be a fix anyway) + + -- Philip Hands Mon, 15 Nov 1999 01:35:23 +0000 + +openssh (1:1.2pre11-1) unstable; urgency=low + + * New upstream release (closes: #49722) + * add 2>/dev/null to dispose of spurious message casused by grep -q + (closes: #49876, #49604) + * fix typo in debian/control (closes: #49841) + * Do some unpleasant fiddling with upgraded keys in the preinst, which + should make the keylength problem go away. (closes: #49676) + * make pam_start in sshd use ``ssh'' as the service name (closes: #49956) + * If /etc/ssh/NOSERVER exist, stop sshd from starting (closes: #47107) + * apply Ben Collins 's shadow patch + * disable lastlogin and motd printing if using pam (closes: #49957) + * add ssh-copy-id script and manpage + + -- Philip Hands Fri, 12 Nov 1999 01:03:38 +0000 + +openssh (1:1.2pre9-1) unstable; urgency=low + + * New upstream release + * apply Chip Salzenberg 's SO_REUSEADDR patch + to channels.c, to make forwarded ports instantly reusable + * replace Pre-Depend: debconf with some check code in preinst + * make the ssh-add ssh-askpass failure message more helpful + * fix the ssh-agent getopts bug (closes: #49426) + * fixed typo on Suggests: line (closes: #49704, #49571) + * tidy up ssh package description (closes: #49642) + * make ssh suid (closes: #49635) + * in preinst upgrade code, ensure ssh_host_keys is mode 600 (closes: #49606) + * disable agent forwarding by default, for the similar reasons as + X forwarding (closes: #49586) + + -- Philip Hands Tue, 9 Nov 1999 09:57:47 +0000 + +openssh (1:1.2pre7-4) unstable; urgency=low + + * predepend on debconf (>= 0.2.17) should now allow preinst questions + + -- Philip Hands Sat, 6 Nov 1999 10:31:06 +0000 + +openssh (1:1.2pre7-3) unstable; urgency=low + + * add ssh-askpass package using Tommi Virtanen's perl-tk script + * add ssh-preconfig package cludge + * add usage hints to ssh-agent.1 + + -- Philip Hands Fri, 5 Nov 1999 00:38:33 +0000 + +openssh (1:1.2pre7-2) unstable; urgency=low + + * use pam patch from Ben Collins + * add slogin symlink to Makefile.in + * change /usr/bin/login to LOGIN_PROGRAM define of /bin/login + * sort out debconf usage + * patch from Tommi Virtanen 's makes ssh-add use ssh-askpass + + -- Philip Hands Thu, 4 Nov 1999 11:08:54 +0000 + +openssh (1:1.2pre7-1) unstable; urgency=low + + * New upstream release + + -- Philip Hands Tue, 2 Nov 1999 21:02:37 +0000 + +openssh (1:1.2.0.pre6db1-2) unstable; urgency=low + + * change the binary package name to ssh (the non-free branch of ssh has + been renamed to ssh-nonfree) + * make pam file comply with Debian standards + * use an epoch to make sure openssh supercedes ssh-nonfree + + -- Philip Hands Sat, 30 Oct 1999 16:26:05 +0100 + +openssh (1.2pre6db1-1) unstable; urgency=low + + * New upstream source + * sshd accepts logins now! + + -- Dan Brosemer Fri, 29 Oct 1999 11:13:38 -0500 + +openssh (1.2.0.19991028-1) unstable; urgency=low + + * New upstream source + * Added test for -lnsl to configure script + + -- Dan Brosemer Thu, 28 Oct 1999 18:52:09 -0500 + +openssh (1.2.0.19991027-3) unstable; urgency=low + + * Initial release + + -- Dan Brosemer Wed, 27 Oct 1999 19:39:46 -0500 diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..fcd68b7 --- /dev/null +++ b/debian/clean @@ -0,0 +1,2 @@ +config.log +debian/openssh-server.sshd.pam diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..14506c5 --- /dev/null +++ b/debian/control @@ -0,0 +1,240 @@ +Source: openssh +Section: net +Priority: standard +Maintainer: Debian OpenSSH Maintainers +Build-Depends: autotools-dev, + debhelper (>= 9.20160709~), + debhelper-compat (= 9), + dh-autoreconf, + dh-exec, + dh-runit (>= 2.8.8), + dpkg-dev (>= 1.16.1~), + libaudit-dev [linux-any], + libedit-dev, + libfido2-dev (>= 1.5.0) [linux-any], + libgtk-3-dev , + libkrb5-dev | heimdal-dev, + libpam0g-dev | libpam-dev, + libselinux1-dev [linux-any], + libssl-dev (>= 1.1.0g), + libsystemd-dev [linux-any], + libwrap0-dev | libwrap-dev, + pkg-config, + zlib1g-dev (>= 1:1.2.3), +Standards-Version: 4.1.0 +Uploaders: Colin Watson , + Matthew Vernon , +Homepage: http://www.openssh.com/ +Vcs-Git: https://salsa.debian.org/ssh-team/openssh.git +Vcs-Browser: https://salsa.debian.org/ssh-team/openssh + +Package: openssh-client +Architecture: any +Depends: adduser (>= 3.10), + dpkg (>= 1.7.0), + passwd, + ${misc:Depends}, + ${shlibs:Depends}, +Recommends: xauth, +Conflicts: sftp, +Breaks: openssh-sk-helper +Replaces: openssh-sk-helper, + ssh, + ssh-krb5, +Suggests: keychain, + libpam-ssh, + monkeysphere, + ssh-askpass, +Provides: rsh-client, + ssh-client, +Multi-Arch: foreign +Description: secure shell (SSH) client, for secure access to remote machines + This is the portable version of OpenSSH, a free implementation of + the Secure Shell protocol as specified by the IETF secsh working + group. + . + Ssh (Secure Shell) is a program for logging into a remote machine + and for executing commands on a remote machine. + It provides secure encrypted communications between two untrusted + hosts over an insecure network. X11 connections and arbitrary TCP/IP + ports can also be forwarded over the secure channel. + It can be used to provide applications with a secure communication + channel. + . + This package provides the ssh, scp and sftp clients, the ssh-agent + and ssh-add programs to make public key authentication more convenient, + and the ssh-keygen, ssh-keyscan, ssh-copy-id and ssh-argv0 utilities. + . + In some countries it may be illegal to use any encryption at all + without a special permit. + . + ssh replaces the insecure rsh, rcp and rlogin programs, which are + obsolete for most purposes. + +Package: openssh-server +Priority: optional +Architecture: any +Pre-Depends: ${misc:Pre-Depends}, +Depends: adduser (>= 3.9), + dpkg (>= 1.9.0), + libpam-modules (>= 0.72-9), + libpam-runtime (>= 0.76-14), + lsb-base (>= 4.1+Debian3), + openssh-client (= ${binary:Version}), + openssh-sftp-server, + procps, + ucf (>= 0.28), + ${misc:Depends}, + ${shlibs:Depends}, +Recommends: default-logind | logind | libpam-systemd, + ncurses-term, + xauth, + ${openssh-server:Recommends}, +Conflicts: sftp, + ssh-socks, + ssh2, +Replaces: openssh-client (<< 1:7.9p1-8), + ssh, + ssh-krb5, +Breaks: ${runit:Breaks}, +Suggests: molly-guard, + monkeysphere, + ssh-askpass, + ufw, +Provides: ssh-server, +Multi-Arch: foreign +Description: secure shell (SSH) server, for secure access from remote machines + This is the portable version of OpenSSH, a free implementation of + the Secure Shell protocol as specified by the IETF secsh working + group. + . + Ssh (Secure Shell) is a program for logging into a remote machine + and for executing commands on a remote machine. + It provides secure encrypted communications between two untrusted + hosts over an insecure network. X11 connections and arbitrary TCP/IP + ports can also be forwarded over the secure channel. + It can be used to provide applications with a secure communication + channel. + . + This package provides the sshd server. + . + In some countries it may be illegal to use any encryption at all + without a special permit. + . + sshd replaces the insecure rshd program, which is obsolete for most + purposes. + +Package: openssh-sftp-server +Priority: optional +Architecture: any +Depends: ${misc:Depends}, + ${shlibs:Depends}, +Recommends: openssh-server | ssh-server, +Breaks: openssh-server (<< 1:6.5p1-5), +Replaces: openssh-server (<< 1:6.5p1-5), +Enhances: openssh-server, + ssh-server, +Multi-Arch: foreign +Description: secure shell (SSH) sftp server module, for SFTP access from remote machines + This is the portable version of OpenSSH, a free implementation of + the Secure Shell protocol as specified by the IETF secsh working + group. + . + Ssh (Secure Shell) is a program for logging into a remote machine + and for executing commands on a remote machine. + It provides secure encrypted communications between two untrusted + hosts over an insecure network. X11 connections and arbitrary TCP/IP + ports can also be forwarded over the secure channel. + It can be used to provide applications with a secure communication + channel. + . + This package provides the SFTP server module for the SSH server. It + is needed if you want to access your SSH server with SFTP. The SFTP + server module also works with other SSH daemons like dropbear. + . + OpenSSH's sftp and sftp-server implement revision 3 of the SSH filexfer + protocol described in: + . + http://www.openssh.com/txt/draft-ietf-secsh-filexfer-02.txt + . + Newer versions of the draft will not be supported, though some features + are individually implemented as extensions. + +Package: openssh-tests +Priority: optional +Architecture: any +Depends: openssh-client (= ${binary:Version}), + openssh-server (= ${binary:Version}), + openssh-sftp-server (= ${binary:Version}), + openssl, + putty-tools (>= 0.67-2), + python3-twisted, + ${misc:Depends}, + ${shlibs:Depends}, +Multi-Arch: foreign +Description: OpenSSH regression tests + This package provides OpenSSH's regression test suite. It is mainly + intended for use with the autopkgtest system, though can also be run + directly using /usr/lib/openssh/regress/run-tests. + +Package: ssh +Priority: optional +Architecture: all +Pre-Depends: dpkg (>= 1.17.5), +Depends: openssh-client (>= ${binary:Version}), + openssh-server (>= ${binary:Version}), + ${misc:Depends}, +Multi-Arch: foreign +Description: secure shell client and server (metapackage) + This metapackage is a convenient way to install both the OpenSSH client + and the OpenSSH server. It provides nothing in and of itself, so you + may remove it if nothing depends on it. + +Package: ssh-askpass-gnome +Build-Profiles: +Section: gnome +Priority: optional +Architecture: any +Depends: openssh-client | ssh (>= 1:1.2pre7-4), + ${misc:Depends}, + ${shlibs:Depends}, +Replaces: ssh (<< 1:3.5p1-3), +Provides: ssh-askpass, +Multi-Arch: foreign +Description: interactive X program to prompt users for a passphrase for ssh-add + This has been split out of the main openssh-client package so that + openssh-client does not need to depend on GTK+. + . + You probably want the ssh-askpass package instead, but this is + provided to add to your choice and/or confusion. + +Package: openssh-client-udeb +Build-Profiles: +Package-Type: udeb +Section: debian-installer +Priority: optional +Architecture: any +Depends: ${shlibs:Depends}, +XB-Installer-Menu-Item: 99999 +Description: secure shell client for the Debian installer + This is the portable version of OpenSSH, a free implementation of + the Secure Shell protocol as specified by the IETF secsh working + group. + . + This package provides the ssh client for use in debian-installer. + +Package: openssh-server-udeb +Build-Profiles: +Package-Type: udeb +Section: debian-installer +Priority: optional +Architecture: any +Depends: ${shlibs:Depends}, +Description: secure shell server for the Debian installer + This is the portable version of OpenSSH, a free implementation of + the Secure Shell protocol as specified by the IETF secsh working + group. + . + This package provides the sshd server for use in debian-installer. + Since it is expected to be used in specialized situations (e.g. S/390 + installs with no console), it does not provide any configuration. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..ef1bc8e --- /dev/null +++ b/debian/copyright @@ -0,0 +1,247 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: OpenSSH +Upstream-Contact: openssh-unix-dev@mindrot.org +Source: http://www.openssh.com/portable.html +Comment: + The overall licence of the OpenSSH upstream code amounts to BSD-3-clause or + various less restrictive licences, with the additional restrictions that + derived versions must be clearly marked as such and that if derived works + are incompatible with the RFC-specified protocol then they must be called + by a name other than "ssh" or "Secure Shell". + +Files: * +Copyright: + 1995 Tatu Ylonen , Espoo, Finland + Markus Friedl + Theo de Raadt + Niels Provos + Dug Song + Aaron Campbell + Damien Miller + Kevin Steves + Daniel Kouril + Wesley Griffin + Per Allansson + Nils Nordman + Simon Wilkinson + Ben Lindstrom + Tim Rice + Andre Lucas + Chris Adams + Corinna Vinschen + Cray Inc. + Denis Parker + Gert Doering + Jakob Schlyter + Jason Downs + Juha Yrjölä + Michael Stone + Networks Associates Technology, Inc. + Solar Designer + Todd C. Miller + Wayne Schroeder + William Jones + Darren Tucker + Sun Microsystems + The SCO Group + Daniel Walsh + Red Hat, Inc + Simon Vallet / Genoscope + Internet Software Consortium + Reyk Floeter + Chad Mynhier +License: OpenSSH + Tatu Ylonen's original licence is as follows (excluding some terms about + third-party code which are no longer relevant; see the LICENCE file for + details): + . + As far as I am concerned, the code I have written for this software + can be used freely for any purpose. Any derived versions of this + software must be clearly marked as such, and if the derived work is + incompatible with the protocol description in the RFC file, it must be + called by a name other than "ssh" or "Secure Shell". + . + Note that any information and cryptographic algorithms used in this + software are publicly available on the Internet and at any major + bookstore, scientific library, and patent office worldwide. More + information can be found e.g. at "http://www.cs.hut.fi/crypto". + . + The legal status of this program is some combination of all these + permissions and restrictions. Use only at your own responsibility. + You will be responsible for any legal consequences yourself; I am not + making any claims whether possessing or using this is legal or not in + your country, and I am not taking any responsibility on your behalf. + . + Most remaining components of the software are provided under a standard + 2-term BSD licence: + . + 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. + . + Some code is licensed under an ISC-style license, to the following + copyright holders: + . + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL + WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE + FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Files: ssh-keyscan.* +Copyright: 1995, 1996 David Mazieres +License: Mazieres-BSD-style + Modification and redistribution in source and binary forms is + permitted provided that due credit is given to the author and the + OpenBSD project by leaving this copyright notice intact. + +Files: rijndael.* +License: public-domain + This code is from a reference implementation of the Rijndael cipher which + has been dedicated to the public domain. + . + @version 3.0 (December 2000) + . + Optimised ANSI C code for the Rijndael cipher (now AES) + . + @author Vincent Rijmen + @author Antoon Bosselaers + @author Paulo Barreto + . + This code is hereby placed in the public domain. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS OR CONTRIBUTORS 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. + +Files: loginrec.c openbsd-compat/* scp.c +Copyright: + 1983, 1995-1997 Eric P. Allman + 1999 Aaron Campbell + 1993 by Digital Equipment Corporation + 2000 Andre Lucas + 1999-2010 Damien Miller + 1997-2010 Todd C. Miller + 1995, 1996, 1998, 1999, 2008 Theo de Raadt + 2003 Constantin S. Svintsoff + 1980, 1983, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995 The Regents of the University of California +License: BSD-3-clause + 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. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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. + +Files: md5crypt.* +Copyright: Poul-Henning Kamp +License: Beer-ware + "THE BEER-WARE LICENSE" (Revision 42): + wrote this file. As long as you retain this + notice you can do whatever you want with this stuff. If we meet + some day, and you think this stuff is worth it, you can buy me a + beer in return. Poul-Henning Kamp + +Files: openbsd-compat/bsd-snprintf.c +Copyright: 1995 Patrick Powell +License: Powell-BSD-style + This code is based on code written by Patrick Powell + (papowell@astart.com) It may be used for any purpose as long as this + notice remains intact on all source code distributions + +Files: openbsd-compat/sigact.* +Copyright: 1998, 2000 Free Software Foundation, Inc. +License: Expat-with-advertising-restriction + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, distribute with modifications, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + THE USE OR OTHER DEALINGS IN THE SOFTWARE. + . + Except as contained in this notice, the name(s) of the above copyright + holders shall not be used in advertising or otherwise to promote the + sale, use or other dealings in this Software without prior written + authorization. + +Files: debian/* +Copyright: Matthew Vernon, Colin Watson +License: BSD-2-clause + 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. diff --git a/debian/faq.html b/debian/faq.html new file mode 100644 index 0000000..7f02528 --- /dev/null +++ b/debian/faq.html @@ -0,0 +1,1187 @@ + + + +OpenSSH FAQ + + + + + + + + + + +[OpenSSH] +

+ +

OpenSSH FAQ (Frequently asked questions)

+ +
+ +
+

1.0 - What Is OpenSSH and Where Can I Get It?

+ + +

2.0 - General Questions

+ + +

3.0 - Portable OpenSSH Questions

+ + +
+ +
+ +

1.0 - What Is OpenSSH and Where Can I Get It?

+ +

1.1 - What is OpenSSH and where can I download it?

+ +OpenSSH provides end-to-end encrypted replacement of applications such as +telnet, rlogin, and ftp. +Unlike these legacy applications, OpenSSH never passes anything +(including username and password) over the wire in unencrypted form, and +provides host authentication, to verify that you really are talking to +the system that you think you are and that no one else can take over +that session. + +

+The OpenSSH suite includes the +ssh(1) +program which replaces rlogin and telnet, and +scp(1) +which replaces +rcp(1) and +ftp(1). +OpenSSH has also added +sftp(1) and +sftp-server(8) +which implement an easier solution for file-transfer. This is based upon the +secsh-filexfer IETF draft. + + +

OpenSSH consists of a number of programs. + +

    +
  • sshd(8) - Server program run on the server machine. This listens for connections from client machines, and whenever it receives a connection, it performs authentication and starts serving the client. +Its behaviour is controlled by the config file +sshd_config(5). +
  • ssh(1) - This is the client program used to log into another machine or to execute commands on the other machine. slogin is another name for this program. +Its behaviour is controlled by the global config file +ssh_config(5) and individual users' $HOME/.ssh/config files. +
  • scp(1) - Securely copies files from one machine to another. +
  • ssh-keygen(1) - Used to create Pubkey Authentication (RSA or DSA) keys (host keys and user authentication keys). +
  • ssh-agent(1) - Authentication agent. This can be used to hold RSA keys for authentication. +
  • ssh-add(1) - Used to register new keys with the agent. +
  • sftp-server(8) - SFTP server subsystem. +
  • sftp(1) - Secure file transfer program. +
  • ssh-keyscan(1) - gather ssh public keys. +
  • ssh-keysign(8) - ssh helper program for hostbased authentication. +
+ +

Downloading

+ +

+The most recent version of OpenSSH is included with the current +distribution of OpenBSD, and +installed as part of a basic install. + +

+Today, most other operating systems include some version of OpenSSH +(often re-badged or privately labeled), so most users can immediately +use it. +However, sometimes the included versions are quite old, and missing +features of the current release of OpenSSH, and you may wish to install +the current version, or install it on one of the few OSs that lacked it, +and where the OS publisher does not make a modern version available. +You may also wish to use OpenSSH on your embedded application. + +

+Non-OpenBSD users will want to download, compile and install the +multi-platform Portable distribution from a +mirror near you. + + +

1.2 - Why should it be used?

+ +

+OpenSSH is a suite of tools to help secure your network +connections. Here is a list of features: + + +

    +
  • Strong authentication. Closes several security holes (e.g., IP, routing, and DNS spoofing). +
  • Improved privacy. All communications are automatically and transparently encrypted. +
  • Secure X11 sessions. The program automatically sets DISPLAY on the server machine, and forwards any X11 connections over the secure channel. +
  • Arbitrary TCP/IP ports can be redirected through the encrypted channel in both directions (e.g., for e-cash transactions). +
  • No retraining needed for normal users. +
  • Never trusts the network. Minimal trust on the remote side of the connection. Minimal trust on domain name servers. Pure RSA authentication never trusts anything but the private key. +
  • Client RSA-authenticates the server machine in the beginning of every connection to prevent trojan horses (by routing or DNS spoofing) and man-in-the-middle attacks, and the server RSA-authenticates the client machine before accepting .rhosts or /etc/hosts.equiv authentication (to prevent DNS, routing, or IP-spoofing). +
  • Host authentication key distribution can be centrally by the administration, automatically when the first connection is made to a machine. +
  • Any user can create any number of user authentication RSA keys for his/her own use. +
  • The server program has its own server RSA key which is automatically regenerated every hour. +
  • An authentication agent, running in the user's laptop or local workstation, can be used to hold the user's RSA authentication keys. +
  • The software can be installed and used (with restricted functionality) even without root privileges. +
  • The client is customizable in system-wide and per-user configuration files. +
  • Optional compression of all data with gzip (including forwarded X11 and TCP/IP port data), which may result in significant speedups on slow connections. +
  • Complete replacement for rlogin, rsh, and rcp. +
+ +

+Currently, almost all communications in computer networks are done +without encryption. As a consequence, anyone who has access to any +machine connected to the network can listen in on any communication. +This is being done by hackers, curious administrators, employers, +criminals, industrial spies, and governments. Some networks leak off +enough electromagnetic radiation that data may be captured even from a +distance. + + +

+When you log in, your password goes in the network in plain +text. Thus, any listener can then use your account to do any evil he +likes. Many incidents have been encountered worldwide where crackers +have started programs on workstations without the owner's knowledge +just to listen to the network and collect passwords. Programs for +doing this are available on the Internet, or can be built by a +competent programmer in a few hours. + + +

+Businesses have trade secrets, patent applications in preparation, +pricing information, subcontractor information, client data, personnel +data, financial information, etc. Currently, anyone with access to +the network (any machine on the network) can listen to anything that +goes in the network, without any regard to normal access restrictions. + + +

+Many companies are not aware that information can so easily be +recovered from the network. They trust that their data is safe +since nobody is supposed to know that there is sensitive information +in the network, or because so much other data is transferred in the +network. This is not a safe policy. + + +

1.3 - What operating systems are supported?

+ +

+Even though OpenSSH is developed on +OpenBSD a wide variety of +ports to other operating systems exist. The portable version of OpenSSH +is headed by Damien Miller. +For a quick overview of the portable version of OpenSSH see +OpenSSH Portable Release. +Currently, the supported operating systems are: + + +

    +
  • OpenBSD +
  • NetBSD +
  • FreeBSD +
  • AIX +
  • HP-UX +
  • IRIX +
  • Linux +
  • NeXT +
  • SCO +
  • SNI/Reliant Unix +
  • Solaris +
  • Digital Unix/Tru64/OSF +
  • Mac OS X +
  • Cygwin +
+ +

+A list of vendors that include OpenSSH in their distributions +is located in the OpenSSH Users page. + +

1.4 - What about copyrights, usage and patents?

+

+The OpenSSH developers have tried very hard to keep OpenSSH free of any +patent or copyright problems. To do this, some options had to be +stripped from OpenSSH. Namely support for patented algorithms. + +

+OpenSSH does not support any patented transport algorithms. In SSH1 mode, +only 3DES and Blowfish are available options. In SSH2 mode, only 3DES, +Blowfish, CAST128, Arcfour and AES can be selected. +The patented IDEA algorithm is not supported. + +

+OpenSSH provides support for both SSH1 and SSH2 protocols. + +

+Since the RSA patent has expired, there are no restrictions on the use +of RSA algorithm using software, including OpenBSD. + +

1.5 - Where should I ask for help?

+

+There are many places to turn to for help. In addition to the main +OpenSSH website, +there are many mailing lists to try. Before trying any mailing lists, +please search through all mailing list archives to see if your question +has already been answered. The OpenSSH Mailing List has been archived and +put in searchable form and can be found at +marc.info. + +

+For more information on subscribing to OpenSSH related mailing lists, +please see OpenSSH Mailing lists. + +

1.6 - I have found a bug. Where do I report it?

+

+Information about submitting bug reports can be found at the OpenSSH +Reporting bugs page. +

+If you wish to report a security bug, please contact the private developers +list <openssh@openssh.com>. + +

2.0 - General Questions

+ +

2.1 - Why does ssh/scp make connections from low-numbered ports.

+

+The OpenSSH client uses low numbered ports for rhosts and rhosts-rsa +authentication because the server needs to trust the username provided by +the client. To get around this, you can add the below example to your +ssh_config or ~/.ssh/config file. + + +

+ + + + +
+UsePrivilegedPort no +
+
+ +

+Or you can specify this option on the command line, using the -o +option to +ssh(1) command. + +

+ + + + +
+$ ssh -o "UsePrivilegedPort no" host.com +
+
+ +

2.2 - Why is the ssh client setuid root?

+ +

+In conjunction with the previous question, (2.1) +OpenSSH needs root authority to be able to bind to low-numbered ports to +facilitate rhosts authentication. +A privileged port is also required for rhosts-rsa authentication to older +SSH releases. + +

+Additionally, for both rhosts-rsa authentication (in protocol +version 1) and hostbased authentication (in protocol version 2) +the ssh client needs to access the private host key in order to +authenticate the client machine to the server. +OpenSSH versions prior to 3.3 required the ssh binary to be +setuid root to enable this, and you may safely remove it if you don't +want to use these authentication methods. + +

+Starting in OpenSSH 3.3, ssh is not setuid by default. ssh-keysign, +is used for access to the private hosts keys, and ssh does not use privileged +source ports by default. If you wish to use a privileged source port, you must +manually set the setuid bit on ssh. + +

2.3 - Why does SSH 2.3 have problems interoperating with OpenSSH 2.1.1?

+ +

+SSH 2.3 and earlier versions contain a flaw in their HMAC implementation. +Their code was not supplying the full data block output from the digest, +and instead always provided 128 bits. For longer digests, this caused +SSH 2.3 to not interoperate with OpenSSH. + +

+OpenSSH 2.2.0 detects that SSH 2.3 has this flaw. Recent versions of SSH +will have this bug fixed. Or you can add the following to +SSH 2.3 sshd2_config. + + +

+ + + + +
+Mac hmac-md5 +
+
+ +

2.4 - Why does OpenSSH print: Dispatch protocol error: type 20

+ +

+Problems in interoperation have been seen because older versions of +OpenSSH did not support session rekeying. However the commercial SSH 2.3 +tries to negotiate this feature, and you might experience connection +freezes or see the error message "Dispatch protocol error: +type 20 ". +To solve this problem, either upgrade to a recent OpenSSH release or +disable rekeying by adding the following to your commercial SSH 2.3's +ssh2_config or sshd2_config. + + +

+ + + + +
+RekeyIntervalSeconds 0 +
+
+ +

2.5 - Old versions of commercial SSH encrypt host keys with IDEA.

+ +

+The old versions of SSH used a patented algorithm to encrypt their +/etc/ssh/ssh_host_key. This problem will manifest as +sshd(8) +not being able to read its host key. To solve this, use the command below +to convert your ssh_host_key to use 3DES. +NOTE: Use the +ssh-keygen(1) +program from the Commercial SSH product, *NOT* OpenSSH for the example +below. + + +

+ + + + +
+# ssh-keygen -u -f /etc/ssh/ssh_host_key +
+
+ +

2.6 - What are these warning messages about key lengths

+ +

+Commercial SSH's +ssh-keygen(1) +program contained a bug which caused it to occasionally generate Pubkey +Authentication (RSA or DSA) keys which had their Most Significant Bit +(MSB) unset. Such keys were advertised as being full-length, but are +actually, half the time, smaller than advertised. + +

+OpenSSH will print warning messages when it encounters such keys. To rid +yourself of these message, edit your known_hosts files and replace the +incorrect key length (usually "1024") with the correct key length +(usually "1023"). + +

2.7 - X11 and/or agent forwarding does not work.

+ +

+Check your ssh_config and sshd_config. The default +configuration files disable authentication agent and X11 forwarding. To +enable it, put the line below in sshd_config: + +

+ + + + +
+X11Forwarding yes +
+
+ +

+and put the following lines in ssh_config: + +

+ + + + +
+ForwardAgent yes
+ForwardX11 yes +
+
+ +

+X11 forwarding requires a working xauth(1) binary. On OpenBSD this is in the xbase file +set but will probably be different on other platforms. For OpenSSH +Portable, xauth must be either found at configure time or specified +via XAuthLocation in sshd_config(5) and ssh_config(5). + +

+Note on agent interoperability: There are two different and +incompatible agent forwarding mechanisms within the SSH2 protocol. +OpenSSH has always used an extension of the original SSH1 agent +requests, however some commercial products use a different, non-free +agent forwarding protocol. This means that agent forwarding cannot +be used between OpenSSH and those products. + +

+NOTE: For users of Linux Mandrake 7.2, Mandrake modifies the +XAUTHORITY environment variable in /etc/skel/.bashrc, +and thus any bash user's home directory. This variable is set by OpenSSH +and for either of the above options to work, you need to comment out +the line: + + +

+ + + + +
+# export XAUTHORITY=$HOME/.Xauthority +
+
+ +

2.8 - After upgrading OpenSSH I lost SSH2 support.

+ +

+Between versions changes can be made to sshd_config or +ssh_config. You should always check on these changes when upgrading +versions of OpenSSH. After OpenSSH Version 2.3.0 you need to add the +following to your sshd_config: + + +

+ + + + +
+HostKey /etc/ssh_host_dsa_key
+HostKey /etc/ssh_host_rsa_key +
+
+ +

2.9 - sftp/scp fails at connection, but ssh is OK.

+ +

+sftp and/or scp may fail at connection time if you have shell +initialization (.profile, .bashrc, .cshrc, etc) which produces output +for non-interactive sessions. This output confuses the sftp/scp client. +You can verify if your shell is doing this by executing: + +

+ + + + +
+ssh yourhost /usr/bin/true +
+
+ +

+If the above command produces any output, then you need to modify your +shell initialization. + +

2.10 - Will you add [foo] to scp?

+ +

+Short Answer: no. + +

+Long Answer: scp is not standardized. The closest thing it has to a +specification is "what rcp does". Since the same command is used on both ends +of the connection, adding features or options risks breaking interoperability with other +implementations. + +

+New features are more likely in sftp, since the protocol is standardized +(well, a +draft standard), extensible, and the client and server are decoupled. + +

2.11 - How do I use port forwarding?

+ +

+If the remote server is running sshd(8), it may be possible to +``tunnel'' certain services via ssh. This may be desirable, for +example, to encrypt POP or SMTP connections, even though the software +does not directly support encrypted communications. Tunnelling uses +port forwarding to create a connection between the client and server. +The client software must be able to specify a non-standard port to +connect to for this to work. + +

+The idea is that the user connects to the remote host using ssh, +and specifies which port on the client's machine should be used to +forward connections to the remote server. After that it is possible +to start the service which is to be encrypted (e.g. fetchmail, irc) +on the client machine, specifying the same local port passed to +ssh, and the connection will be tunnelled through ssh. By default, +the system running the forward will only accept connections from +itself. + +

+The options most relevant to tunnelling are the -L and -R options, +which allow the user to forward connections, the -D option, which +permits dynamic port forwarding, the -g option, which permits other +hosts to use port forwards, and the -f option, which instructs ssh +to put itself in the background after authentication. See the ssh(1) man page for further details. + +

+This is an example of tunnelling an IRC session from client machine +``127.0.0.1'' (localhost) to remote server ``server.example.com'': + +

+ + + + +
+ssh -f -L 1234:server.example.com:6667 server.example.com sleep 10
+irc -c '#users' -p 1234 pinky 127.0.0.1
+
+
+ +

+This tunnels a connection to IRC server server.example.com, joining +channel ``#users'', using the nickname ``pinky''. The local port used +in this example is 1234. It does not matter which port is used, as +long as it's greater than 1023 (remember, only root can open sockets on +privileged ports) and doesn't conflict with any ports already in use. +The connection is forwarded to port 6667 on the remote server, since +that's the standard port for IRC services. + +

+The remote command ``sleep 10'' was specified to allow an amount +of time (10 seconds, in the example) to start the service which is to +be tunnelled. If no connections are made within the time specified, +ssh will exit. If more time is required, the sleep(1) value can be +increased appropriately or, alternatively, the example above could +be added as a function to the user's shell. See ksh(1) and csh(1) +for more details about user-defined functions. + +

+ssh also has an -N option, convenient for use with port forwarding: +if -N is specified, it is not necessary to specify a remote command +(``sleep 10'' in the example above). However, use of this option +causes ssh to wait around for ever (as opposed to exiting after a +remote command has completed), and the user must take care to manually +kill(1) the process afterwards. + +

2.12 - My ssh connection freezes or drops out after N minutes of inactivity.

+ +

+This is usually the result of a packet filter or NAT device +timing out your TCP connection due to inactivity. You can enable +ClientAliveInterval in the server's +sshd_config, or enable ServerAliveInterval in the +client's +ssh_config (the latter is available in OpenSSH 3.8 and newer). + +

+Enabling either option and setting the interval for less than the time +it takes to time out your session will ensure that the connection is +kept "fresh" in the device's connection table. + +

2.13 - How do I use scp to copy a file with a colon in it?

+ + +scp will interpret the component before the colon to be a remote +server name and attempt to connect to it. To prevent this, refer to +the file by a relative or absolute path, eg: + +
+ + + + +
+$ scp ./source:file sshserver: +
+
+ +

2.14 - Why does OpenSSH report its version to clients?

+ +

+OpenSSH, like most SSH implementations, reports its name and version to clients +when they connect, e.g. +

+ +
+SSH-2.0-OpenSSH_3.9 +
+ +

+This information is used by clients and servers to enable protocol +compatibility tweaks to work around changed, buggy or missing features in +the implementation they are talking to. This protocol feature checking is +still required at present because versions with incompatibilities are still +in wide use. +

+ +

3.0 - Portable OpenSSH Questions

+ +

3.1 - Spurious PAM authentication messages in logfiles.

+ +

+The portable version of OpenSSH will generate spurious authentication +failures at every login, similar to: + + +

+ + + + +
+"authentication failure; (uid=0) -> root for sshd service" +
+
+ +

+These are generated because OpenSSH first tries to determine whether a +user needs authentication to login (e.g. empty password). Unfortunately +PAM likes to log all authentication events, this one included. + +

+If it annoys you too much, set "PermitEmptyPasswords no" +in sshd_config. This will quiet the error message at the expense +of disabling logins to accounts with no password set. +This is the default if you use the supplied sshd_config file. + +

3.2 - Empty passwords not allowed with PAM authentication.

+ +

+To enable empty passwords with a version of OpenSSH built with PAM you +must add the flag nullok to the end of the password checking module +in the /etc/pam.d/sshd file. For example: + +

+ + + + +
+auth required/lib/security/pam_unix.so shadow nodelay nullok +
+
+ +

+This must be done in addition to setting "PermitEmptyPasswords +yes" in the sshd_config file. + +

+There is one caveat when using empty passwords with PAM authentication: +PAM will allow any password when authenticating an account with an empty +password. This breaks the check that +sshd(8) +uses to determine whether an account has no password set and grant +users access to the account regardless of the policy specified by +PermitEmptyPasswords. For this reason, it is recommended that you +do not add the nullok directive to your PAM configuration file +unless you specifically wish to allow empty passwords. + + +

3.3 - ssh(1) takes a long time to connect or log +in

+ +

+Large delays (more than 10 seconds) are typically caused by a problem with +name resolution: +

    +
  • Some versions of glibc (notably glibc 2.1 shipped with Red Hat 6.1) +can take a long time to resolve "IPv6 or IPv4" addresses from domain +names. This can be worked around with by specifying AddressFamily +inet option in ssh_config.
  • + +
  • There may be a DNS lookup problem, either at the client or server. +You can use the nslookup command to check this on both client +and server by looking up the other end's name and IP address. In +addition, on the server look up the name returned by the client's +IP-name lookup. You can disable most of the server-side lookups by +setting UseDNS no in sshd_config.
  • +
+ +

+Delays less than 10 seconds can have other causes. + +

    + +
  • OpenSSH releases prior to 3.8 had an moduli file with +moduli that were just smaller than what sshd would look for, and +as a result, sshd would end up using moduli significantly larger +than requested, which resulted in a speed penalty. Replacing the +moduli file will resolve this (note that in most cases this +file will not be replaced during an upgrade and must be replaced +manually).
  • + +
  • OpenSSH releases prior to 3.8 had a flaw in ssh that +would cause it to request moduli larger than intended (which when +combined with the above resulted in significant slowdowns). +Upgrading the client to 3.8 or higher will resolve this issue.
  • + +
  • If either the client or server lack a kernel-based random number +device (eg Solaris < 9, AIX < 5.2, HP-UX < 11.11) and no +substitute is available (eg prngd) it's possible that +one of the programs called by ssh-rand-helper to +generate entropy is hanging. This can be investigated by running +it in debug mode: + +
    + + + + +
    +/usr/local/libexec/ssh-rand-helper -vvv +
    +
    + +Any significant delays should be investigated and rectified, or the +corresponding commands should be removed from ssh_prng_cmds. +
  • + +
+ +

How slow is "slow"?

+Under normal conditions, the speed of SSH logins is dependant on +CPU speed of client and server. For comparison the following are +typical connect times for time ssh localhost true +with a 1024-bit RSA key on otherwise unloaded hosts. OpenSSH and +OpenSSL were compiled with gcc 3.3.x. + +

+ + + + + + + + + +
CPUTime (SSHv1)[1]Time (SSHv2)
170MHz SPARC/sun4m0.74 sec1.25 sec
236MHz HPPA/8200[2]0.44 sec0.79 sec
375MHz PowerPC/604e0.38 sec0.51 sec
933MHz VIA Ezra0.34 sec0.44 sec
2.1GHz Athlon XP 2600+0.14 sec0.22 sec
+ +
+ +[1] The SSHv1 protocol is faster but is +cryptographically weaker than SSHv2.
+ +[2] At the time of writing, gcc generates +relatively slow code on HPPA for RSA and Diffie-Hellman operations +(see gcc +bug #7625 and +discussion on openssh-unix-dev). + +

3.4 - "Can't locate module net-pf-10" messages in log under Linux.

+ +

+The Linux kernel is looking (via modprobe) for protocol family 10 (IPv6). +Either load the appropriate kernel module, enter the correct alias in +/etc/modules.conf or disable IPv6 in /etc/modules.conf. + + +

+For some silly reason /etc/modules.conf may also be named +/etc/conf.modules. + + +

3.5 - Password authentication doesn't work (eg on Slackware 7.0 or Red Hat 6.x)

+ +

+If the password is correct password the login is still denied, the +usual cause is that the system is configured to use MD5-type passwords +but the +crypt(3) function used by sshd doesn't understand them. + +

+Affected accounts will have password strings in /etc/passwd +or /etc/shadow that start with $1$. +If password authentication fails for new accounts or accounts with +recently changed passwords, but works for old accounts, this is the +likely culprit. + +

+The underlying cause is that some versions of OpenSSL have a crypt(3) +function that does not understand MD5 passwords, and the link order of +sshd means that OpenSSL's crypt(3) is used instead of the system's. +OpensSSH's configure attempts to correct for this but is not always +successful. + +

+There are several possible solutions: + +

    +
  • +

    +Enable sshd's built-in support for MD5 passwords at build time. + +

    + + + + +
    +./configure --with-md5-passwords [options] +
    +
    + +This is safe even if you have both types of encryption as sshd will +select the correct algorithm for each account automatically. + +
  • +

    +If your system has a separate libcrypt library (eg Slackware 7) then you +can manually add -lcrypt to the LIBS list so it's used instead of +OpenSSL's: + +

    + + + + +
    +LIBS=-lcrypt ./configure [options] +
    +
    + +
  • +

    +If your platforms supports PAM, you may configure sshd to use it +(see section 3.15). This will mean that sshd will +not verify passwords itself but will defer to the configured PAM modules. +

+ +

3.6 - Configure or sshd(8) complain about lack of RSA or DSA support

+ +

+Ensure that your OpenSSL libraries have been built to include RSA or DSA +support either internally or through RSAref. + + +

3.7 - "scp: command not found" errors

+ +

+scp(1) +must be in the default PATH on both the client and the server. You may +need to use the --with-default-path option to specify a custom +path to search on the server. This option replaces the default path, +so you need to specify all the current directories on your path as well +as where you have installed scp. For example: + +

+ + + + +
+$ ./configure --with-default-path=/bin:/usr/bin:/usr/local/bin:/path/to/scp +
+
+ +

+Note that configuration by the server's admin will take precedence over the +setting of --with-default-path. This includes resetting PATH in +/etc/profile, PATH in /etc/environment on AIX, or (for 3.7p1 and +above) setting PATH or SUPATH in /etc/default/login on Solaris or +Reliant Unix. + +

3.8 - Unable to read passphrase

+ +

+Some operating systems set /dev/tty with incorrect modes, causing +the reading of passwords to fail with the following error: + +

+ + + + +
+You have no controlling tty. Cannot read passphrase. +
+
+ +

+The solution to this is to reset the permissions on /dev/tty +to mode 0666 and report the error as a bug to your OS vendor. + + +

3.9 - 'configure' missing or make fails

+ +

+If there is no 'configure' file in the tar.gz file that you downloaded +or make fails with "missing separator" errors, you have probably +downloaded the OpenBSD distribution of OpenSSH and are attempting to +compile it on another platform. Please refer to the information on the +portable version. + + +

3.10 - Hangs when exiting ssh

+ +

+OpenSSH may hang when exiting. This can occur when there is an active +background process. This is known to occur on Linux and HP-UX. +The problem can be verified by doing the following: + +

+ + + + +
+$ sleep 20 & exit +
+
+ +Try to use this instead: +
+ + + + +
+$ sleep 20 < /dev/null > /dev/null 2>&1 & +
+
+ +

+A work around for bash users is to place "shopt -s huponexit" +in either /etc/bashrc or ~/.bashrc. Otherwise, consult your shell's +man page for an option to enable it to send a HUP signal to active +jobs when exiting. See bug #52 +for other workarounds. + +

3.11 - Why does ssh hang on exit?

+ +

+When executing +

+ + + + +
+$ ssh host command +
+
+ssh needs to hang, because it needs to wait: +
    +
  • +until it can be sure that command does not need +more input. +
  • +until it can be sure that command does not produce +more output. +
  • +until command exits because sshd needs to tell +the exit status from command to ssh. +
+

+ +

3.12 - I upgraded to OpenSSH 3.1 and X11 +forwarding stopped working.

+ +Starting with OpenSSH 3.1, the sshd x11 forwarding server listens on +localhost by default; see the sshd X11UseLocalhost option to +revert to prior behaviour if your older X11 clients do not function +with this configuration.

+ +In general, X11 clients using X11 R6 should work with the default +setting. Some vendors, including HP, ship X11 clients with R6 +and R5 libs, so some clients will work, and others will not work. +This is true for HP-UX 11.X.

+ +

3.13 - I upgraded to OpenSSH 3.8 and some +X11 programs stopped working.

+ +

+As documented in the 3.8 release notes, +ssh will now use untrusted X11 cookies by +default. The previous behaviour can be restored by setting +ForwardX11Trusted yes in ssh_config. + +

+Possible symptoms include:
+BadWindow (invalid Window parameter)
+BadAccess (attempt to access private resource denied)
+X Error of failed request: BadAtom (invalid Atom parameter)
+Major opcode of failed request: 20 (X_GetProperty)
+ +

3.14 - I copied my public key to authorized_keys +but public-key authentication still doesn't work.

+ +

+Typically this is caused by the file permissions on $HOME, $HOME/.ssh or +$HOME/.ssh/authorized_keys being more permissive than sshd allows by default. + +

+In this case, it can be solved by executing the following on the server. +

+ + + + +
+$ chmod go-w $HOME $HOME/.ssh
+$ chmod 600 $HOME/.ssh/authorized_keys
+$ chown `whoami` $HOME/.ssh/authorized_keys
+
+
+ +

+If this is not possible for some reason, an alternative is to set +StrictModes no in sshd_config, however this is not +recommended. + +

3.15 - OpenSSH versions and PAM behaviour.

+ +Portable OpenSSH has a configure-time option to enable sshd's use of the +PAM +(Pluggable Authentication Modules) interface. + +
+ + + + +
+./configure --with-pam [options] +
+
+ +To use PAM at all, this option must be provided at build time. +The run-time behaviour when PAM is built in varies with the version of +Portable OpenSSH, and on later versions it must also be enabled by setting +UsePAM to yes in sshd_config. + +

+The behaviour of the relevant authentications options when PAM support is built +in is summarised by the following table. + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Version UsePAM PasswordAuthentication ChallengeResponseAuthentication
<=3.6.1p2Not applicableUses PAMUses PAM if PAMAuthenticationViaKbdInt is enabled
3.7p1 - 3.7.1p1Defaults to yesDoes not use PAMUses PAM if UsePAM is enabled
3.7.1p2 - 3.8.1p1Defaults to noDoes not use PAM [1]Uses PAM if UsePAM is enabled
3.9p1Defaults to noUses PAM if UsePAM is enabledUses PAM if UsePAM is enabled
+

+ +[1] Some vendors, notably Redhat/Fedora, have +backported the PasswordAuthentication from 3.9p1 to their 3.8x based +packages. If you're using a vendor-supplied package then consult their +documentation. + +

+OpenSSH Portable's PAM interface still has problems with a few modules, +however we hope that this number will reduce in the future. As at the +3.9p1 release, the known problems are: + +

    +
  • Modules relying on module-private data (eg pam_dhkeys, pam_krb5, AFS) + may fail to correctly establish credentials (bug #688) when + authenticating via ChallengeResponseAuthentication. + PasswordAuthentication with 3.9p1 and above should work. +
+ +You can also check bugzilla for current PAM issues. + +

3.16 - Why doesn't "w" or "who" on AIX 5.x show users +logged in via ssh?

+ +Between AIX 4.3.3 and AIX 5.x, the format of the wtmp struct changed. This +means that sshd binaries built on AIX 4.x will not correctly write wtmp +entries when run on AIX 5.x. This can be fixed by simply recompiling +sshd on an AIX 5.x system and using that. + +
+OpenSSH +www@openbsd.org +
+$OpenBSD: faq.html,v 1.113 2012/04/21 12:12:22 dtucker Exp $ + + + diff --git a/debian/gnome-ssh-askpass.1 b/debian/gnome-ssh-askpass.1 new file mode 100644 index 0000000..b74c410 --- /dev/null +++ b/debian/gnome-ssh-askpass.1 @@ -0,0 +1,51 @@ +.TH GNOME-SSH-ASKPASS 1 +.SH NAME +gnome\-ssh\-askpass \- prompts a user for a passphrase using GNOME +.SH SYNOPSIS +.B gnome\-ssh\-askpass +.SH DESCRIPTION +.B gnome\-ssh\-askpass +is a GNOME-based passphrase dialog for use with OpenSSH. +It is intended to be called by the +.BR ssh\-add (1) +program and not invoked directly. +It allows +.BR ssh\-add (1) +to obtain a passphrase from a user, even if not connected to a terminal +(assuming that an X display is available). +This happens automatically in the case where +.B ssh\-add +is invoked from one's +.B ~/.xsession +or as one of the GNOME startup programs, for example. +.PP +In order to be called automatically by +.BR ssh\-add , +.B gnome\-ssh\-askpass +should be installed as +.IR /usr/bin/ssh\-askpass . +.SH "ENVIRONMENT VARIABLES" +The following environment variables are recognized: +.TP +.I GNOME_SSH_ASKPASS_GRAB_SERVER +Causes +.B gnome\-ssh\-askpass +to grab the X server before asking for a passphrase. +.TP +.I GNOME_SSH_ASKPASS_GRAB_POINTER +Causes +.B gnome\-ssh\-askpass +to grab the mouse pointer using +.IR gdk_pointer_grab () +before asking for a passphrase. +.PP +Regardless of whether either of these environment variables is set, +.B gnome\-ssh\-askpass +will grab the keyboard using +.IR gdk_keyboard_grab (). +.SH AUTHOR +This manual page was written by Colin Watson +for the Debian system (but may be used by others). +It was based on that for +.B x11\-ssh\-askpass +by Philip Hands. diff --git a/debian/keygen-test/Makefile b/debian/keygen-test/Makefile new file mode 100644 index 0000000..666ed82 --- /dev/null +++ b/debian/keygen-test/Makefile @@ -0,0 +1,12 @@ +test: getpid.so + chmod +x keygen-test + ./keygen-test + +getpid.o: getpid.c + gcc -fPIC -c $< -o $@ + +getpid.so: getpid.o + gcc -shared -o $@ $< + +clean: + rm -f getpid.o getpid.so key1 key1.pub key2 key2.pub diff --git a/debian/keygen-test/getpid.c b/debian/keygen-test/getpid.c new file mode 100644 index 0000000..c9e35b8 --- /dev/null +++ b/debian/keygen-test/getpid.c @@ -0,0 +1,39 @@ +/* + * Compile: + +gcc -fPIC -c getpid.c -o getpid.o +gcc -shared -o getpid.so getpid.o + + * Use: + +FORCE_PID=1234 LD_PRELOAD=./getpid.so bash + +# +# Copyright (C) 2001-2008 Kees Cook +# kees@outflux.net, http://outflux.net/ +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# http://www.gnu.org/copyleft/gpl.html + +*/ + +#include +#include +#include + +pid_t getpid(void) +{ + return atoi(getenv("FORCE_PID")); +} diff --git a/debian/keygen-test/keygen-test b/debian/keygen-test/keygen-test new file mode 100755 index 0000000..2abe815 --- /dev/null +++ b/debian/keygen-test/keygen-test @@ -0,0 +1,12 @@ +#! /bin/sh + +rm -f key1 key1.pub key2 key2.pub +LD_PRELOAD="$(pwd)/getpid.so" FORCE_PID=1234 \ + ../build-deb/ssh-keygen -N '' -f key1 >/dev/null +LD_PRELOAD="$(pwd)/getpid.so" FORCE_PID=1234 \ + ../build-deb/ssh-keygen -N '' -f key2 >/dev/null +if cmp -s key1 key2; then + echo "Generated two identical keys!" >&2 + exit 1 +fi +exit 0 diff --git a/debian/openssh-client-udeb.install b/debian/openssh-client-udeb.install new file mode 100644 index 0000000..b3891f0 --- /dev/null +++ b/debian/openssh-client-udeb.install @@ -0,0 +1,3 @@ +scp usr/bin +sftp usr/bin +ssh usr/bin diff --git a/debian/openssh-client.apport b/debian/openssh-client.apport new file mode 100644 index 0000000..e10ca2f --- /dev/null +++ b/debian/openssh-client.apport @@ -0,0 +1,35 @@ +'''apport hook for openssh-client + +(c) 2010 Canonical Ltd. +Author: Chuck Short + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. See http://www.gnu.org/copyleft/gpl.html for +the full text of the license. +''' + +from apport.hookutils import ( + attach_conffiles, + attach_related_packages, + command_output, +) + + +def add_info(report, ui): + response = ui.yesno("The contents of your /etc/ssh/ssh_config file " + "may help developers diagnose your bug more " + "quickly. However, it may contain sensitive " + "information. Do you want to include it in your " + "bug report?") + + if response == None: # user cancelled + raise StopIteration + + elif response: + attach_conffiles(report, 'openssh-client') + + attach_related_packages(report, + ['ssh-askpass', 'libpam-ssh', 'keychain', 'ssh-askpass-gnome']) + report['SSHClientVersion'] = command_output(['/usr/bin/ssh', '-V']) diff --git a/debian/openssh-client.dirs b/debian/openssh-client.dirs new file mode 100644 index 0000000..c39cb76 --- /dev/null +++ b/debian/openssh-client.dirs @@ -0,0 +1 @@ +etc/ssh/ssh_config.d diff --git a/debian/openssh-client.docs b/debian/openssh-client.docs new file mode 100644 index 0000000..11aa994 --- /dev/null +++ b/debian/openssh-client.docs @@ -0,0 +1,5 @@ +OVERVIEW +README +README.dns +README.tun +debian/faq.html diff --git a/debian/openssh-client.install b/debian/openssh-client.install new file mode 100755 index 0000000..96c8dea --- /dev/null +++ b/debian/openssh-client.install @@ -0,0 +1,36 @@ +#! /usr/bin/dh-exec + +etc/ssh/ssh_config +usr/bin/scp +usr/bin/sftp +usr/bin/ssh +usr/bin/ssh-add +usr/bin/ssh-agent +usr/bin/ssh-keygen +usr/bin/ssh-keyscan +usr/lib/openssh/ssh-keysign +usr/lib/openssh/ssh-pkcs11-helper +usr/lib/openssh/ssh-sk-helper +usr/share/man/man1/scp.1 +usr/share/man/man1/sftp.1 +usr/share/man/man1/ssh-add.1 +usr/share/man/man1/ssh-agent.1 +usr/share/man/man1/ssh-keygen.1 +usr/share/man/man1/ssh-keyscan.1 +usr/share/man/man1/ssh.1 +usr/share/man/man5/ssh_config.5 +usr/share/man/man8/ssh-keysign.8 +usr/share/man/man8/ssh-pkcs11-helper.8 +usr/share/man/man8/ssh-sk-helper.8 + +contrib/ssh-copy-id usr/bin +debian/ssh-argv0 usr/bin + +debian/agent-launch usr/lib/openssh + +# dh_apport would be neater, but at the time of writing it isn't in unstable +# yet. +debian/openssh-client.apport => usr/share/apport/package-hooks/openssh-client.py + +# systemd user unit (only used under sessions) +debian/systemd/ssh-agent.service usr/lib/systemd/user diff --git a/debian/openssh-client.links b/debian/openssh-client.links new file mode 100644 index 0000000..1d94c74 --- /dev/null +++ b/debian/openssh-client.links @@ -0,0 +1,4 @@ +usr/bin/ssh usr/bin/slogin +usr/share/man/man1/ssh.1 usr/share/man/man1/slogin.1 +# enable systemd user unit for graphical sessions that use systemd +usr/lib/systemd/user/ssh-agent.service usr/lib/systemd/user/graphical-session-pre.target.wants/ssh-agent.service diff --git a/debian/openssh-client.lintian-overrides b/debian/openssh-client.lintian-overrides new file mode 100644 index 0000000..4865677 --- /dev/null +++ b/debian/openssh-client.lintian-overrides @@ -0,0 +1 @@ +openssh-client: setuid-binary usr/lib/openssh/ssh-keysign 4755 root/root diff --git a/debian/openssh-client.maintscript b/debian/openssh-client.maintscript new file mode 100644 index 0000000..e39db9a --- /dev/null +++ b/debian/openssh-client.maintscript @@ -0,0 +1 @@ +rm_conffile /etc/ssh/moduli 1:7.9p1-8~ diff --git a/debian/openssh-client.manpages b/debian/openssh-client.manpages new file mode 100644 index 0000000..690bd8a --- /dev/null +++ b/debian/openssh-client.manpages @@ -0,0 +1,2 @@ +contrib/ssh-copy-id.1 +debian/ssh-argv0.1 diff --git a/debian/openssh-client.postinst b/debian/openssh-client.postinst new file mode 100644 index 0000000..cf046ed --- /dev/null +++ b/debian/openssh-client.postinst @@ -0,0 +1,44 @@ +#!/bin/sh +set -e + +action="$1" + +umask 022 + + +create_alternatives() { +# Create alternatives for the various r* tools. +# Make sure we don't change existing alternatives that a user might have +# changed, but clean up after some old alternatives that mistakenly pointed +# rlogin and rcp to ssh. + update-alternatives --quiet --remove rlogin /usr/bin/ssh + update-alternatives --quiet --remove rcp /usr/bin/ssh + for cmd in rsh rlogin rcp; do + scmd="s${cmd#r}" + if ! update-alternatives --display "$cmd" 2>/dev/null | \ + grep -q "$scmd"; then + update-alternatives --quiet --install "/usr/bin/$cmd" "$cmd" "/usr/bin/$scmd" 20 \ + --slave "/usr/share/man/man1/$cmd.1.gz" "$cmd.1.gz" "/usr/share/man/man1/$scmd.1.gz" + fi + done +} + +set_ssh_agent_permissions() { + if ! getent group ssh >/dev/null; then + addgroup --system --quiet ssh + fi + if ! dpkg-statoverride --list /usr/bin/ssh-agent >/dev/null; then + chgrp ssh /usr/bin/ssh-agent + chmod 2755 /usr/bin/ssh-agent + fi +} + + +if [ "$action" = configure ]; then + create_alternatives + set_ssh_agent_permissions +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/openssh-client.postrm b/debian/openssh-client.postrm new file mode 100644 index 0000000..12fb367 --- /dev/null +++ b/debian/openssh-client.postrm @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +case $1 in + purge) + # Remove all non-conffiles that ssh might create, so that we + # can smoothly remove /etc/ssh if and only if the user + # hasn't dropped some other files in there. Conffiles have + # already been removed at this point. + rm -f /etc/ssh/moduli /etc/ssh/primes + rm -f /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 + [ ! -d /etc/ssh ] || rmdir --ignore-fail-on-non-empty /etc/ssh + + if which delgroup >/dev/null 2>&1; then + delgroup --quiet ssh > /dev/null || true + fi + ;; +esac + +exit 0 diff --git a/debian/openssh-client.prerm b/debian/openssh-client.prerm new file mode 100644 index 0000000..2d631cb --- /dev/null +++ b/debian/openssh-client.prerm @@ -0,0 +1,39 @@ +#! /bin/sh +# prerm script for ssh +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + remove|deconfigure) + update-alternatives --quiet --remove rsh /usr/bin/ssh + update-alternatives --quiet --remove rlogin /usr/bin/slogin + update-alternatives --quiet --remove rcp /usr/bin/scp + ;; + upgrade) + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/openssh-server-udeb.dirs b/debian/openssh-server-udeb.dirs new file mode 100644 index 0000000..e730fc4 --- /dev/null +++ b/debian/openssh-server-udeb.dirs @@ -0,0 +1 @@ +run/sshd diff --git a/debian/openssh-server-udeb.install b/debian/openssh-server-udeb.install new file mode 100644 index 0000000..05ccbf7 --- /dev/null +++ b/debian/openssh-server-udeb.install @@ -0,0 +1,2 @@ +sshd usr/sbin +ssh-keygen usr/bin diff --git a/debian/openssh-server.apport b/debian/openssh-server.apport new file mode 100644 index 0000000..aa853b5 --- /dev/null +++ b/debian/openssh-server.apport @@ -0,0 +1,27 @@ +'''apport hook for openssh-server + +(c) 2010 Canonical Ltd. +Author: Chuck Short + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. See http://www.gnu.org/copyleft/gpl.html for +the full text of the license. +''' + +from apport.hookutils import root_command_output + + +def add_info(report, ui): + response = ui.yesno("The contents of your /etc/ssh/sshd_config file " + "may help developers diagnose your bug more " + "quickly. However, it may contain sensitive " + "information. Do you want to include it in your " + "bug report?") + + if response == None: # user cancelled + raise StopIteration + + elif response: + report['SSHDConfig'] = root_command_output(['/usr/sbin/sshd', '-T']) diff --git a/debian/openssh-server.config b/debian/openssh-server.config new file mode 100644 index 0000000..4a66a35 --- /dev/null +++ b/debian/openssh-server.config @@ -0,0 +1,46 @@ +#! /bin/sh +set -e + +. /usr/share/debconf/confmodule +db_version 2.0 + +get_config_option() { + option="$1" + + [ -f /etc/ssh/sshd_config ] || return + + # TODO: actually only one '=' allowed after option + perl -lne ' + s/[[:space:]]+/ /g; s/[[:space:]]+$//; + print if s/^[[:space:]]*'"$option"'[[:space:]=]+//i' \ + /etc/ssh/sshd_config 2>/dev/null +} + +permit_root_login="$(get_config_option PermitRootLogin)" || true +password_authentication="$(get_config_option PasswordAuthentication)" || true +if [ -f /etc/ssh/sshd_config ]; then + # Make sure the debconf database is in sync with the current state + # of the system. + if [ "$permit_root_login" = yes ]; then + db_set openssh-server/permit-root-login false + else + db_set openssh-server/permit-root-login true + fi + if [ "$password_authentication" = no ]; then + db_set openssh-server/password-authentication false + else + db_set openssh-server/password-authentication true + fi +fi + +if dpkg --compare-versions "$2" lt-nl 1:6.6p1-1 && \ + [ "$permit_root_login" = yes ]; then + if [ "$(getent shadow root | cut -d: -f2)" = "!" ]; then + db_set openssh-server/permit-root-login true + else + db_input high openssh-server/permit-root-login || true + db_go + fi +fi + +exit 0 diff --git a/debian/openssh-server.dirs b/debian/openssh-server.dirs new file mode 100644 index 0000000..6639eca --- /dev/null +++ b/debian/openssh-server.dirs @@ -0,0 +1 @@ +etc/ssh/sshd_config.d diff --git a/debian/openssh-server.examples b/debian/openssh-server.examples new file mode 100644 index 0000000..9f15e1f --- /dev/null +++ b/debian/openssh-server.examples @@ -0,0 +1 @@ +debian/systemd/ssh-session-cleanup.service diff --git a/debian/openssh-server.install b/debian/openssh-server.install new file mode 100755 index 0000000..29e7abc --- /dev/null +++ b/debian/openssh-server.install @@ -0,0 +1,21 @@ +#! /usr/bin/dh-exec + +etc/ssh/moduli +usr/sbin/sshd +usr/share/man/man5/authorized_keys.5 +usr/share/man/man5/moduli.5 +usr/share/man/man5/sshd_config.5 +usr/share/man/man8/sshd.8 + +sshd_config => usr/share/openssh/sshd_config +debian/openssh-server.ucf-md5sum => usr/share/openssh/sshd_config.md5sum + +debian/openssh-server.ufw.profile => etc/ufw/applications.d/openssh-server +debian/systemd/ssh.socket lib/systemd/system +debian/systemd/rescue-ssh.target lib/systemd/system +debian/systemd/ssh@.service lib/systemd/system +debian/systemd/ssh-session-cleanup usr/lib/openssh + +# dh_apport would be neater, but at the time of writing it isn't in unstable +# yet. +debian/openssh-server.apport => usr/share/apport/package-hooks/openssh-server.py diff --git a/debian/openssh-server.links b/debian/openssh-server.links new file mode 100644 index 0000000..e69de29 diff --git a/debian/openssh-server.maintscript b/debian/openssh-server.maintscript new file mode 100644 index 0000000..c721fdb --- /dev/null +++ b/debian/openssh-server.maintscript @@ -0,0 +1,3 @@ +mv_conffile /etc/pam.d/ssh /etc/pam.d/sshd 1:4.7p1-4~ +rm_conffile /etc/init/ssh.conf 1:7.5p1-6~ +rm_conffile /etc/network/if-up.d/openssh-server 1:7.9p1-1~ diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst new file mode 100644 index 0000000..f45f585 --- /dev/null +++ b/debian/openssh-server.postinst @@ -0,0 +1,166 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule +db_version 2.0 + +action="$1" + +umask 022 + + +get_config_option() { + option="$1" + + [ -f /etc/ssh/sshd_config ] || return + + # TODO: actually only one '=' allowed after option + perl -lne ' + s/[[:space:]]+/ /g; s/[[:space:]]+$//; + print if s/^[[:space:]]*'"$option"'[[:space:]=]+//i' \ + /etc/ssh/sshd_config +} + + +host_keys_required() { + hostkeys="$(get_config_option HostKey)" + if [ "$hostkeys" ]; then + echo "$hostkeys" + else + # No HostKey directives at all, so the server picks some + # defaults. + echo /etc/ssh/ssh_host_rsa_key + echo /etc/ssh/ssh_host_ecdsa_key + echo /etc/ssh/ssh_host_ed25519_key + fi +} + + +create_key() { + msg="$1" + shift + hostkeys="$1" + shift + file="$1" + shift + + if echo "$hostkeys" | grep -x "$file" >/dev/null && \ + [ ! -f "$file" ] ; then + printf %s "$msg" + ssh-keygen -q -f "$file" -N '' "$@" + echo + if which restorecon >/dev/null 2>&1; then + restorecon "$file" "$file.pub" + fi + ssh-keygen -l -f "$file.pub" + fi +} + + +create_keys() { + hostkeys="$(host_keys_required)" + + create_key "Creating SSH2 RSA key; this may take some time ..." \ + "$hostkeys" /etc/ssh/ssh_host_rsa_key -t rsa + create_key "Creating SSH2 DSA key; this may take some time ..." \ + "$hostkeys" /etc/ssh/ssh_host_dsa_key -t dsa + create_key "Creating SSH2 ECDSA key; this may take some time ..." \ + "$hostkeys" /etc/ssh/ssh_host_ecdsa_key -t ecdsa + create_key "Creating SSH2 ED25519 key; this may take some time ..." \ + "$hostkeys" /etc/ssh/ssh_host_ed25519_key -t ed25519 +} + + +new_config= + +cleanup() { + if [ "$new_config" ]; then + rm -f "$new_config" + fi +} + + +create_sshdconfig() { + # XXX cjwatson 2016-12-24: This debconf template is very confusingly + # named; its description is "Disable SSH password authentication for + # root?", so true -> prohibit-password (the upstream default), + # false -> yes. + db_get openssh-server/permit-root-login + permit_root_login="$RET" + db_get openssh-server/password-authentication + password_authentication="$RET" + + trap cleanup EXIT + new_config="$(mktemp)" + cp -a /usr/share/openssh/sshd_config "$new_config" + if [ "$permit_root_login" != true ]; then + sed -i 's/^#*PermitRootLogin .*/PermitRootLogin yes/' \ + "$new_config" + fi + if [ "$password_authentication" != true ]; then + sed -i 's/^#PasswordAuthentication .*/PasswordAuthentication no/' \ + "$new_config" + fi + mkdir -p /etc/ssh + ucf --three-way --debconf-ok \ + --sum-file /usr/share/openssh/sshd_config.md5sum \ + "$new_config" /etc/ssh/sshd_config + ucfr openssh-server /etc/ssh/sshd_config +} + +fix_statoverride() { +# Remove an erronous override for sshd (we should have overridden ssh) + if dpkg-statoverride --list /usr/sbin/sshd >/dev/null; then + dpkg-statoverride --remove /usr/sbin/sshd + fi +} + +setup_sshd_user() { + if ! getent passwd sshd >/dev/null; then + adduser --quiet --system --no-create-home --home /run/sshd --shell /usr/sbin/nologin sshd + fi +} + +if [ "$action" = configure ]; then + create_sshdconfig + create_keys + fix_statoverride + setup_sshd_user + # Renamed to /etc/ssh/moduli in 2.9.9 (!) + if dpkg --compare-versions "$2" lt-nl 1:4.7p1-1; then + rm -f /etc/ssh/primes + fi + if dpkg --compare-versions "$2" lt-nl 1:5.5p1-6; then + rm -f /run/sshd/.placeholder + fi + if dpkg --compare-versions "$2" lt-nl 1:6.5p1-2 && \ + deb-systemd-helper debian-installed ssh.socket && \ + deb-systemd-helper --quiet was-enabled ssh.service && \ + deb-systemd-helper --quiet was-enabled ssh.socket; then + # 1:6.5p1-1 mistakenly left both ssh.service and ssh.socket + # enabled. + deb-systemd-helper disable ssh.socket >/dev/null || true + fi + if dpkg --compare-versions "$2" lt-nl 1:6.5p1-3 && \ + [ -d /run/systemd/system ]; then + # We must stop the sysvinit-controlled sshd before we can + # restart it under systemd. + start-stop-daemon --stop --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd || true + fi + if dpkg --compare-versions "$2" lt-nl 1:7.9p1-5 && \ + [ -f /etc/ssh/moduli.dpkg-bak ]; then + # Handle /etc/ssh/moduli being moved from openssh-client to + # openssh-server. If there were no user modifications, then we + # don't need to do anything special here; but if there were, + # then the dpkg-maintscript-helper calls from openssh-client's + # maintainer scripts will have saved the old file as .dpkg-bak, + # which we now move back into place. + mv /etc/ssh/moduli.dpkg-bak /etc/ssh/moduli + fi +fi + +#DEBHELPER# + +db_stop + +exit 0 diff --git a/debian/openssh-server.postrm b/debian/openssh-server.postrm new file mode 100644 index 0000000..4a716f5 --- /dev/null +++ b/debian/openssh-server.postrm @@ -0,0 +1,35 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +case $1 in + purge) + # Remove all non-conffiles that ssh might create, so that we + # can smoothly remove /etc/ssh if and only if the user + # hasn't dropped some other files in there. Conffiles have + # already been removed at this point. + rm -f /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.pub + rm -f /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_rsa_key.pub + rm -f /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_dsa_key.pub + rm -f /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ecdsa_key.pub + rm -f /etc/ssh/ssh_host_ed25519_key /etc/ssh/ssh_host_ed25519_key.pub + for ext in .ucf-new .ucf-old .ucf-dist ""; do + rm -f "/etc/ssh/sshd_config$ext" + done + if which ucf >/dev/null 2>&1; then + ucf --purge /etc/ssh/sshd_config + fi + if which ucfr >/dev/null 2>&1; then + ucfr --purge openssh-server /etc/ssh/sshd_config + fi + rm -f /etc/ssh/sshd_not_to_be_run + [ ! -d /etc/ssh ] || rmdir --ignore-fail-on-non-empty /etc/ssh + + if which deluser >/dev/null 2>&1; then + deluser --quiet sshd > /dev/null || true + fi + ;; +esac + +exit 0 diff --git a/debian/openssh-server.preinst b/debian/openssh-server.preinst new file mode 100644 index 0000000..f5b7512 --- /dev/null +++ b/debian/openssh-server.preinst @@ -0,0 +1,18 @@ +#!/bin/sh +set -e + +action=$1 +version=$2 + +if [ "$action" = upgrade ] || [ "$action" = install ] +then + if dpkg --compare-versions "$version" lt 1:5.5p1-6 && \ + [ -d /run/sshd ]; then + # make sure /run/sshd is not removed on upgrades + touch /run/sshd/.placeholder + fi +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/openssh-server.runit b/debian/openssh-server.runit new file mode 100644 index 0000000..cb659a0 --- /dev/null +++ b/debian/openssh-server.runit @@ -0,0 +1 @@ +debian/openssh-server.ssh.runscript logscript,name=ssh,since=1:8.0p1-5 diff --git a/debian/openssh-server.ssh.default b/debian/openssh-server.ssh.default new file mode 100644 index 0000000..3040422 --- /dev/null +++ b/debian/openssh-server.ssh.default @@ -0,0 +1,5 @@ +# Default settings for openssh-server. This file is sourced by /bin/sh from +# /etc/init.d/ssh. + +# Options to pass to sshd +SSHD_OPTS= diff --git a/debian/openssh-server.ssh.init b/debian/openssh-server.ssh.init new file mode 100755 index 0000000..4f0fb10 --- /dev/null +++ b/debian/openssh-server.ssh.init @@ -0,0 +1,166 @@ +#! /bin/sh + +### BEGIN INIT INFO +# Provides: sshd +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: +# Short-Description: OpenBSD Secure Shell server +### END INIT INFO + +set -e + +# /etc/init.d/ssh: start and stop the OpenBSD "secure shell(tm)" daemon + +test -x /usr/sbin/sshd || exit 0 +( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0 + +umask 022 + +if test -f /etc/default/ssh; then + . /etc/default/ssh +fi + +. /lib/lsb/init-functions + +if [ -n "$2" ]; then + SSHD_OPTS="$SSHD_OPTS $2" +fi + +# Are we running from init? +run_by_init() { + ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ] +} + +check_for_no_start() { + # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists + if [ -e /etc/ssh/sshd_not_to_be_run ]; then + if [ "$1" = log_end_msg ]; then + log_end_msg 0 || true + fi + if ! run_by_init; then + log_action_msg "OpenBSD Secure Shell server not in use (/etc/ssh/sshd_not_to_be_run)" || true + fi + exit 0 + fi +} + +check_dev_null() { + if [ ! -c /dev/null ]; then + if [ "$1" = log_end_msg ]; then + log_end_msg 1 || true + fi + if ! run_by_init; then + log_action_msg "/dev/null is not a character device!" || true + fi + exit 1 + fi +} + +check_privsep_dir() { + # Create the PrivSep empty dir if necessary + if [ ! -d /run/sshd ]; then + mkdir /run/sshd + chmod 0755 /run/sshd + fi +} + +check_config() { + if [ ! -e /etc/ssh/sshd_not_to_be_run ]; then + # shellcheck disable=SC2086 + /usr/sbin/sshd $SSHD_OPTS -t || exit 1 + fi +} + +export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" + +case "$1" in + start) + check_privsep_dir + check_for_no_start + check_dev_null + log_daemon_msg "Starting OpenBSD Secure Shell server" "sshd" || true + # shellcheck disable=SC2086 + if start-stop-daemon --start --quiet --oknodo --chuid 0:0 --pidfile /run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then + log_end_msg 0 || true + else + log_end_msg 1 || true + fi + ;; + stop) + log_daemon_msg "Stopping OpenBSD Secure Shell server" "sshd" || true + if start-stop-daemon --stop --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd; then + log_end_msg 0 || true + else + log_end_msg 1 || true + fi + ;; + + reload|force-reload) + check_for_no_start + check_config + log_daemon_msg "Reloading OpenBSD Secure Shell server's configuration" "sshd" || true + if start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile /run/sshd.pid --exec /usr/sbin/sshd; then + log_end_msg 0 || true + else + log_end_msg 1 || true + fi + ;; + + restart) + check_privsep_dir + check_config + log_daemon_msg "Restarting OpenBSD Secure Shell server" "sshd" || true + start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile /run/sshd.pid --exec /usr/sbin/sshd + check_for_no_start log_end_msg + check_dev_null log_end_msg + # shellcheck disable=SC2086 + if start-stop-daemon --start --quiet --oknodo --chuid 0:0 --pidfile /run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then + log_end_msg 0 || true + else + log_end_msg 1 || true + fi + ;; + + try-restart) + check_privsep_dir + check_config + log_daemon_msg "Restarting OpenBSD Secure Shell server" "sshd" || true + RET=0 + start-stop-daemon --stop --quiet --retry 30 --pidfile /run/sshd.pid --exec /usr/sbin/sshd || RET="$?" + case $RET in + 0) + # old daemon stopped + check_for_no_start log_end_msg + check_dev_null log_end_msg + # shellcheck disable=SC2086 + if start-stop-daemon --start --quiet --oknodo --chuid 0:0 --pidfile /run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then + log_end_msg 0 || true + else + log_end_msg 1 || true + fi + ;; + 1) + # daemon not running + log_progress_msg "(not running)" || true + log_end_msg 0 || true + ;; + *) + # failed to stop + log_progress_msg "(failed to stop)" || true + log_end_msg 1 || true + ;; + esac + ;; + + status) + status_of_proc -p /run/sshd.pid /usr/sbin/sshd sshd && exit 0 || exit $? + ;; + + *) + log_action_msg "Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart|try-restart|status}" || true + exit 1 +esac + +exit 0 diff --git a/debian/openssh-server.ssh.runscript/finish b/debian/openssh-server.ssh.runscript/finish new file mode 100644 index 0000000..8c67acf --- /dev/null +++ b/debian/openssh-server.ssh.runscript/finish @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +NAME=ssh + +[ "$1" = -1 ] && echo "runsv: ERROR in $NAME: unexpected error or wrong sh syntax" +# no need to stop the service here, runsv will stop trying after the first attempt + +[ "$1" = 161 ] && echo "runsv: ERROR $1 in $NAME: disabled by local settings" \ + && sv d "$(dirname "$0")" && exit 0 + +[ "$1" = 162 ] && echo "runsv: ERROR $1 in $NAME: configtest or early setup failed" \ + && sv d "$(dirname "$0")" && exit 0 + +echo "$NAME Stopped" + diff --git a/debian/openssh-server.ssh.runscript/run b/debian/openssh-server.ssh.runscript/run new file mode 100644 index 0000000..1d05245 --- /dev/null +++ b/debian/openssh-server.ssh.runscript/run @@ -0,0 +1,20 @@ +#!/usr/bin/env /lib/runit/invoke-run +set -e + +NAME="ssh" + +sv start auditd || sv check auditd || true + +# don't start if 'sshd_not_to_be_run' exists +test -e /etc/ssh/sshd_not_to_be_run && exit 161 + +#Create /run/sshd +test -d /run/sshd || mkdir /run/sshd && chmod 0755 /run/sshd + +exec 2>&1 + +#Config test +/usr/sbin/sshd -t || exit 162 + +echo "Starting $NAME..." +exec /usr/sbin/sshd -D -e $SSHD_OPTS diff --git a/debian/openssh-server.ssh.service b/debian/openssh-server.ssh.service new file mode 120000 index 0000000..6094572 --- /dev/null +++ b/debian/openssh-server.ssh.service @@ -0,0 +1 @@ +systemd/ssh.service \ No newline at end of file diff --git a/debian/openssh-server.sshd.pam.in b/debian/openssh-server.sshd.pam.in new file mode 100644 index 0000000..2cad67d --- /dev/null +++ b/debian/openssh-server.sshd.pam.in @@ -0,0 +1,55 @@ +# PAM configuration for the Secure Shell service + +# Standard Un*x authentication. +@include common-auth + +# Disallow non-root logins when /etc/nologin exists. +account required pam_nologin.so + +# Uncomment and edit /etc/security/access.conf if you need to set complex +# access limits that are hard to express in sshd_config. +# account required pam_access.so + +# Standard Un*x authorization. +@include common-account + +# SELinux needs to be the first session rule. This ensures that any +# lingering context has been cleared. Without this it is possible that a +# module could execute code in the wrong domain. +session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close + +# Set the loginuid process attribute. +session required pam_loginuid.so + +@IF_KEYINIT@# Create a new session keyring. +@IF_KEYINIT@session optional pam_keyinit.so force revoke + +# Standard Un*x session setup and teardown. +@include common-session + +# Print the message of the day upon successful login. +# This includes a dynamically generated part from /run/motd.dynamic +# and a static (admin-editable) part from /etc/motd. +session optional pam_motd.so motd=/run/motd.dynamic +session optional pam_motd.so noupdate + +# Print the status of the user's mailbox upon successful login. +session optional pam_mail.so standard noenv # [1] + +# Set up user limits from /etc/security/limits.conf. +session required pam_limits.so + +# Read environment variables from /etc/environment and +# /etc/security/pam_env.conf. +session required pam_env.so # [1] +# In Debian 4.0 (etch), locale-related environment variables were moved to +# /etc/default/locale, so read that as well. +session required pam_env.so user_readenv=1 envfile=/etc/default/locale + +# SELinux needs to intervene at login time to ensure that the process starts +# in the proper default security context. Only sessions which are intended +# to run in the user's context should be run after this. +session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open + +# Standard Un*x password updating. +@include common-password diff --git a/debian/openssh-server.templates b/debian/openssh-server.templates new file mode 100644 index 0000000..e071fe3 --- /dev/null +++ b/debian/openssh-server.templates @@ -0,0 +1,23 @@ +Template: openssh-server/permit-root-login +Type: boolean +Default: true +_Description: Disable SSH password authentication for root? + Previous versions of openssh-server permitted logging in as root over SSH + using password authentication. The default for new installations is now + "PermitRootLogin prohibit-password", which disables password authentication + for root without breaking systems that have explicitly configured SSH + public key authentication for root. + . + This change makes systems more secure against brute-force password + dictionary attacks on the root user (a very common target for such + attacks). However, it may break systems that are set up with the + expectation of being able to SSH as root using password authentication. You + should only make this change if you do not need to do that. + +Template: openssh-server/password-authentication +Type: boolean +Default: true +Description: Allow password authentication? + By default, the SSH server will allow authenticating using a password. + You may want to change this if all users on this system authenticate using + a stronger authentication method, such as public keys. diff --git a/debian/openssh-server.ucf-md5sum b/debian/openssh-server.ucf-md5sum new file mode 100644 index 0000000..640943f --- /dev/null +++ b/debian/openssh-server.ucf-md5sum @@ -0,0 +1,98 @@ +# Historical md5sums of the default /etc/ssh/sshd_config up to and including +# 1:7.3p1-5. +0d06fc337cee10609d4833dc88df740f +10dc68360f6658910a98a051273de22c +11f9e107b4d13bbcabe7f8e8da734371 +16c827adcff44efaca05ec5eea6383d7 +2eeff28468576c3f2e538314e177687b +386c8b9079625b78f6d624ae506958ae +38fc7b31b3e3078848f0eec457d3e050 +395c5e13801f9b4f17c2cb54aa634fbd +423d5796cee663af2d0f24c4d520b578 +42be2cb5b64bc91443b2e46969d2d539 +42cd8b7c5ea9e440d3efa50b9a1bb444 +4f56ca8d0b5dfdaeb732becd3292ce5d +54998a682a97af8449e9de0316eacf1d +5c0bdc1735accbdc062381149937ec4a +6357b54acf8e089c57544e06d1bbec53 +6a621d8bc448987e5a8a613c40307a4c +702a79962e60aa17c6d3df742e8ec670 +7a69eff91ec92b4e065b8dd8846366b2 +7c60e22f183b6219c684f15ce24153fd +8304e780c43d4a606f695c8965f48299 +8b9e70ee87f4b822714e2ed7af5b70dc +8caefdd9e251b7cc1baa37874149a870 +90baeb1c778464d2da610f8268939719 +962a382e51f43f80109131838ca326ba +96eaf22faba705a37905282f6ad69d64 +9cb6cd83be1c21f73476be629b163c01 +a07a9865cd33b85a1426cd67954c6fa0 +ae1e844b43986e2a964cf84f46b50c5b +b516afa5a1e298f4cd00952b36dd623f +b69fc974ee9b5a111bd473ef54cdd232 +ba9c3f808c811d6f944ad10a508c4767 +bccf9af9c7027afd0895d8ff8e02761a +bd3a2b95f8b4b180eed707794ad81e4d +c34586b56496f81a10615c002685fc74 +c47555a21189a6b703d2c5d37d2c50ed +cac079e87c0ae0d77eafc9b285e36348 +d224f92823483333432974f63cb6dc66 +d50ef9ef2aa51cb9f808f6a776260c0a +e0029e1e9871d4d2b673ee6d70a38614 +e086e7eb521ccc5776371b2e198f0702 +e101f74dc7381527e9aefa1f78b01a7f +e24f749808133a27d94fda84a89bb27b +ec16c3dd0203f13885d74ce529719fda +efcff5380823d4e3f5039620c2e08459 +f58056370a64dbd2017d7486421c281d +fe396d52df77f1fbf710591d4dbf3311 + +# From this point on, we have four md5sums for each released version of +# sshd_config, depending on the state of openssh-server/permit-root-login +# and openssh-server/password-authentication; the plain copy plus the result +# of running through either or both of the following: +# +# sed 's/^#*PermitRootLogin .*/PermitRootLogin yes/' +# sed 's/^#PasswordAuthentication .*/PasswordAuthentication no/' +# +# This obviously leaves something to be desired in terms of maintainability. +# +# The following covers up to 1:7.8p1-1, including everything except the +# latest version of sshd_config. It should be extended any time sshd_config +# changes. + +# From 1:7.4p1-1: +f8ecd8f588749a0e39a5b1d3ff261cb2 +0f923c50ef1b00e1e88e02736727f03e +abc2568a7ec0cb54c584ea03c7a4f854 +17851b145a2515fce2e8d0b9020d5cd4 + +# From 1:7.4p1-6: +bbcdf7b77777d40996e287495bb96e47 +55dd47f61a4af5d1a8884ec590ce33ef +e1375e853a36f9bcd5faeb4b8c570dd1 +fa6d314c0ab05933ab970fd362ab2800 + +# From 1:7.4p1-7: +bbad7ed242a834e831c7066901cee49e +df8447ce600dd3d6bc4048ccc2faa536 +87adc8952a7f06efdda8473fd772997f +14301f8b9e39c72b3f929dc70e41ebf6 + +# From 1:7.5p1-1: +739d6887c8f3dd71a9168c614c07175c +cc463c55b512da68e807784f675a1301 +203e9b92fe3623aeba277ee44297f7dd +1d29cac6b0dd5c0004cf7d80b823715c + +# From 1:7.7p1-1: +cc873ab3ccc9cf3a3830c3c0728c0d0b +2d0b1d2719c01b15457401fd97d607ed +8ce930e15835a8f46285315ed0da7f4a +8a71a3620605f21ac3ef16fd5d23f76a + +# From 1:7.8p1-1: +55570f990ec9c3b8d19c19ab4d0b8eb8 +0b8a28dca5cdbace0cd85fcd7794cba8 +18df1377273c4d51d4c03c9adc31021f +63284e767f6ccf2375ef80507c564797 diff --git a/debian/openssh-server.ufw.profile b/debian/openssh-server.ufw.profile new file mode 100644 index 0000000..9bbe906 --- /dev/null +++ b/debian/openssh-server.ufw.profile @@ -0,0 +1,4 @@ +[OpenSSH] +title=Secure shell server, an rshd replacement +description=OpenSSH is a free implementation of the Secure Shell protocol. +ports=22/tcp diff --git a/debian/openssh-sftp-server.install b/debian/openssh-sftp-server.install new file mode 100644 index 0000000..25b12dc --- /dev/null +++ b/debian/openssh-sftp-server.install @@ -0,0 +1,2 @@ +usr/lib/openssh/sftp-server +usr/share/man/man8/sftp-server.8 diff --git a/debian/openssh-sftp-server.links b/debian/openssh-sftp-server.links new file mode 100644 index 0000000..2d98b1d --- /dev/null +++ b/debian/openssh-sftp-server.links @@ -0,0 +1 @@ +usr/lib/openssh/sftp-server usr/lib/sftp-server diff --git a/debian/openssh-tests.install b/debian/openssh-tests.install new file mode 100644 index 0000000..9417045 --- /dev/null +++ b/debian/openssh-tests.install @@ -0,0 +1,11 @@ +regress /usr/lib/openssh +debian/build-deb/regress/check-perm /usr/lib/openssh/regress +debian/build-deb/regress/misc /usr/lib/openssh/regress +debian/build-deb/regress/mkdtemp /usr/lib/openssh/regress +debian/build-deb/regress/modpipe /usr/lib/openssh/regress +debian/build-deb/regress/netcat /usr/lib/openssh/regress +debian/build-deb/regress/setuid-allowed /usr/lib/openssh/regress +debian/build-deb/regress/unittests /usr/lib/openssh/regress + +debian/build-deb/config.h /usr/lib/openssh/regress +debian/run-tests /usr/lib/openssh/regress diff --git a/debian/patches/CVE-2021-41617-1.patch b/debian/patches/CVE-2021-41617-1.patch new file mode 100644 index 0000000..7d89b7e --- /dev/null +++ b/debian/patches/CVE-2021-41617-1.patch @@ -0,0 +1,35 @@ +From ad2748dee50e4c0040f6efda5eff4a34e4eb5b85 Mon Sep 17 00:00:00 2001 +From: "djm@openbsd.org" +Date: Sun, 26 Sep 2021 14:01:03 +0000 +Subject: upstream: need initgroups() before setresgid(); reported by anton@, + +ok deraadt@ + +OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce + +Bug-Debian: https://bugs.debian.org/995130 +Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=f3cbe43e28fe71427d41cfe3a17125b972710455 +Last-Update: 2023-12-19 + +Patch-Name: CVE-2021-41617-1.patch +--- + auth.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/auth.c b/auth.c +index 4152d9c44..32870851b 100644 +--- a/auth.c ++++ b/auth.c +@@ -853,6 +853,12 @@ subprocess(const char *tag, struct passwd *pw, const char *command, + } + closefrom(STDERR_FILENO + 1); + ++ if (geteuid() == 0 && ++ initgroups(pw->pw_name, pw->pw_gid) == -1) { ++ error("%s: initgroups(%s, %u): %s", tag, ++ pw->pw_name, (u_int)pw->pw_gid, strerror(errno)); ++ _exit(1); ++ } + /* Don't use permanently_set_uid() here to avoid fatal() */ + if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) == -1) { + error("%s: setresgid %u: %s", tag, (u_int)pw->pw_gid, diff --git a/debian/patches/CVE-2021-41617-2.patch b/debian/patches/CVE-2021-41617-2.patch new file mode 100644 index 0000000..62a066b --- /dev/null +++ b/debian/patches/CVE-2021-41617-2.patch @@ -0,0 +1,26 @@ +From 0afd6ea47554dee40d1eaf33fa73d693fb661e64 Mon Sep 17 00:00:00 2001 +From: Damien Miller +Date: Mon, 27 Sep 2021 00:03:19 +1000 +Subject: initgroups needs grp.h + +Bug-Debian: https://bugs.debian.org/995130 +Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=bf944e3794eff5413f2df1ef37cddf96918c6bde +Last-Update: 2023-12-19 + +Patch-Name: CVE-2021-41617-2.patch +--- + auth.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/auth.c b/auth.c +index 32870851b..88578ec45 100644 +--- a/auth.c ++++ b/auth.c +@@ -39,6 +39,7 @@ + # include + #endif + #include ++#include + #ifdef HAVE_LOGIN_H + #include + #endif diff --git a/debian/patches/CVE-2023-38408-1.patch b/debian/patches/CVE-2023-38408-1.patch new file mode 100644 index 0000000..b70fd9f --- /dev/null +++ b/debian/patches/CVE-2023-38408-1.patch @@ -0,0 +1,30 @@ +From 8175e38eaf5636f45c3f27f4eadee1d583b70d35 Mon Sep 17 00:00:00 2001 +From: Damien Miller +Date: Thu, 13 Jul 2023 12:09:34 +1000 +Subject: terminate pkcs11 process for bad libraries + +Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=b23fe83f06ee7e721033769cfa03ae840476d280 +Last-Update: 2023-09-17 + +Patch-Name: CVE-2023-38408-1.patch +--- + ssh-pkcs11.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c +index f495883d1..d864051c4 100644 +--- a/ssh-pkcs11.c ++++ b/ssh-pkcs11.c +@@ -1519,10 +1519,8 @@ pkcs11_register_provider(char *provider_id, char *pin, + error("dlopen %s failed: %s", provider_id, dlerror()); + goto fail; + } +- if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL) { +- error("dlsym(C_GetFunctionList) failed: %s", dlerror()); +- goto fail; +- } ++ if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL) ++ fatal("dlsym(C_GetFunctionList) failed: %s", dlerror()); + p = xcalloc(1, sizeof(*p)); + p->name = xstrdup(provider_id); + p->handle = handle; diff --git a/debian/patches/CVE-2023-38408-2.patch b/debian/patches/CVE-2023-38408-2.patch new file mode 100644 index 0000000..7ee3c13 --- /dev/null +++ b/debian/patches/CVE-2023-38408-2.patch @@ -0,0 +1,171 @@ +From fb685ebb9f8391ab2836715c9c347ee50a0c9f48 Mon Sep 17 00:00:00 2001 +From: "djm@openbsd.org" +Date: Wed, 19 Jul 2023 14:02:27 +0000 +Subject: upstream: Ensure FIDO/PKCS11 libraries contain expected symbols + +This checks via nlist(3) that candidate provider libraries contain one +of the symbols that we will require prior to dlopen(), which can cause +a number of side effects, including execution of constructors. + +Feedback deraadt; ok markus + +OpenBSD-Commit-ID: 1508a5fbd74e329e69a55b56c453c292029aefbe + +Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=29ef8a04866ca14688d5b7fed7b8b9deab851f77 +Last-Update: 2023-09-17 + +Patch-Name: CVE-2023-38408-2.patch +--- + misc.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + misc.h | 1 + + ssh-pkcs11.c | 4 +++ + ssh-sk.c | 6 ++-- + 4 files changed, 88 insertions(+), 2 deletions(-) + +diff --git a/misc.c b/misc.c +index c75a795c2..c6e9e71a3 100644 +--- a/misc.c ++++ b/misc.c +@@ -22,6 +22,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -35,6 +36,9 @@ + #ifdef HAVE_POLL_H + #include + #endif ++#ifdef HAVE_NLIST_H ++#include ++#endif + #include + #include + #include +@@ -2463,3 +2467,78 @@ ssh_signal(int signum, sshsig_t handler) + } + return osa.sa_handler; + } ++ ++/* ++ * Returns zero if the library at 'path' contains symbol 's', nonzero ++ * otherwise. ++ */ ++int ++lib_contains_symbol(const char *path, const char *s) ++{ ++#ifdef HAVE_NLIST_H ++ struct nlist nl[2]; ++ int ret = -1, r; ++ ++ memset(nl, 0, sizeof(nl)); ++ nl[0].n_name = xstrdup(s); ++ nl[1].n_name = NULL; ++ if ((r = nlist(path, nl)) == -1) { ++ error("%s: nlist failed for %s", __func__, path); ++ goto out; ++ } ++ if (r != 0 || nl[0].n_value == 0 || nl[0].n_type == 0) { ++ error("%s: library %s does not contain symbol %s", ++ __func__, path, s); ++ goto out; ++ } ++ /* success */ ++ ret = 0; ++ out: ++ free(nl[0].n_name); ++ return ret; ++#else /* HAVE_NLIST_H */ ++ int fd, ret = -1; ++ struct stat st; ++ void *m = NULL; ++ size_t sz = 0; ++ ++ memset(&st, 0, sizeof(st)); ++ if ((fd = open(path, O_RDONLY)) < 0) { ++ error("%s: open %s: %s", __func__, path, strerror(errno)); ++ return -1; ++ } ++ if (fstat(fd, &st) != 0) { ++ error("%s: fstat %s: %s", __func__, path, strerror(errno)); ++ goto out; ++ } ++ if (!S_ISREG(st.st_mode)) { ++ error("%s: %s is not a regular file", __func__, path); ++ goto out; ++ } ++ if (st.st_size < 0 || ++ (size_t)st.st_size < strlen(s) || ++ st.st_size >= INT_MAX/2) { ++ error("%s: %s bad size %lld", ++ __func__, path, (long long)st.st_size); ++ goto out; ++ } ++ sz = (size_t)st.st_size; ++ if ((m = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED || ++ m == NULL) { ++ error("%s: mmap %s: %s", __func__, path, strerror(errno)); ++ goto out; ++ } ++ if (memmem(m, sz, s, strlen(s)) == NULL) { ++ error("%s: %s does not contain expected string %s", ++ __func__, path, s); ++ goto out; ++ } ++ /* success */ ++ ret = 0; ++ out: ++ if (m != NULL && m != MAP_FAILED) ++ munmap(m, sz); ++ close(fd); ++ return ret; ++#endif /* HAVE_NLIST_H */ ++} +diff --git a/misc.h b/misc.h +index b34c798e7..eb30bb454 100644 +--- a/misc.h ++++ b/misc.h +@@ -90,6 +90,7 @@ const char *atoi_err(const char *, int *); + int parse_absolute_time(const char *, uint64_t *); + void format_absolute_time(uint64_t, char *, size_t); + int path_absolute(const char *); ++int lib_contains_symbol(const char *, const char *); + + void sock_set_v6only(int); + +diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c +index d864051c4..df4d53626 100644 +--- a/ssh-pkcs11.c ++++ b/ssh-pkcs11.c +@@ -1514,6 +1514,10 @@ pkcs11_register_provider(char *provider_id, char *pin, + __func__, provider_id); + goto fail; + } ++ if (lib_contains_symbol(provider_id, "C_GetFunctionList") != 0) { ++ error("provider %s is not a PKCS11 library", provider_id); ++ goto fail; ++ } + /* open shared pkcs11-library */ + if ((handle = dlopen(provider_id, RTLD_NOW)) == NULL) { + error("dlopen %s failed: %s", provider_id, dlerror()); +diff --git a/ssh-sk.c b/ssh-sk.c +index 1455df635..76fee8af2 100644 +--- a/ssh-sk.c ++++ b/ssh-sk.c +@@ -123,10 +123,12 @@ sshsk_open(const char *path) + #endif + return ret; + } +- if ((ret->dlhandle = dlopen(path, RTLD_NOW)) == NULL) { +- error("Provider \"%s\" dlopen failed: %s", path, dlerror()); ++ if (lib_contains_symbol(path, "sk_api_version") != 0) { ++ error("provider %s is not an OpenSSH FIDO library", path); + goto fail; + } ++ if ((ret->dlhandle = dlopen(path, RTLD_NOW)) == NULL) ++ fatal("Provider \"%s\" dlopen failed: %s", path, dlerror()); + if ((ret->sk_api_version = dlsym(ret->dlhandle, + "sk_api_version")) == NULL) { + error("Provider \"%s\" dlsym(sk_api_version) failed: %s", diff --git a/debian/patches/CVE-2023-48795.patch b/debian/patches/CVE-2023-48795.patch new file mode 100644 index 0000000..8f14f86 --- /dev/null +++ b/debian/patches/CVE-2023-48795.patch @@ -0,0 +1,460 @@ +From 802a7af111c9ddb438ca4fd8c5cc35534e199fda Mon Sep 17 00:00:00 2001 +From: "djm@openbsd.org" +Date: Mon, 18 Dec 2023 14:45:17 +0000 +Subject: upstream: 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. + +with markus@ + +OpenBSD-Commit-ID: 2a66ac962f0a630d7945fee54004ed9e9c439f14 + +Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5 +Last-Update: 2023-12-21 + +Patch-Name: CVE-2023-48795.patch +--- + PROTOCOL | 26 +++++++++++++++++ + kex.c | 68 ++++++++++++++++++++++++++++++++----------- + kex.h | 1 + + packet.c | 80 ++++++++++++++++++++++++++++++++++++++------------- + sshconnect2.c | 14 +++------ + sshd.c | 8 ++++-- + 6 files changed, 149 insertions(+), 48 deletions(-) + +diff --git a/PROTOCOL b/PROTOCOL +index ecdacb9dc..bbe7ea560 100644 +--- a/PROTOCOL ++++ b/PROTOCOL +@@ -102,6 +102,32 @@ OpenSSH supports the use of ECDH in Curve25519 for key exchange as + described at: + http://git.libssh.org/users/aris/libssh.git/plain/doc/curve25519-sha256@libssh.org.txt?h=curve25519 + ++1.9 transport: strict key exchange extension ++ ++OpenSSH supports a number of transport-layer hardening measures under ++a "strict KEX" feature. This feature is signalled similarly to the ++RFC8308 ext-info feature: by including a additional algorithm in the ++initiial SSH2_MSG_KEXINIT kex_algorithms field. The client may append ++"kex-strict-c-v00@openssh.com" to its kex_algorithms and the server ++may append "kex-strict-s-v00@openssh.com". These pseudo-algorithms ++are only valid in the initial SSH2_MSG_KEXINIT and MUST be ignored ++if they are present in subsequent SSH2_MSG_KEXINIT packets. ++ ++When an endpoint that supports this extension observes this algorithm ++name in a peer's KEXINIT packet, it MUST make the following changes to ++the the protocol: ++ ++a) During initial KEX, terminate the connection if any unexpected or ++ out-of-sequence packet is received. This includes terminating the ++ connection if the first packet received is not SSH2_MSG_KEXINIT. ++ Unexpected packets for the purpose of strict KEX include messages ++ that are otherwise valid at any time during the connection such as ++ SSH2_MSG_DEBUG and SSH2_MSG_IGNORE. ++b) After sending or receiving a SSH2_MSG_NEWKEYS message, reset the ++ packet sequence number to zero. This behaviour persists for the ++ duration of the connection (i.e. not just the first ++ SSH2_MSG_NEWKEYS). ++ + 2. Connection protocol changes + + 2.1. connection: Channel write close extension "eow@openssh.com" +diff --git a/kex.c b/kex.c +index 763c45536..bda0473f7 100644 +--- a/kex.c ++++ b/kex.c +@@ -68,7 +68,7 @@ + #endif + + /* prototype */ +-static int kex_choose_conf(struct ssh *); ++static int kex_choose_conf(struct ssh *, uint32_t seq); + static int kex_input_newkeys(int, u_int32_t, struct ssh *); + + static const char *proposal_names[PROPOSAL_MAX] = { +@@ -207,6 +207,18 @@ kex_names_valid(const char *names) + return 1; + } + ++/* returns non-zero if proposal contains any algorithm from algs */ ++static int ++has_any_alg(const char *proposal, const char *algs) ++{ ++ char *cp; ++ ++ if ((cp = match_list(proposal, algs, NULL)) == NULL) ++ return 0; ++ free(cp); ++ return 1; ++} ++ + /* + * Concatenate algorithm names, avoiding duplicates in the process. + * Caller must free returned string. +@@ -214,7 +226,7 @@ kex_names_valid(const char *names) + char * + kex_names_cat(const char *a, const char *b) + { +- char *ret = NULL, *tmp = NULL, *cp, *p, *m; ++ char *ret = NULL, *tmp = NULL, *cp, *p; + size_t len; + + if (a == NULL || *a == '\0') +@@ -231,10 +243,8 @@ kex_names_cat(const char *a, const char *b) + } + strlcpy(ret, a, len); + for ((p = strsep(&cp, ",")); p && *p != '\0'; (p = strsep(&cp, ","))) { +- if ((m = match_list(ret, p, NULL)) != NULL) { +- free(m); ++ if (has_any_alg(ret, p)) + continue; /* Algorithm already present */ +- } + if (strlcat(ret, ",", len) >= len || + strlcat(ret, p, len) >= len) { + free(tmp); +@@ -466,7 +476,12 @@ kex_protocol_error(int type, u_int32_t seq, struct ssh *ssh) + { + int r; + +- error("kex protocol error: type %d seq %u", type, seq); ++ /* If in strict mode, any unexpected message is an error */ ++ if ((ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict) { ++ ssh_packet_disconnect(ssh, "strict KEX violation: " ++ "unexpected packet type %u (seqnr %u)", type, seq); ++ } ++ error("%s: type %u seq %u", __func__, type, seq); + if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 || + (r = sshpkt_put_u32(ssh, seq)) != 0 || + (r = sshpkt_send(ssh)) != 0) +@@ -538,6 +553,11 @@ kex_input_ext_info(int type, u_int32_t seq, struct ssh *ssh) + ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &kex_protocol_error); + if ((r = sshpkt_get_u32(ssh, &ninfo)) != 0) + return r; ++ if (ninfo >= 1024) { ++ error("SSH2_MSG_EXT_INFO with too many entries, expected " ++ "<=1024, received %u", ninfo); ++ return dispatch_protocol_error(type, seq, ssh); ++ } + for (i = 0; i < ninfo; i++) { + if ((r = sshpkt_get_cstring(ssh, &name, NULL)) != 0) + return r; +@@ -638,7 +658,7 @@ kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh) + error("%s: no hex", __func__); + return SSH_ERR_INTERNAL_ERROR; + } +- ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL); ++ ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, &kex_protocol_error); + ptr = sshpkt_ptr(ssh, &dlen); + if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0) + return r; +@@ -674,7 +694,7 @@ kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh) + if (!(kex->flags & KEX_INIT_SENT)) + if ((r = kex_send_kexinit(ssh)) != 0) + return r; +- if ((r = kex_choose_conf(ssh)) != 0) ++ if ((r = kex_choose_conf(ssh, seq)) != 0) + return r; + + if (kex->kex_type < KEX_MAX && kex->kex[kex->kex_type] != NULL) +@@ -939,7 +959,13 @@ proposals_match(char *my[PROPOSAL_MAX], char *peer[PROPOSAL_MAX]) + } + + static int +-kex_choose_conf(struct ssh *ssh) ++kexalgs_contains(char **peer, const char *ext) ++{ ++ return has_any_alg(peer[PROPOSAL_KEX_ALGS], ext); ++} ++ ++static int ++kex_choose_conf(struct ssh *ssh, uint32_t seq) + { + struct kex *kex = ssh->kex; + struct newkeys *newkeys; +@@ -964,13 +990,23 @@ kex_choose_conf(struct ssh *ssh) + sprop=peer; + } + +- /* Check whether client supports ext_info_c */ +- if (kex->server && (kex->flags & KEX_INITIAL)) { +- char *ext; +- +- ext = match_list("ext-info-c", peer[PROPOSAL_KEX_ALGS], NULL); +- kex->ext_info_c = (ext != NULL); +- free(ext); ++ /* Check whether peer supports ext_info/kex_strict */ ++ if ((kex->flags & KEX_INITIAL) != 0) { ++ if (kex->server) { ++ kex->ext_info_c = kexalgs_contains(peer, "ext-info-c"); ++ kex->kex_strict = kexalgs_contains(peer, ++ "kex-strict-c-v00@openssh.com"); ++ } else { ++ kex->kex_strict = kexalgs_contains(peer, ++ "kex-strict-s-v00@openssh.com"); ++ } ++ if (kex->kex_strict) { ++ debug3("%s: will use strict KEX ordering", __func__); ++ if (seq != 0) ++ ssh_packet_disconnect(ssh, ++ "strict KEX violation: " ++ "KEXINIT was not the first packet"); ++ } + } + + /* Algorithm Negotiation */ +diff --git a/kex.h b/kex.h +index 938dca03b..c60e592ec 100644 +--- a/kex.h ++++ b/kex.h +@@ -154,6 +154,7 @@ struct kex { + u_int kex_type; + char *server_sig_algs; + int ext_info_c; ++ int kex_strict; + struct sshbuf *my; + struct sshbuf *peer; + struct sshbuf *client_version; +diff --git a/packet.c b/packet.c +index 00e3180cb..78c357b14 100644 +--- a/packet.c ++++ b/packet.c +@@ -1208,8 +1208,13 @@ ssh_packet_send2_wrapped(struct ssh *ssh) + sshbuf_dump(state->output, stderr); + #endif + /* increment sequence number for outgoing packets */ +- if (++state->p_send.seqnr == 0) ++ if (++state->p_send.seqnr == 0) { ++ if ((ssh->kex->flags & KEX_INITIAL) != 0) { ++ ssh_packet_disconnect(ssh, "outgoing sequence number " ++ "wrapped during initial key exchange"); ++ } + logit("outgoing seqnr wraps around"); ++ } + if (++state->p_send.packets == 0) + if (!(ssh->compat & SSH_BUG_NOREKEY)) + return SSH_ERR_NEED_REKEY; +@@ -1217,6 +1222,12 @@ ssh_packet_send2_wrapped(struct ssh *ssh) + state->p_send.bytes += len; + sshbuf_reset(state->outgoing_packet); + ++ if (type == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) { ++ debug("%s: resetting send seqnr %u", __func__, ++ state->p_send.seqnr); ++ state->p_send.seqnr = 0; ++ } ++ + if (type == SSH2_MSG_NEWKEYS) + r = ssh_set_newkeys(ssh, MODE_OUT); + else if (type == SSH2_MSG_USERAUTH_SUCCESS && state->server_side) +@@ -1350,8 +1361,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p) + /* Stay in the loop until we have received a complete packet. */ + for (;;) { + /* Try to read a packet from the buffer. */ +- r = ssh_packet_read_poll_seqnr(ssh, typep, seqnr_p); +- if (r != 0) ++ if ((r = ssh_packet_read_poll_seqnr(ssh, typep, seqnr_p)) != 0) + break; + /* If we got a packet, return it. */ + if (*typep != SSH_MSG_NONE) +@@ -1638,10 +1648,16 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p) + if ((r = sshbuf_consume(state->input, mac->mac_len)) != 0) + goto out; + } ++ + if (seqnr_p != NULL) + *seqnr_p = state->p_read.seqnr; +- if (++state->p_read.seqnr == 0) ++ if (++state->p_read.seqnr == 0) { ++ if ((ssh->kex->flags & KEX_INITIAL) != 0) { ++ ssh_packet_disconnect(ssh, "incoming sequence number " ++ "wrapped during initial key exchange"); ++ } + logit("incoming seqnr wraps around"); ++ } + if (++state->p_read.packets == 0) + if (!(ssh->compat & SSH_BUG_NOREKEY)) + return SSH_ERR_NEED_REKEY; +@@ -1707,6 +1723,11 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p) + #endif + /* reset for next packet */ + state->packlen = 0; ++ if (*typep == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) { ++ debug("%s: resetting read seqnr %u", __func__, ++ state->p_read.seqnr); ++ state->p_read.seqnr = 0; ++ } + + /* do we need to rekey? */ + if (ssh_packet_need_rekeying(ssh, 0)) { +@@ -1731,10 +1752,39 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p) + r = ssh_packet_read_poll2(ssh, typep, seqnr_p); + if (r != 0) + return r; +- if (*typep) { +- state->keep_alive_timeouts = 0; +- DBG(debug("received packet type %d", *typep)); ++ if (*typep == 0) { ++ /* no message ready */ ++ return 0; ++ } ++ state->keep_alive_timeouts = 0; ++ DBG(debug("received packet type %d", *typep)); ++ ++ /* Always process disconnect messages */ ++ if (*typep == SSH2_MSG_DISCONNECT) { ++ if ((r = sshpkt_get_u32(ssh, &reason)) != 0 || ++ (r = sshpkt_get_string(ssh, &msg, NULL)) != 0) ++ return r; ++ /* Ignore normal client exit notifications */ ++ do_log2(ssh->state->server_side && ++ reason == SSH2_DISCONNECT_BY_APPLICATION ? ++ SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR, ++ "Received disconnect from %s port %d:" ++ "%u: %.400s", ssh_remote_ipaddr(ssh), ++ ssh_remote_port(ssh), reason, msg); ++ free(msg); ++ return SSH_ERR_DISCONNECTED; + } ++ ++ /* ++ * Do not implicitly handle any messages here during initial ++ * KEX when in strict mode. They will be need to be allowed ++ * explicitly by the KEX dispatch table or they will generate ++ * protocol errors. ++ */ ++ if (ssh->kex != NULL && ++ (ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict) ++ return 0; ++ /* Implicitly handle transport-level messages */ + switch (*typep) { + case SSH2_MSG_IGNORE: + debug3("Received SSH2_MSG_IGNORE"); +@@ -1749,19 +1799,6 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p) + debug("Remote: %.900s", msg); + free(msg); + break; +- case SSH2_MSG_DISCONNECT: +- if ((r = sshpkt_get_u32(ssh, &reason)) != 0 || +- (r = sshpkt_get_string(ssh, &msg, NULL)) != 0) +- return r; +- /* Ignore normal client exit notifications */ +- do_log2(ssh->state->server_side && +- reason == SSH2_DISCONNECT_BY_APPLICATION ? +- SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR, +- "Received disconnect from %s port %d:" +- "%u: %.400s", ssh_remote_ipaddr(ssh), +- ssh_remote_port(ssh), reason, msg); +- free(msg); +- return SSH_ERR_DISCONNECTED; + case SSH2_MSG_UNIMPLEMENTED: + if ((r = sshpkt_get_u32(ssh, &seqnr)) != 0) + return r; +@@ -2240,6 +2277,7 @@ kex_to_blob(struct sshbuf *m, struct kex *kex) + (r = sshbuf_put_u32(m, kex->hostkey_type)) != 0 || + (r = sshbuf_put_u32(m, kex->hostkey_nid)) != 0 || + (r = sshbuf_put_u32(m, kex->kex_type)) != 0 || ++ (r = sshbuf_put_u32(m, kex->kex_strict)) != 0 || + (r = sshbuf_put_stringb(m, kex->my)) != 0 || + (r = sshbuf_put_stringb(m, kex->peer)) != 0 || + (r = sshbuf_put_stringb(m, kex->client_version)) != 0 || +@@ -2402,6 +2440,7 @@ kex_from_blob(struct sshbuf *m, struct kex **kexp) + (r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_type)) != 0 || + (r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_nid)) != 0 || + (r = sshbuf_get_u32(m, &kex->kex_type)) != 0 || ++ (r = sshbuf_get_u32(m, &kex->kex_strict)) != 0 || + (r = sshbuf_get_stringb(m, kex->my)) != 0 || + (r = sshbuf_get_stringb(m, kex->peer)) != 0 || + (r = sshbuf_get_stringb(m, kex->client_version)) != 0 || +@@ -2729,6 +2768,7 @@ sshpkt_disconnect(struct ssh *ssh, const char *fmt,...) + vsnprintf(buf, sizeof(buf), fmt, args); + va_end(args); + ++ debug2("%s: sending SSH2_MSG_DISCONNECT: %s", __func__, buf); + if ((r = sshpkt_start(ssh, SSH2_MSG_DISCONNECT)) != 0 || + (r = sshpkt_put_u32(ssh, SSH2_DISCONNECT_PROTOCOL_ERROR)) != 0 || + (r = sshpkt_put_cstring(ssh, buf)) != 0 || +diff --git a/sshconnect2.c b/sshconnect2.c +index c47fc31a6..61392c934 100644 +--- a/sshconnect2.c ++++ b/sshconnect2.c +@@ -233,7 +233,8 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port) + fatal("%s: kex_assemble_namelist", __func__); + free(all_key); + +- if ((s = kex_names_cat(options.kex_algorithms, "ext-info-c")) == NULL) ++ if ((s = kex_names_cat(options.kex_algorithms, ++ "ext-info-c,kex-strict-c-v00@openssh.com")) == NULL) + fatal("%s: kex_names_cat", __func__); + myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(s); + myproposal[PROPOSAL_ENC_ALGS_CTOS] = +@@ -423,7 +424,6 @@ struct cauthmethod { + }; + + static int input_userauth_service_accept(int, u_int32_t, struct ssh *); +-static int input_userauth_ext_info(int, u_int32_t, struct ssh *); + static int input_userauth_success(int, u_int32_t, struct ssh *); + static int input_userauth_failure(int, u_int32_t, struct ssh *); + static int input_userauth_banner(int, u_int32_t, struct ssh *); +@@ -546,7 +546,7 @@ ssh_userauth2(struct ssh *ssh, const char *local_user, + + ssh->authctxt = &authctxt; + ssh_dispatch_init(ssh, &input_userauth_error); +- ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &input_userauth_ext_info); ++ ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, kex_input_ext_info); + ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept); + ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt.success); /* loop until success */ + pubkey_cleanup(ssh); +@@ -591,13 +591,6 @@ input_userauth_service_accept(int type, u_int32_t seq, struct ssh *ssh) + return r; + } + +-/* ARGSUSED */ +-static int +-input_userauth_ext_info(int type, u_int32_t seqnr, struct ssh *ssh) +-{ +- return kex_input_ext_info(type, seqnr, ssh); +-} +- + void + userauth(struct ssh *ssh, char *authlist) + { +@@ -679,6 +672,7 @@ input_userauth_success(int type, u_int32_t seq, struct ssh *ssh) + free(authctxt->methoddata); + authctxt->methoddata = NULL; + authctxt->success = 1; /* break out */ ++ ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, dispatch_protocol_error); + return 0; + } + +diff --git a/sshd.c b/sshd.c +index fb9b7b7fb..e894ad6f7 100644 +--- a/sshd.c ++++ b/sshd.c +@@ -2405,10 +2405,13 @@ do_ssh2_kex(struct ssh *ssh) + { + char *myproposal[PROPOSAL_MAX] = { KEX_SERVER }; + struct kex *kex; ++ char *s; + int r; + +- myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal( +- options.kex_algorithms); ++ if ((s = kex_names_cat(options.kex_algorithms, ++ "kex-strict-s-v00@openssh.com")) == NULL) ++ fatal("%s: kex_names_cat", __func__); ++ myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(s); + myproposal[PROPOSAL_ENC_ALGS_CTOS] = compat_cipher_proposal( + options.ciphers); + myproposal[PROPOSAL_ENC_ALGS_STOC] = compat_cipher_proposal( +@@ -2517,6 +2520,7 @@ do_ssh2_kex(struct ssh *ssh) + (r = ssh_packet_write_wait(ssh)) != 0) + fatal("%s: send test: %s", __func__, ssh_err(r)); + #endif ++ free(s); + debug("KEX done"); + } + diff --git a/debian/patches/CVE-2023-51385.patch b/debian/patches/CVE-2023-51385.patch new file mode 100644 index 0000000..7c7c179 --- /dev/null +++ b/debian/patches/CVE-2023-51385.patch @@ -0,0 +1,94 @@ +From 2bea7434c9fad19f017846adad0e995d8da00642 Mon Sep 17 00:00:00 2001 +From: "djm@openbsd.org" +Date: Mon, 18 Dec 2023 14:47:44 +0000 +Subject: upstream: ban user/hostnames with most shell metacharacters + +This makes ssh(1) refuse user or host names provided on the +commandline that contain most shell metacharacters. + +Some programs that invoke ssh(1) using untrusted data do not filter +metacharacters in arguments they supply. This could create +interactions with user-specified ProxyCommand and other directives +that allow shell injection attacks to occur. + +It's a mistake to invoke ssh(1) with arbitrary untrusted arguments, +but getting this stuff right can be tricky, so this should prevent +most obvious ways of creating risky situations. It however is not +and cannot be perfect: ssh(1) has no practical way of interpreting +what shell quoting rules are in use and how they interact with the +user's specified ProxyCommand. + +To allow configurations that use strange user or hostnames to +continue to work, this strictness is applied only to names coming +from the commandline. Names specified using User or Hostname +directives in ssh_config(5) are not affected. + +feedback/ok millert@ markus@ dtucker@ deraadt@ + +OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9 + +Origin: backport, https://anongit.mindrot.org/openssh.git/commit/?id=7ef3787c84b6b524501211b11a26c742f829af1a +Last-Update: 2023-12-19 + +Patch-Name: CVE-2023-51385.patch +--- + ssh.c | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/ssh.c b/ssh.c +index aa15b8a1f..dda3405c9 100644 +--- a/ssh.c ++++ b/ssh.c +@@ -638,6 +638,41 @@ set_addrinfo_port(struct addrinfo *addrs, int port) + } + } + ++static int ++valid_hostname(const char *s) ++{ ++ size_t i; ++ ++ if (*s == '-') ++ return 0; ++ for (i = 0; s[i] != 0; i++) { ++ if (strchr("'`\"$\\;&<>|(){}", s[i]) != NULL || ++ isspace((u_char)s[i]) || iscntrl((u_char)s[i])) ++ return 0; ++ } ++ return 1; ++} ++ ++static int ++valid_ruser(const char *s) ++{ ++ size_t i; ++ ++ if (*s == '-') ++ return 0; ++ for (i = 0; s[i] != 0; i++) { ++ if (strchr("'`\";&<>|(){}", s[i]) != NULL) ++ return 0; ++ /* Disallow '-' after whitespace */ ++ if (isspace((u_char)s[i]) && s[i + 1] == '-') ++ return 0; ++ /* Disallow \ in last position */ ++ if (s[i] == '\\' && s[i + 1] == '\0') ++ return 0; ++ } ++ return 1; ++} ++ + /* + * Main program for the ssh client. + */ +@@ -1123,6 +1158,10 @@ main(int ac, char **av) + if (!host) + usage(); + ++ if (!valid_hostname(host)) ++ fatal("hostname contains invalid characters"); ++ if (options.user != NULL && !valid_ruser(options.user)) ++ fatal("remote username contains invalid characters"); + host_arg = xstrdup(host); + + /* Initialize the command to execute on remote host. */ diff --git a/debian/patches/authorized-keys-man-symlink.patch b/debian/patches/authorized-keys-man-symlink.patch new file mode 100644 index 0000000..2680fc7 --- /dev/null +++ b/debian/patches/authorized-keys-man-symlink.patch @@ -0,0 +1,26 @@ +From 27ced5f6a3c5dec6e0a78ae138d3db56d49953bd Mon Sep 17 00:00:00 2001 +From: Tomas Pospisek +Date: Sun, 9 Feb 2014 16:10:07 +0000 +Subject: Install authorized_keys(5) as a symlink to sshd(8) + +Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1720 +Bug-Debian: http://bugs.debian.org/441817 +Last-Update: 2013-09-14 + +Patch-Name: authorized-keys-man-symlink.patch +--- + Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.in b/Makefile.in +index 56759c388..73e56aaac 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -408,6 +408,7 @@ install-files: + $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5 + $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5 + $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 ++ ln -s ../$(mansubdir)8/sshd.8 $(DESTDIR)$(mandir)/$(mansubdir)5/authorized_keys.5 + $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 + $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 + $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 diff --git a/debian/patches/conch-old-privkey-format.patch b/debian/patches/conch-old-privkey-format.patch new file mode 100644 index 0000000..c7063ce --- /dev/null +++ b/debian/patches/conch-old-privkey-format.patch @@ -0,0 +1,68 @@ +From a73fcc8bab768900ca16d3121303941511b28d45 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Thu, 30 Aug 2018 00:58:56 +0100 +Subject: Work around conch interoperability failure + +Twisted Conch fails to read private keys in the new format +(https://twistedmatrix.com/trac/ticket/9515). Work around this until it +can be fixed in Twisted. + +Forwarded: not-needed +Last-Update: 2019-10-09 + +Patch-Name: conch-old-privkey-format.patch +--- + regress/Makefile | 2 +- + regress/conch-ciphers.sh | 2 +- + regress/test-exec.sh | 12 ++++++++++++ + 3 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/regress/Makefile b/regress/Makefile +index 8b4ed9de3..f50d189bb 100644 +--- a/regress/Makefile ++++ b/regress/Makefile +@@ -122,7 +122,7 @@ CLEANFILES= *.core actual agent-key.* authorized_keys_${USERNAME} \ + rsa_ssh2_crnl.prv scp-ssh-wrapper.exe \ + scp-ssh-wrapper.scp setuid-allowed sftp-server.log \ + sftp-server.sh sftp.log ssh-log-wrapper.sh ssh.log \ +- ssh-rsa_oldfmt \ ++ ssh-rsa_oldfmt ssh-rsa_oldfmt.pub \ + ssh_config ssh_config.* ssh_proxy ssh_proxy_bak \ + ssh_proxy_envpass sshd.log sshd_config sshd_config_minimal \ + sshd_config.* sshd_proxy sshd_proxy.* sshd_proxy_bak \ +diff --git a/regress/conch-ciphers.sh b/regress/conch-ciphers.sh +index 6678813a2..6ff5da20b 100644 +--- a/regress/conch-ciphers.sh ++++ b/regress/conch-ciphers.sh +@@ -16,7 +16,7 @@ for c in aes256-ctr aes256-cbc aes192-ctr aes192-cbc aes128-ctr aes128-cbc \ + rm -f ${COPY} + # XXX the 2nd "cat" seems to be needed because of buggy FD handling + # in conch +- ${CONCH} --identity $OBJ/ssh-rsa --port $PORT --user $USER -e none \ ++ ${CONCH} --identity $OBJ/ssh-rsa_oldfmt --port $PORT --user $USER -e none \ + --known-hosts $OBJ/known_hosts --notty --noagent --nox11 -n \ + 127.0.0.1 "cat ${DATA}" 2>/dev/null | cat > ${COPY} + if [ $? -ne 0 ]; then +diff --git a/regress/test-exec.sh b/regress/test-exec.sh +index 5dc975d07..d8491b2be 100644 +--- a/regress/test-exec.sh ++++ b/regress/test-exec.sh +@@ -587,6 +587,18 @@ REGRESS_INTEROP_CONCH=no + if test -x "$CONCH" ; then + REGRESS_INTEROP_CONCH=yes + fi ++case "$SCRIPT" in ++*conch*) ;; ++*) REGRESS_INTEROP_CONCH=no ++esac ++ ++if test "$REGRESS_INTEROP_CONCH" = "yes" ; then ++ # Convert rsa key to old format to work around ++ # https://twistedmatrix.com/trac/ticket/9515 ++ cp $OBJ/ssh-rsa $OBJ/ssh-rsa_oldfmt ++ cp $OBJ/ssh-rsa.pub $OBJ/ssh-rsa_oldfmt.pub ++ ${SSHKEYGEN} -p -N '' -m PEM -f $OBJ/ssh-rsa_oldfmt >/dev/null ++fi + + # If PuTTY is present and we are running a PuTTY test, prepare keys and + # configuration diff --git a/debian/patches/debian-banner.patch b/debian/patches/debian-banner.patch new file mode 100644 index 0000000..82cc37c --- /dev/null +++ b/debian/patches/debian-banner.patch @@ -0,0 +1,162 @@ +From 6353ee79cc71ef33a0a34d2d769a5fe327f6260d Mon Sep 17 00:00:00 2001 +From: Kees Cook +Date: Sun, 9 Feb 2014 16:10:06 +0000 +Subject: Add DebianBanner server configuration option + +Setting this to "no" causes sshd to omit the Debian revision from its +initial protocol handshake, for those scared by package-versioning.patch. + +Bug-Debian: http://bugs.debian.org/562048 +Forwarded: not-needed +Last-Update: 2020-06-07 + +Patch-Name: debian-banner.patch +--- + kex.c | 5 +++-- + kex.h | 2 +- + servconf.c | 9 +++++++++ + servconf.h | 2 ++ + sshconnect.c | 2 +- + sshd.c | 2 +- + sshd_config.5 | 5 +++++ + 7 files changed, 22 insertions(+), 5 deletions(-) + +diff --git a/kex.c b/kex.c +index ce7bb5b3b..763c45536 100644 +--- a/kex.c ++++ b/kex.c +@@ -1225,7 +1225,7 @@ send_error(struct ssh *ssh, char *msg) + */ + int + kex_exchange_identification(struct ssh *ssh, int timeout_ms, +- const char *version_addendum) ++ int debian_banner, const char *version_addendum) + { + int remote_major, remote_minor, mismatch, oerrno = 0; + size_t len, i, n; +@@ -1243,7 +1243,8 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms, + if (version_addendum != NULL && *version_addendum == '\0') + version_addendum = NULL; + if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%.100s%s%s\r\n", +- PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE, ++ PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, ++ debian_banner ? SSH_RELEASE : SSH_RELEASE_MINIMUM, + version_addendum == NULL ? "" : " ", + version_addendum == NULL ? "" : version_addendum)) != 0) { + oerrno = errno; +diff --git a/kex.h b/kex.h +index fe7141414..938dca03b 100644 +--- a/kex.h ++++ b/kex.h +@@ -194,7 +194,7 @@ char *kex_names_cat(const char *, const char *); + int kex_assemble_names(char **, const char *, const char *); + int kex_gss_names_valid(const char *); + +-int kex_exchange_identification(struct ssh *, int, const char *); ++int kex_exchange_identification(struct ssh *, int, int, const char *); + + struct kex *kex_new(void); + int kex_ready(struct ssh *, char *[PROPOSAL_MAX]); +diff --git a/servconf.c b/servconf.c +index 21abe41ac..f9eb778d6 100644 +--- a/servconf.c ++++ b/servconf.c +@@ -195,6 +195,7 @@ initialize_server_options(ServerOptions *options) + options->fingerprint_hash = -1; + options->disable_forwarding = -1; + options->expose_userauth_info = -1; ++ options->debian_banner = -1; + } + + /* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */ +@@ -469,6 +470,8 @@ fill_default_server_options(ServerOptions *options) + options->expose_userauth_info = 0; + if (options->sk_provider == NULL) + options->sk_provider = xstrdup("internal"); ++ if (options->debian_banner == -1) ++ options->debian_banner = 1; + + assemble_algorithms(options); + +@@ -548,6 +551,7 @@ typedef enum { + sStreamLocalBindMask, sStreamLocalBindUnlink, + sAllowStreamLocalForwarding, sFingerprintHash, sDisableForwarding, + sExposeAuthInfo, sRDomain, sPubkeyAuthOptions, sSecurityKeyProvider, ++ sDebianBanner, + sDeprecated, sIgnore, sUnsupported + } ServerOpCodes; + +@@ -712,6 +716,7 @@ static struct { + { "rdomain", sRDomain, SSHCFG_ALL }, + { "casignaturealgorithms", sCASignatureAlgorithms, SSHCFG_ALL }, + { "securitykeyprovider", sSecurityKeyProvider, SSHCFG_GLOBAL }, ++ { "debianbanner", sDebianBanner, SSHCFG_GLOBAL }, + { NULL, sBadOption, 0 } + }; + +@@ -2402,6 +2407,10 @@ process_server_config_line_depth(ServerOptions *options, char *line, + *charptr = xstrdup(arg); + break; + ++ case sDebianBanner: ++ intptr = &options->debian_banner; ++ goto parse_flag; ++ + case sDeprecated: + case sIgnore: + case sUnsupported: +diff --git a/servconf.h b/servconf.h +index f10908e5b..4afdf24d0 100644 +--- a/servconf.h ++++ b/servconf.h +@@ -227,6 +227,8 @@ typedef struct { + int expose_userauth_info; + u_int64_t timing_secret; + char *sk_provider; ++ ++ int debian_banner; + } ServerOptions; + + /* Information about the incoming connection as used by Match */ +diff --git a/sshconnect.c b/sshconnect.c +index 3ae20b74e..bab3916d8 100644 +--- a/sshconnect.c ++++ b/sshconnect.c +@@ -1296,7 +1296,7 @@ ssh_login(struct ssh *ssh, Sensitive *sensitive, const char *orighost, + lowercase(host); + + /* Exchange protocol version identification strings with the server. */ +- if ((r = kex_exchange_identification(ssh, timeout_ms, NULL)) != 0) ++ if ((r = kex_exchange_identification(ssh, timeout_ms, 1, NULL)) != 0) + sshpkt_fatal(ssh, r, "banner exchange"); + + /* Put the connection into non-blocking mode. */ +diff --git a/sshd.c b/sshd.c +index 38d281ab4..50f2726bf 100644 +--- a/sshd.c ++++ b/sshd.c +@@ -2232,7 +2232,7 @@ main(int ac, char **av) + if (!debug_flag) + alarm(options.login_grace_time); + +- if ((r = kex_exchange_identification(ssh, -1, ++ if ((r = kex_exchange_identification(ssh, -1, options.debian_banner, + options.version_addendum)) != 0) + sshpkt_fatal(ssh, r, "banner exchange"); + +diff --git a/sshd_config.5 b/sshd_config.5 +index 6457620bb..33dc0c675 100644 +--- a/sshd_config.5 ++++ b/sshd_config.5 +@@ -540,6 +540,11 @@ or + .Cm no . + The default is + .Cm yes . ++.It Cm DebianBanner ++Specifies whether the distribution-specified extra version suffix is ++included during initial protocol handshake. ++The default is ++.Cm yes . + .It Cm DenyGroups + This keyword can be followed by a list of group name patterns, separated + by spaces. diff --git a/debian/patches/debian-config.patch b/debian/patches/debian-config.patch new file mode 100644 index 0000000..aa370e5 --- /dev/null +++ b/debian/patches/debian-config.patch @@ -0,0 +1,270 @@ +From a0c9f82b05d33f3e2cf8e5442cee47c09d1a1dd8 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sun, 9 Feb 2014 16:10:18 +0000 +Subject: Various Debian-specific configuration changes + +ssh: Enable ForwardX11Trusted, returning to earlier semantics which cause +fewer problems with existing setups (http://bugs.debian.org/237021). + +ssh: Set 'SendEnv LANG LC_*' by default (http://bugs.debian.org/264024). + +ssh: Enable HashKnownHosts by default to try to limit the spread of ssh +worms. + +ssh: Enable GSSAPIAuthentication by default. + +ssh: Include /etc/ssh/ssh_config.d/*.conf. + +sshd: Enable PAM, disable ChallengeResponseAuthentication, and disable +PrintMotd. + +sshd: Enable X11Forwarding. + +sshd: Set 'AcceptEnv LANG LC_*' by default. + +sshd: Change sftp subsystem path to /usr/lib/openssh/sftp-server. + +sshd: Include /etc/ssh/sshd_config.d/*.conf. + +Document all of this. + +Author: Russ Allbery +Forwarded: not-needed +Last-Update: 2020-10-18 + +Patch-Name: debian-config.patch +--- + readconf.c | 2 +- + ssh.1 | 24 ++++++++++++++++++++++++ + ssh_config | 8 +++++++- + ssh_config.5 | 26 +++++++++++++++++++++++++- + sshd_config | 18 ++++++++++++------ + sshd_config.5 | 29 +++++++++++++++++++++++++++++ + 6 files changed, 98 insertions(+), 9 deletions(-) + +diff --git a/readconf.c b/readconf.c +index f4f273c96..e676b6be6 100644 +--- a/readconf.c ++++ b/readconf.c +@@ -2153,7 +2153,7 @@ fill_default_options(Options * options) + if (options->forward_x11 == -1) + options->forward_x11 = 0; + if (options->forward_x11_trusted == -1) +- options->forward_x11_trusted = 0; ++ options->forward_x11_trusted = 1; + if (options->forward_x11_timeout == -1) + options->forward_x11_timeout = 1200; + /* +diff --git a/ssh.1 b/ssh.1 +index 76ddd89b5..ad48fc8c8 100644 +--- a/ssh.1 ++++ b/ssh.1 +@@ -812,6 +812,16 @@ directive in + .Xr ssh_config 5 + for more information. + .Pp ++(Debian-specific: X11 forwarding is not subjected to X11 SECURITY extension ++restrictions by default, because too many programs currently crash in this ++mode. ++Set the ++.Cm ForwardX11Trusted ++option to ++.Dq no ++to restore the upstream behaviour. ++This may change in future depending on client-side improvements.) ++.Pp + .It Fl x + Disables X11 forwarding. + .Pp +@@ -820,6 +830,20 @@ Enables trusted X11 forwarding. + Trusted X11 forwardings are not subjected to the X11 SECURITY extension + controls. + .Pp ++(Debian-specific: In the default configuration, this option is equivalent to ++.Fl X , ++since ++.Cm ForwardX11Trusted ++defaults to ++.Dq yes ++as described above. ++Set the ++.Cm ForwardX11Trusted ++option to ++.Dq no ++to restore the upstream behaviour. ++This may change in future depending on client-side improvements.) ++.Pp + .It Fl y + Send log information using the + .Xr syslog 3 +diff --git a/ssh_config b/ssh_config +index 52aae8692..09a17cf18 100644 +--- a/ssh_config ++++ b/ssh_config +@@ -17,9 +17,12 @@ + # list of available options, their meanings and defaults, please see the + # ssh_config(5) man page. + +-# Host * ++Include /etc/ssh/ssh_config.d/*.conf ++ ++Host * + # ForwardAgent no + # ForwardX11 no ++# ForwardX11Trusted yes + # PasswordAuthentication yes + # HostbasedAuthentication no + # GSSAPIAuthentication no +@@ -46,3 +49,6 @@ + # ProxyCommand ssh -q -W %h:%p gateway.example.com + # RekeyLimit 1G 1h + # UserKnownHostsFile ~/.ssh/known_hosts.d/%k ++ SendEnv LANG LC_* ++ HashKnownHosts yes ++ GSSAPIAuthentication yes +diff --git a/ssh_config.5 b/ssh_config.5 +index 96ca7a5df..6d6c59521 100644 +--- a/ssh_config.5 ++++ b/ssh_config.5 +@@ -71,6 +71,29 @@ Since the first obtained value for each parameter is used, more + host-specific declarations should be given near the beginning of the + file, and general defaults at the end. + .Pp ++Note that the Debian ++.Ic openssh-client ++package sets several options as standard in ++.Pa /etc/ssh/ssh_config ++which are not the default in ++.Xr ssh 1 : ++.Pp ++.Bl -bullet -offset indent -compact ++.It ++.Cm Include /etc/ssh/ssh_config.d/*.conf ++.It ++.Cm SendEnv No LANG LC_* ++.It ++.Cm HashKnownHosts No yes ++.It ++.Cm GSSAPIAuthentication No yes ++.El ++.Pp ++.Pa /etc/ssh/ssh_config.d/*.conf ++files are included at the start of the system-wide configuration file, so ++options set there will override those in ++.Pa /etc/ssh/ssh_config. ++.Pp + The file contains keyword-argument pairs, one per line. + Lines starting with + .Ql # +@@ -742,11 +765,12 @@ elapsed. + .It Cm ForwardX11Trusted + If this option is set to + .Cm yes , ++(the Debian-specific default), + remote X11 clients will have full access to the original X11 display. + .Pp + If this option is set to + .Cm no +-(the default), ++(the upstream default), + remote X11 clients will be considered untrusted and prevented + from stealing or tampering with data belonging to trusted X11 + clients. +diff --git a/sshd_config b/sshd_config +index 2c48105f8..459c1b230 100644 +--- a/sshd_config ++++ b/sshd_config +@@ -10,6 +10,8 @@ + # possible, but leave them commented. Uncommented options override the + # default value. + ++Include /etc/ssh/sshd_config.d/*.conf ++ + #Port 22 + #AddressFamily any + #ListenAddress 0.0.0.0 +@@ -57,8 +59,9 @@ AuthorizedKeysFile .ssh/authorized_keys + #PasswordAuthentication yes + #PermitEmptyPasswords no + +-# Change to no to disable s/key passwords +-#ChallengeResponseAuthentication yes ++# Change to yes to enable challenge-response passwords (beware issues with ++# some PAM modules and threads) ++ChallengeResponseAuthentication no + + # Kerberos options + #KerberosAuthentication no +@@ -81,16 +84,16 @@ AuthorizedKeysFile .ssh/authorized_keys + # If you just want the PAM account and session checks to run without + # PAM authentication, then enable this but set PasswordAuthentication + # and ChallengeResponseAuthentication to 'no'. +-#UsePAM no ++UsePAM yes + + #AllowAgentForwarding yes + #AllowTcpForwarding yes + #GatewayPorts no +-#X11Forwarding no ++X11Forwarding yes + #X11DisplayOffset 10 + #X11UseLocalhost yes + #PermitTTY yes +-#PrintMotd yes ++PrintMotd no + #PrintLastLog yes + #TCPKeepAlive yes + #PermitUserEnvironment no +@@ -107,8 +110,11 @@ AuthorizedKeysFile .ssh/authorized_keys + # no default banner path + #Banner none + ++# Allow client to pass locale environment variables ++AcceptEnv LANG LC_* ++ + # override default of no subsystems +-Subsystem sftp /usr/libexec/sftp-server ++Subsystem sftp /usr/lib/openssh/sftp-server + + # Example of overriding settings on a per-user basis + #Match User anoncvs +diff --git a/sshd_config.5 b/sshd_config.5 +index 32ae46476..472001dd1 100644 +--- a/sshd_config.5 ++++ b/sshd_config.5 +@@ -56,6 +56,35 @@ Arguments may optionally be enclosed in double quotes + .Pq \&" + in order to represent arguments containing spaces. + .Pp ++Note that the Debian ++.Ic openssh-server ++package sets several options as standard in ++.Pa /etc/ssh/sshd_config ++which are not the default in ++.Xr sshd 8 : ++.Pp ++.Bl -bullet -offset indent -compact ++.It ++.Cm Include /etc/ssh/sshd_config.d/*.conf ++.It ++.Cm ChallengeResponseAuthentication No no ++.It ++.Cm X11Forwarding No yes ++.It ++.Cm PrintMotd No no ++.It ++.Cm AcceptEnv No LANG LC_* ++.It ++.Cm Subsystem No sftp /usr/lib/openssh/sftp-server ++.It ++.Cm UsePAM No yes ++.El ++.Pp ++.Pa /etc/ssh/sshd_config.d/*.conf ++files are included at the start of the configuration file, so options set ++there will override those in ++.Pa /etc/ssh/sshd_config. ++.Pp + The possible + keywords and their meanings are as follows (note that + keywords are case-insensitive and arguments are case-sensitive): diff --git a/debian/patches/dnssec-sshfp.patch b/debian/patches/dnssec-sshfp.patch new file mode 100644 index 0000000..23ecc0d --- /dev/null +++ b/debian/patches/dnssec-sshfp.patch @@ -0,0 +1,94 @@ +From 78a7702d88713e854550a05fa9b8670f219d9bf9 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sun, 9 Feb 2014 16:10:01 +0000 +Subject: Force use of DNSSEC even if "options edns0" isn't in resolv.conf + +This allows SSHFP DNS records to be verified if glibc 2.11 is installed. + +Origin: vendor, https://cvs.fedoraproject.org/viewvc/F-12/openssh/openssh-5.2p1-edns.patch?revision=1.1&view=markup +Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572049 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572049 +Last-Update: 2010-04-06 + +Patch-Name: dnssec-sshfp.patch +--- + dns.c | 14 +++++++++++++- + openbsd-compat/getrrsetbyname.c | 10 +++++----- + openbsd-compat/getrrsetbyname.h | 3 +++ + 3 files changed, 21 insertions(+), 6 deletions(-) + +diff --git a/dns.c b/dns.c +index e4f9bf830..9c9fe6413 100644 +--- a/dns.c ++++ b/dns.c +@@ -210,6 +210,7 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address, + { + u_int counter; + int result; ++ unsigned int rrset_flags = 0; + struct rrsetinfo *fingerprints = NULL; + + u_int8_t hostkey_algorithm; +@@ -233,8 +234,19 @@ verify_host_key_dns(const char *hostname, struct sockaddr *address, + return -1; + } + ++ /* ++ * Original getrrsetbyname function, found on OpenBSD for example, ++ * doesn't accept any flag and prerequisite for obtaining AD bit in ++ * DNS response is set by "options edns0" in resolv.conf. ++ * ++ * Our version is more clever and use RRSET_FORCE_EDNS0 flag. ++ */ ++#ifndef HAVE_GETRRSETBYNAME ++ rrset_flags |= RRSET_FORCE_EDNS0; ++#endif + result = getrrsetbyname(hostname, DNS_RDATACLASS_IN, +- DNS_RDATATYPE_SSHFP, 0, &fingerprints); ++ DNS_RDATATYPE_SSHFP, rrset_flags, &fingerprints); ++ + if (result) { + verbose("DNS lookup error: %s", dns_result_totext(result)); + return -1; +diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c +index dc6fe0533..e061a290a 100644 +--- a/openbsd-compat/getrrsetbyname.c ++++ b/openbsd-compat/getrrsetbyname.c +@@ -209,8 +209,8 @@ getrrsetbyname(const char *hostname, unsigned int rdclass, + goto fail; + } + +- /* don't allow flags yet, unimplemented */ +- if (flags) { ++ /* Allow RRSET_FORCE_EDNS0 flag only. */ ++ if ((flags & !RRSET_FORCE_EDNS0) != 0) { + result = ERRSET_INVAL; + goto fail; + } +@@ -226,9 +226,9 @@ getrrsetbyname(const char *hostname, unsigned int rdclass, + #endif /* DEBUG */ + + #ifdef RES_USE_DNSSEC +- /* turn on DNSSEC if EDNS0 is configured */ +- if (_resp->options & RES_USE_EDNS0) +- _resp->options |= RES_USE_DNSSEC; ++ /* turn on DNSSEC if required */ ++ if (flags & RRSET_FORCE_EDNS0) ++ _resp->options |= (RES_USE_EDNS0|RES_USE_DNSSEC); + #endif /* RES_USE_DNSEC */ + + /* make query */ +diff --git a/openbsd-compat/getrrsetbyname.h b/openbsd-compat/getrrsetbyname.h +index 1283f5506..dbbc85a2a 100644 +--- a/openbsd-compat/getrrsetbyname.h ++++ b/openbsd-compat/getrrsetbyname.h +@@ -72,6 +72,9 @@ + #ifndef RRSET_VALIDATED + # define RRSET_VALIDATED 1 + #endif ++#ifndef RRSET_FORCE_EDNS0 ++# define RRSET_FORCE_EDNS0 0x0001 ++#endif + + /* + * Return codes for getrrsetbyname() diff --git a/debian/patches/doc-hash-tab-completion.patch b/debian/patches/doc-hash-tab-completion.patch new file mode 100644 index 0000000..3e96f3b --- /dev/null +++ b/debian/patches/doc-hash-tab-completion.patch @@ -0,0 +1,28 @@ +From 5fca8a730171f96a72007118c0d35cf4a09359f8 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sun, 9 Feb 2014 16:10:11 +0000 +Subject: Document that HashKnownHosts may break tab-completion + +Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1727 +Bug-Debian: http://bugs.debian.org/430154 +Last-Update: 2013-09-14 + +Patch-Name: doc-hash-tab-completion.patch +--- + ssh_config.5 | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ssh_config.5 b/ssh_config.5 +index 190e1d927..96ca7a5df 100644 +--- a/ssh_config.5 ++++ b/ssh_config.5 +@@ -861,6 +861,9 @@ Note that existing names and addresses in known hosts files + will not be converted automatically, + but may be manually hashed using + .Xr ssh-keygen 1 . ++Use of this option may break facilities such as tab-completion that rely ++on being able to read unhashed host names from ++.Pa ~/.ssh/known_hosts . + .It Cm HostbasedAuthentication + Specifies whether to try rhosts based authentication with public key + authentication. diff --git a/debian/patches/gnome-ssh-askpass2-icon.patch b/debian/patches/gnome-ssh-askpass2-icon.patch new file mode 100644 index 0000000..d7d0bed --- /dev/null +++ b/debian/patches/gnome-ssh-askpass2-icon.patch @@ -0,0 +1,26 @@ +From c26f6f9c7051b9ab2ac13d1d227e6d39527839cc Mon Sep 17 00:00:00 2001 +From: Vincent Untz +Date: Sun, 9 Feb 2014 16:10:16 +0000 +Subject: Give the ssh-askpass-gnome window a default icon + +Bug-Ubuntu: https://bugs.launchpad.net/bugs/27152 +Last-Update: 2010-02-28 + +Patch-Name: gnome-ssh-askpass2-icon.patch +--- + contrib/gnome-ssh-askpass2.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/contrib/gnome-ssh-askpass2.c b/contrib/gnome-ssh-askpass2.c +index f7912727c..bf8c92c8f 100644 +--- a/contrib/gnome-ssh-askpass2.c ++++ b/contrib/gnome-ssh-askpass2.c +@@ -322,6 +322,8 @@ main(int argc, char **argv) + + gtk_init(&argc, &argv); + ++ gtk_window_set_default_icon_from_file ("/usr/share/pixmaps/ssh-askpass-gnome.png", NULL); ++ + if (argc > 1) { + message = g_strjoinv(" ", argv + 1); + } else { diff --git a/debian/patches/gssapi.patch b/debian/patches/gssapi.patch new file mode 100644 index 0000000..d779eac --- /dev/null +++ b/debian/patches/gssapi.patch @@ -0,0 +1,4002 @@ +From d1b7918f9bce6e997c7952ac795e18d09192b2a6 Mon Sep 17 00:00:00 2001 +From: Simon Wilkinson +Date: Sun, 9 Feb 2014 16:09:48 +0000 +Subject: GSSAPI key exchange support + +This patch has been rejected upstream: "None of the OpenSSH developers are +in favour of adding this, and this situation has not changed for several +years. This is not a slight on Simon's patch, which is of fine quality, but +just that a) we don't trust GSSAPI implementations that much and b) we don't +like adding new KEX since they are pre-auth attack surface. This one is +particularly scary, since it requires hooks out to typically root-owned +system resources." + +However, quite a lot of people rely on this in Debian, and it's better to +have it merged into the main openssh package rather than having separate +-krb5 packages (as we used to have). It seems to have a generally good +security history. + +Author: Simon Wilkinson +Author: Colin Watson +Author: Jakub Jelen +Origin: other, https://github.com/openssh-gsskex/openssh-gsskex/commits/debian/master +Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1242 +Last-Updated: 2020-06-07 + +Patch-Name: gssapi.patch +--- + Makefile.in | 3 +- + README.md | 33 +++ + auth.c | 96 +------- + auth2-gss.c | 56 ++++- + auth2.c | 2 + + canohost.c | 93 ++++++++ + canohost.h | 3 + + clientloop.c | 15 +- + configure.ac | 24 ++ + gss-genr.c | 300 +++++++++++++++++++++++- + gss-serv-krb5.c | 85 ++++++- + gss-serv.c | 186 +++++++++++++-- + kex.c | 66 +++++- + kex.h | 29 +++ + kexdh.c | 10 + + kexgen.c | 2 +- + kexgssc.c | 606 ++++++++++++++++++++++++++++++++++++++++++++++++ + kexgsss.c | 474 +++++++++++++++++++++++++++++++++++++ + monitor.c | 139 ++++++++++- + monitor.h | 2 + + monitor_wrap.c | 57 ++++- + monitor_wrap.h | 4 +- + readconf.c | 70 ++++++ + readconf.h | 6 + + servconf.c | 47 ++++ + servconf.h | 3 + + session.c | 10 +- + ssh-gss.h | 54 ++++- + ssh.1 | 8 + + ssh.c | 6 +- + ssh_config | 2 + + ssh_config.5 | 57 +++++ + sshconnect2.c | 154 +++++++++++- + sshd.c | 62 ++++- + sshd_config | 2 + + sshd_config.5 | 30 +++ + sshkey.c | 3 +- + sshkey.h | 1 + + 38 files changed, 2640 insertions(+), 160 deletions(-) + create mode 100644 kexgssc.c + create mode 100644 kexgsss.c + +diff --git a/Makefile.in b/Makefile.in +index acfb919da..56759c388 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -107,6 +107,7 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \ + kex.o kexdh.o kexgex.o kexecdh.o kexc25519.o \ + kexgexc.o kexgexs.o \ + sntrup4591761.o kexsntrup4591761x25519.o kexgen.o \ ++ kexgssc.o \ + sftp-realpath.o platform-pledge.o platform-tracing.o platform-misc.o \ + sshbuf-io.o + +@@ -123,7 +124,7 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o \ + auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \ + auth2-none.o auth2-passwd.o auth2-pubkey.o \ + monitor.o monitor_wrap.o auth-krb5.o \ +- auth2-gss.o gss-serv.o gss-serv-krb5.o \ ++ auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o \ + loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ + sftp-server.o sftp-common.o \ + sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \ +diff --git a/README.md b/README.md +index 28fb43d2a..5b73d24c0 100644 +--- a/README.md ++++ b/README.md +@@ -1,3 +1,36 @@ ++Portable OpenSSH with GSSAPI Key Exchange patches ++================================================= ++ ++Currently, there are two branches with gssapi key exchange related ++patches: ++ ++ * fedora/master: Changes that are shipped in Fedora ++ * debian/master: Changes that are shipped in Debian ++ ++The target is to converge to a shared repository with single master ++branch from where we could build releases for both OSes. ++ ++ ++What is in: ++ ++ * The original patch implementing missing parts of RFC4462 by Simon Wilkinson ++ adapted to the current OpenSSH versions and with several fixes ++ * New methods for GSSAPI Kex from IETF draft [1] from Jakub Jelen ++ ++ ++Missing kerberos-related parts: ++ ++ * .k5login and .kusers support available in Fedora [2] [3]. ++ * Improved handling of kerberos ccache location [4] ++ ++ ++[1] https://tools.ietf.org/html/draft-ietf-curdle-gss-keyex-sha2-08 ++[2] https://src.fedoraproject.org/rpms/openssh/blob/master/f/openssh-6.6p1-kuserok.patch ++[3] https://src.fedoraproject.org/rpms/openssh/blob/master/f/openssh-6.6p1-GSSAPIEnablek5users.patch ++[4] https://bugzilla.mindrot.org/show_bug.cgi?id=2775 ++ ++------------------------------------------------------------------------------- ++ + # Portable OpenSSH + + [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/openssh.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:openssh) +diff --git a/auth.c b/auth.c +index 9a5498b66..3d31ec860 100644 +--- a/auth.c ++++ b/auth.c +@@ -400,7 +400,8 @@ auth_root_allowed(struct ssh *ssh, const char *method) + case PERMIT_NO_PASSWD: + if (strcmp(method, "publickey") == 0 || + strcmp(method, "hostbased") == 0 || +- strcmp(method, "gssapi-with-mic") == 0) ++ strcmp(method, "gssapi-with-mic") == 0 || ++ strcmp(method, "gssapi-keyex") == 0) + return 1; + break; + case PERMIT_FORCED_ONLY: +@@ -724,99 +725,6 @@ fakepw(void) + return (&fake); + } + +-/* +- * Returns the remote DNS hostname as a string. The returned string must not +- * be freed. NB. this will usually trigger a DNS query the first time it is +- * called. +- * This function does additional checks on the hostname to mitigate some +- * attacks on legacy rhosts-style authentication. +- * XXX is RhostsRSAAuthentication vulnerable to these? +- * XXX Can we remove these checks? (or if not, remove RhostsRSAAuthentication?) +- */ +- +-static char * +-remote_hostname(struct ssh *ssh) +-{ +- struct sockaddr_storage from; +- socklen_t fromlen; +- struct addrinfo hints, *ai, *aitop; +- char name[NI_MAXHOST], ntop2[NI_MAXHOST]; +- const char *ntop = ssh_remote_ipaddr(ssh); +- +- /* Get IP address of client. */ +- fromlen = sizeof(from); +- memset(&from, 0, sizeof(from)); +- if (getpeername(ssh_packet_get_connection_in(ssh), +- (struct sockaddr *)&from, &fromlen) == -1) { +- debug("getpeername failed: %.100s", strerror(errno)); +- return xstrdup(ntop); +- } +- +- ipv64_normalise_mapped(&from, &fromlen); +- if (from.ss_family == AF_INET6) +- fromlen = sizeof(struct sockaddr_in6); +- +- debug3("Trying to reverse map address %.100s.", ntop); +- /* Map the IP address to a host name. */ +- if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name), +- NULL, 0, NI_NAMEREQD) != 0) { +- /* Host name not found. Use ip address. */ +- return xstrdup(ntop); +- } +- +- /* +- * if reverse lookup result looks like a numeric hostname, +- * someone is trying to trick us by PTR record like following: +- * 1.1.1.10.in-addr.arpa. IN PTR 2.3.4.5 +- */ +- memset(&hints, 0, sizeof(hints)); +- hints.ai_socktype = SOCK_DGRAM; /*dummy*/ +- hints.ai_flags = AI_NUMERICHOST; +- if (getaddrinfo(name, NULL, &hints, &ai) == 0) { +- logit("Nasty PTR record \"%s\" is set up for %s, ignoring", +- name, ntop); +- freeaddrinfo(ai); +- return xstrdup(ntop); +- } +- +- /* Names are stored in lowercase. */ +- lowercase(name); +- +- /* +- * Map it back to an IP address and check that the given +- * address actually is an address of this host. This is +- * necessary because anyone with access to a name server can +- * define arbitrary names for an IP address. Mapping from +- * name to IP address can be trusted better (but can still be +- * fooled if the intruder has access to the name server of +- * the domain). +- */ +- memset(&hints, 0, sizeof(hints)); +- hints.ai_family = from.ss_family; +- hints.ai_socktype = SOCK_STREAM; +- if (getaddrinfo(name, NULL, &hints, &aitop) != 0) { +- logit("reverse mapping checking getaddrinfo for %.700s " +- "[%s] failed.", name, ntop); +- return xstrdup(ntop); +- } +- /* Look for the address from the list of addresses. */ +- for (ai = aitop; ai; ai = ai->ai_next) { +- if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop2, +- sizeof(ntop2), NULL, 0, NI_NUMERICHOST) == 0 && +- (strcmp(ntop, ntop2) == 0)) +- break; +- } +- freeaddrinfo(aitop); +- /* If we reached the end of the list, the address was not there. */ +- if (ai == NULL) { +- /* Address not found for the host name. */ +- logit("Address %.100s maps to %.600s, but this does not " +- "map back to the address.", ntop, name); +- return xstrdup(ntop); +- } +- return xstrdup(name); +-} +- + /* + * Return the canonical name of the host in the other side of the current + * connection. The host name is cached, so it is efficient to call this +diff --git a/auth2-gss.c b/auth2-gss.c +index 9351e0428..d6446c0cf 100644 +--- a/auth2-gss.c ++++ b/auth2-gss.c +@@ -1,7 +1,7 @@ + /* $OpenBSD: auth2-gss.c,v 1.29 2018/07/31 03:10:27 djm Exp $ */ + + /* +- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. ++ * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions +@@ -54,6 +54,48 @@ static int input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh); + static int input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh); + static int input_gssapi_errtok(int, u_int32_t, struct ssh *); + ++/* ++ * The 'gssapi_keyex' userauth mechanism. ++ */ ++static int ++userauth_gsskeyex(struct ssh *ssh) ++{ ++ Authctxt *authctxt = ssh->authctxt; ++ int r, authenticated = 0; ++ struct sshbuf *b = NULL; ++ gss_buffer_desc mic, gssbuf; ++ u_char *p; ++ size_t len; ++ ++ if ((r = sshpkt_get_string(ssh, &p, &len)) != 0 || ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("%s: %s", __func__, ssh_err(r)); ++ ++ if ((b = sshbuf_new()) == NULL) ++ fatal("%s: sshbuf_new failed", __func__); ++ ++ mic.value = p; ++ mic.length = len; ++ ++ ssh_gssapi_buildmic(b, authctxt->user, authctxt->service, ++ "gssapi-keyex"); ++ ++ if ((gssbuf.value = sshbuf_mutable_ptr(b)) == NULL) ++ fatal("%s: sshbuf_mutable_ptr failed", __func__); ++ gssbuf.length = sshbuf_len(b); ++ ++ /* gss_kex_context is NULL with privsep, so we can't check it here */ ++ if (!GSS_ERROR(PRIVSEP(ssh_gssapi_checkmic(gss_kex_context, ++ &gssbuf, &mic)))) ++ authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user, ++ authctxt->pw, 1)); ++ ++ sshbuf_free(b); ++ free(mic.value); ++ ++ return (authenticated); ++} ++ + /* + * We only support those mechanisms that we know about (ie ones that we know + * how to check local user kuserok and the like) +@@ -260,7 +302,8 @@ input_gssapi_exchange_complete(int type, u_int32_t plen, struct ssh *ssh) + if ((r = sshpkt_get_end(ssh)) != 0) + fatal("%s: %s", __func__, ssh_err(r)); + +- authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user)); ++ authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user, ++ authctxt->pw, 1)); + + if ((!use_privsep || mm_is_monitor()) && + (displayname = ssh_gssapi_displayname()) != NULL) +@@ -306,7 +349,8 @@ input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh) + gssbuf.length = sshbuf_len(b); + + if (!GSS_ERROR(PRIVSEP(ssh_gssapi_checkmic(gssctxt, &gssbuf, &mic)))) +- authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user)); ++ authenticated = PRIVSEP(ssh_gssapi_userok(authctxt->user, ++ authctxt->pw, 0)); + else + logit("GSSAPI MIC check failed"); + +@@ -326,6 +370,12 @@ input_gssapi_mic(int type, u_int32_t plen, struct ssh *ssh) + return 0; + } + ++Authmethod method_gsskeyex = { ++ "gssapi-keyex", ++ userauth_gsskeyex, ++ &options.gss_authentication ++}; ++ + Authmethod method_gssapi = { + "gssapi-with-mic", + userauth_gssapi, +diff --git a/auth2.c b/auth2.c +index 242a7adbe..9fa1404b3 100644 +--- a/auth2.c ++++ b/auth2.c +@@ -73,6 +73,7 @@ extern Authmethod method_passwd; + extern Authmethod method_kbdint; + extern Authmethod method_hostbased; + #ifdef GSSAPI ++extern Authmethod method_gsskeyex; + extern Authmethod method_gssapi; + #endif + +@@ -80,6 +81,7 @@ Authmethod *authmethods[] = { + &method_none, + &method_pubkey, + #ifdef GSSAPI ++ &method_gsskeyex, + &method_gssapi, + #endif + &method_passwd, +diff --git a/canohost.c b/canohost.c +index abea9c6e6..8e81b5193 100644 +--- a/canohost.c ++++ b/canohost.c +@@ -35,6 +35,99 @@ + #include "canohost.h" + #include "misc.h" + ++/* ++ * Returns the remote DNS hostname as a string. The returned string must not ++ * be freed. NB. this will usually trigger a DNS query the first time it is ++ * called. ++ * This function does additional checks on the hostname to mitigate some ++ * attacks on legacy rhosts-style authentication. ++ * XXX is RhostsRSAAuthentication vulnerable to these? ++ * XXX Can we remove these checks? (or if not, remove RhostsRSAAuthentication?) ++ */ ++ ++char * ++remote_hostname(struct ssh *ssh) ++{ ++ struct sockaddr_storage from; ++ socklen_t fromlen; ++ struct addrinfo hints, *ai, *aitop; ++ char name[NI_MAXHOST], ntop2[NI_MAXHOST]; ++ const char *ntop = ssh_remote_ipaddr(ssh); ++ ++ /* Get IP address of client. */ ++ fromlen = sizeof(from); ++ memset(&from, 0, sizeof(from)); ++ if (getpeername(ssh_packet_get_connection_in(ssh), ++ (struct sockaddr *)&from, &fromlen) == -1) { ++ debug("getpeername failed: %.100s", strerror(errno)); ++ return xstrdup(ntop); ++ } ++ ++ ipv64_normalise_mapped(&from, &fromlen); ++ if (from.ss_family == AF_INET6) ++ fromlen = sizeof(struct sockaddr_in6); ++ ++ debug3("Trying to reverse map address %.100s.", ntop); ++ /* Map the IP address to a host name. */ ++ if (getnameinfo((struct sockaddr *)&from, fromlen, name, sizeof(name), ++ NULL, 0, NI_NAMEREQD) != 0) { ++ /* Host name not found. Use ip address. */ ++ return xstrdup(ntop); ++ } ++ ++ /* ++ * if reverse lookup result looks like a numeric hostname, ++ * someone is trying to trick us by PTR record like following: ++ * 1.1.1.10.in-addr.arpa. IN PTR 2.3.4.5 ++ */ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_socktype = SOCK_DGRAM; /*dummy*/ ++ hints.ai_flags = AI_NUMERICHOST; ++ if (getaddrinfo(name, NULL, &hints, &ai) == 0) { ++ logit("Nasty PTR record \"%s\" is set up for %s, ignoring", ++ name, ntop); ++ freeaddrinfo(ai); ++ return xstrdup(ntop); ++ } ++ ++ /* Names are stored in lowercase. */ ++ lowercase(name); ++ ++ /* ++ * Map it back to an IP address and check that the given ++ * address actually is an address of this host. This is ++ * necessary because anyone with access to a name server can ++ * define arbitrary names for an IP address. Mapping from ++ * name to IP address can be trusted better (but can still be ++ * fooled if the intruder has access to the name server of ++ * the domain). ++ */ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = from.ss_family; ++ hints.ai_socktype = SOCK_STREAM; ++ if (getaddrinfo(name, NULL, &hints, &aitop) != 0) { ++ logit("reverse mapping checking getaddrinfo for %.700s " ++ "[%s] failed.", name, ntop); ++ return xstrdup(ntop); ++ } ++ /* Look for the address from the list of addresses. */ ++ for (ai = aitop; ai; ai = ai->ai_next) { ++ if (getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop2, ++ sizeof(ntop2), NULL, 0, NI_NUMERICHOST) == 0 && ++ (strcmp(ntop, ntop2) == 0)) ++ break; ++ } ++ freeaddrinfo(aitop); ++ /* If we reached the end of the list, the address was not there. */ ++ if (ai == NULL) { ++ /* Address not found for the host name. */ ++ logit("Address %.100s maps to %.600s, but this does not " ++ "map back to the address.", ntop, name); ++ return xstrdup(ntop); ++ } ++ return xstrdup(name); ++} ++ + void + ipv64_normalise_mapped(struct sockaddr_storage *addr, socklen_t *len) + { +diff --git a/canohost.h b/canohost.h +index 26d62855a..0cadc9f18 100644 +--- a/canohost.h ++++ b/canohost.h +@@ -15,6 +15,9 @@ + #ifndef _CANOHOST_H + #define _CANOHOST_H + ++struct ssh; ++ ++char *remote_hostname(struct ssh *); + char *get_peer_ipaddr(int); + int get_peer_port(int); + char *get_local_ipaddr(int); +diff --git a/clientloop.c b/clientloop.c +index 60b46d161..2cebea29f 100644 +--- a/clientloop.c ++++ b/clientloop.c +@@ -112,6 +112,10 @@ + #include "ssherr.h" + #include "hostfile.h" + ++#ifdef GSSAPI ++#include "ssh-gss.h" ++#endif ++ + /* import options */ + extern Options options; + +@@ -1368,9 +1372,18 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg, + break; + + /* Do channel operations unless rekeying in progress. */ +- if (!ssh_packet_is_rekeying(ssh)) ++ if (!ssh_packet_is_rekeying(ssh)) { + channel_after_select(ssh, readset, writeset); + ++#ifdef GSSAPI ++ if (options.gss_renewal_rekey && ++ ssh_gssapi_credentials_updated(NULL)) { ++ debug("credentials updated - forcing rekey"); ++ need_rekeying = 1; ++ } ++#endif ++ } ++ + /* Buffer input from the connection. */ + client_process_net_input(ssh, readset); + +diff --git a/configure.ac b/configure.ac +index 7005a503e..c8a96deb4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -679,6 +679,30 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) + [Use tunnel device compatibility to OpenBSD]) + AC_DEFINE([SSH_TUN_PREPEND_AF], [1], + [Prepend the address family to IP tunnel traffic]) ++ AC_MSG_CHECKING([if we have the Security Authorization Session API]) ++ AC_TRY_COMPILE([#include ], ++ [SessionCreate(0, 0);], ++ [ac_cv_use_security_session_api="yes" ++ AC_DEFINE([USE_SECURITY_SESSION_API], [1], ++ [platform has the Security Authorization Session API]) ++ LIBS="$LIBS -framework Security" ++ AC_MSG_RESULT([yes])], ++ [ac_cv_use_security_session_api="no" ++ AC_MSG_RESULT([no])]) ++ AC_MSG_CHECKING([if we have an in-memory credentials cache]) ++ AC_TRY_COMPILE( ++ [#include ], ++ [cc_context_t c; ++ (void) cc_initialize (&c, 0, NULL, NULL);], ++ [AC_DEFINE([USE_CCAPI], [1], ++ [platform uses an in-memory credentials cache]) ++ LIBS="$LIBS -framework Security" ++ AC_MSG_RESULT([yes]) ++ if test "x$ac_cv_use_security_session_api" = "xno"; then ++ AC_MSG_ERROR([*** Need a security framework to use the credentials cache API ***]) ++ fi], ++ [AC_MSG_RESULT([no])] ++ ) + m4_pattern_allow([AU_IPv]) + AC_CHECK_DECL([AU_IPv4], [], + AC_DEFINE([AU_IPv4], [0], [System only supports IPv4 audit records]) +diff --git a/gss-genr.c b/gss-genr.c +index d56257b4a..763a63ffa 100644 +--- a/gss-genr.c ++++ b/gss-genr.c +@@ -1,7 +1,7 @@ + /* $OpenBSD: gss-genr.c,v 1.26 2018/07/10 09:13:30 djm Exp $ */ + + /* +- * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved. ++ * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions +@@ -41,12 +41,36 @@ + #include "sshbuf.h" + #include "log.h" + #include "ssh2.h" ++#include "cipher.h" ++#include "sshkey.h" ++#include "kex.h" ++#include "digest.h" ++#include "packet.h" + + #include "ssh-gss.h" + + extern u_char *session_id2; + extern u_int session_id2_len; + ++typedef struct { ++ char *encoded; ++ gss_OID oid; ++} ssh_gss_kex_mapping; ++ ++/* ++ * XXX - It would be nice to find a more elegant way of handling the ++ * XXX passing of the key exchange context to the userauth routines ++ */ ++ ++Gssctxt *gss_kex_context = NULL; ++ ++static ssh_gss_kex_mapping *gss_enc2oid = NULL; ++ ++int ++ssh_gssapi_oid_table_ok(void) { ++ return (gss_enc2oid != NULL); ++} ++ + /* sshbuf_get for gss_buffer_desc */ + int + ssh_gssapi_get_buffer_desc(struct sshbuf *b, gss_buffer_desc *g) +@@ -62,6 +86,162 @@ ssh_gssapi_get_buffer_desc(struct sshbuf *b, gss_buffer_desc *g) + return 0; + } + ++/* sshpkt_get of gss_buffer_desc */ ++int ++ssh_gssapi_sshpkt_get_buffer_desc(struct ssh *ssh, gss_buffer_desc *g) ++{ ++ int r; ++ u_char *p; ++ size_t len; ++ ++ if ((r = sshpkt_get_string(ssh, &p, &len)) != 0) ++ return r; ++ g->value = p; ++ g->length = len; ++ return 0; ++} ++ ++/* ++ * Return a list of the gss-group1-sha1 mechanisms supported by this program ++ * ++ * We test mechanisms to ensure that we can use them, to avoid starting ++ * a key exchange with a bad mechanism ++ */ ++ ++char * ++ssh_gssapi_client_mechanisms(const char *host, const char *client, ++ const char *kex) { ++ gss_OID_set gss_supported = NULL; ++ OM_uint32 min_status; ++ ++ if (GSS_ERROR(gss_indicate_mechs(&min_status, &gss_supported))) ++ return NULL; ++ ++ return ssh_gssapi_kex_mechs(gss_supported, ssh_gssapi_check_mechanism, ++ host, client, kex); ++} ++ ++char * ++ssh_gssapi_kex_mechs(gss_OID_set gss_supported, ssh_gssapi_check_fn *check, ++ const char *host, const char *client, const char *kex) { ++ struct sshbuf *buf = NULL; ++ size_t i; ++ int r = SSH_ERR_ALLOC_FAIL; ++ int oidpos, enclen; ++ char *mechs, *encoded; ++ u_char digest[SSH_DIGEST_MAX_LENGTH]; ++ char deroid[2]; ++ struct ssh_digest_ctx *md = NULL; ++ char *s, *cp, *p; ++ ++ if (gss_enc2oid != NULL) { ++ for (i = 0; gss_enc2oid[i].encoded != NULL; i++) ++ free(gss_enc2oid[i].encoded); ++ free(gss_enc2oid); ++ } ++ ++ gss_enc2oid = xmalloc(sizeof(ssh_gss_kex_mapping) * ++ (gss_supported->count + 1)); ++ ++ if ((buf = sshbuf_new()) == NULL) ++ fatal("%s: sshbuf_new failed", __func__); ++ ++ oidpos = 0; ++ s = cp = xstrdup(kex); ++ for (i = 0; i < gss_supported->count; i++) { ++ if (gss_supported->elements[i].length < 128 && ++ (*check)(NULL, &(gss_supported->elements[i]), host, client)) { ++ ++ deroid[0] = SSH_GSS_OIDTYPE; ++ deroid[1] = gss_supported->elements[i].length; ++ ++ if ((md = ssh_digest_start(SSH_DIGEST_MD5)) == NULL || ++ (r = ssh_digest_update(md, deroid, 2)) != 0 || ++ (r = ssh_digest_update(md, ++ gss_supported->elements[i].elements, ++ gss_supported->elements[i].length)) != 0 || ++ (r = ssh_digest_final(md, digest, sizeof(digest))) != 0) ++ fatal("%s: digest failed: %s", __func__, ++ ssh_err(r)); ++ ssh_digest_free(md); ++ md = NULL; ++ ++ encoded = xmalloc(ssh_digest_bytes(SSH_DIGEST_MD5) ++ * 2); ++ enclen = __b64_ntop(digest, ++ ssh_digest_bytes(SSH_DIGEST_MD5), encoded, ++ ssh_digest_bytes(SSH_DIGEST_MD5) * 2); ++ ++ cp = strncpy(s, kex, strlen(kex)); ++ for ((p = strsep(&cp, ",")); p && *p != '\0'; ++ (p = strsep(&cp, ","))) { ++ if (sshbuf_len(buf) != 0 && ++ (r = sshbuf_put_u8(buf, ',')) != 0) ++ fatal("%s: sshbuf_put_u8 error: %s", ++ __func__, ssh_err(r)); ++ if ((r = sshbuf_put(buf, p, strlen(p))) != 0 || ++ (r = sshbuf_put(buf, encoded, enclen)) != 0) ++ fatal("%s: sshbuf_put error: %s", ++ __func__, ssh_err(r)); ++ } ++ ++ gss_enc2oid[oidpos].oid = &(gss_supported->elements[i]); ++ gss_enc2oid[oidpos].encoded = encoded; ++ oidpos++; ++ } ++ } ++ free(s); ++ gss_enc2oid[oidpos].oid = NULL; ++ gss_enc2oid[oidpos].encoded = NULL; ++ ++ if ((mechs = sshbuf_dup_string(buf)) == NULL) ++ fatal("%s: sshbuf_dup_string failed", __func__); ++ ++ sshbuf_free(buf); ++ ++ if (strlen(mechs) == 0) { ++ free(mechs); ++ mechs = NULL; ++ } ++ ++ return (mechs); ++} ++ ++gss_OID ++ssh_gssapi_id_kex(Gssctxt *ctx, char *name, int kex_type) { ++ int i = 0; ++ ++#define SKIP_KEX_NAME(type) \ ++ case type: \ ++ if (strlen(name) < sizeof(type##_ID)) \ ++ return GSS_C_NO_OID; \ ++ name += sizeof(type##_ID) - 1; \ ++ break; ++ ++ switch (kex_type) { ++ SKIP_KEX_NAME(KEX_GSS_GRP1_SHA1) ++ SKIP_KEX_NAME(KEX_GSS_GRP14_SHA1) ++ SKIP_KEX_NAME(KEX_GSS_GRP14_SHA256) ++ SKIP_KEX_NAME(KEX_GSS_GRP16_SHA512) ++ SKIP_KEX_NAME(KEX_GSS_GEX_SHA1) ++ SKIP_KEX_NAME(KEX_GSS_NISTP256_SHA256) ++ SKIP_KEX_NAME(KEX_GSS_C25519_SHA256) ++ default: ++ return GSS_C_NO_OID; ++ } ++ ++#undef SKIP_KEX_NAME ++ ++ while (gss_enc2oid[i].encoded != NULL && ++ strcmp(name, gss_enc2oid[i].encoded) != 0) ++ i++; ++ ++ if (gss_enc2oid[i].oid != NULL && ctx != NULL) ++ ssh_gssapi_set_oid(ctx, gss_enc2oid[i].oid); ++ ++ return gss_enc2oid[i].oid; ++} ++ + /* Check that the OID in a data stream matches that in the context */ + int + ssh_gssapi_check_oid(Gssctxt *ctx, void *data, size_t len) +@@ -218,7 +398,7 @@ ssh_gssapi_init_ctx(Gssctxt *ctx, int deleg_creds, gss_buffer_desc *recv_tok, + } + + ctx->major = gss_init_sec_context(&ctx->minor, +- GSS_C_NO_CREDENTIAL, &ctx->context, ctx->name, ctx->oid, ++ ctx->client_creds, &ctx->context, ctx->name, ctx->oid, + GSS_C_MUTUAL_FLAG | GSS_C_INTEG_FLAG | deleg_flag, + 0, NULL, recv_tok, NULL, send_tok, flags, NULL); + +@@ -247,9 +427,43 @@ ssh_gssapi_import_name(Gssctxt *ctx, const char *host) + return (ctx->major); + } + ++OM_uint32 ++ssh_gssapi_client_identity(Gssctxt *ctx, const char *name) ++{ ++ gss_buffer_desc gssbuf; ++ gss_name_t gssname; ++ OM_uint32 status; ++ gss_OID_set oidset; ++ ++ gssbuf.value = (void *) name; ++ gssbuf.length = strlen(gssbuf.value); ++ ++ gss_create_empty_oid_set(&status, &oidset); ++ gss_add_oid_set_member(&status, ctx->oid, &oidset); ++ ++ ctx->major = gss_import_name(&ctx->minor, &gssbuf, ++ GSS_C_NT_USER_NAME, &gssname); ++ ++ if (!ctx->major) ++ ctx->major = gss_acquire_cred(&ctx->minor, ++ gssname, 0, oidset, GSS_C_INITIATE, ++ &ctx->client_creds, NULL, NULL); ++ ++ gss_release_name(&status, &gssname); ++ gss_release_oid_set(&status, &oidset); ++ ++ if (ctx->major) ++ ssh_gssapi_error(ctx); ++ ++ return(ctx->major); ++} ++ + OM_uint32 + ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash) + { ++ if (ctx == NULL) ++ return -1; ++ + if ((ctx->major = gss_get_mic(&ctx->minor, ctx->context, + GSS_C_QOP_DEFAULT, buffer, hash))) + ssh_gssapi_error(ctx); +@@ -257,6 +471,19 @@ ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash) + return (ctx->major); + } + ++/* Priviledged when used by server */ ++OM_uint32 ++ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic) ++{ ++ if (ctx == NULL) ++ return -1; ++ ++ ctx->major = gss_verify_mic(&ctx->minor, ctx->context, ++ gssbuf, gssmic, NULL); ++ ++ return (ctx->major); ++} ++ + void + ssh_gssapi_buildmic(struct sshbuf *b, const char *user, const char *service, + const char *context) +@@ -273,11 +500,16 @@ ssh_gssapi_buildmic(struct sshbuf *b, const char *user, const char *service, + } + + int +-ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host) ++ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host, ++ const char *client) + { + gss_buffer_desc token = GSS_C_EMPTY_BUFFER; + OM_uint32 major, minor; + gss_OID_desc spnego_oid = {6, (void *)"\x2B\x06\x01\x05\x05\x02"}; ++ Gssctxt *intctx = NULL; ++ ++ if (ctx == NULL) ++ ctx = &intctx; + + /* RFC 4462 says we MUST NOT do SPNEGO */ + if (oid->length == spnego_oid.length && +@@ -287,6 +519,10 @@ ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host) + ssh_gssapi_build_ctx(ctx); + ssh_gssapi_set_oid(*ctx, oid); + major = ssh_gssapi_import_name(*ctx, host); ++ ++ if (!GSS_ERROR(major) && client) ++ major = ssh_gssapi_client_identity(*ctx, client); ++ + if (!GSS_ERROR(major)) { + major = ssh_gssapi_init_ctx(*ctx, 0, GSS_C_NO_BUFFER, &token, + NULL); +@@ -296,10 +532,66 @@ ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host) + GSS_C_NO_BUFFER); + } + +- if (GSS_ERROR(major)) ++ if (GSS_ERROR(major) || intctx != NULL) + ssh_gssapi_delete_ctx(ctx); + + return (!GSS_ERROR(major)); + } + ++int ++ssh_gssapi_credentials_updated(Gssctxt *ctxt) { ++ static gss_name_t saved_name = GSS_C_NO_NAME; ++ static OM_uint32 saved_lifetime = 0; ++ static gss_OID saved_mech = GSS_C_NO_OID; ++ static gss_name_t name; ++ static OM_uint32 last_call = 0; ++ OM_uint32 lifetime, now, major, minor; ++ int equal; ++ ++ now = time(NULL); ++ ++ if (ctxt) { ++ debug("Rekey has happened - updating saved versions"); ++ ++ if (saved_name != GSS_C_NO_NAME) ++ gss_release_name(&minor, &saved_name); ++ ++ major = gss_inquire_cred(&minor, GSS_C_NO_CREDENTIAL, ++ &saved_name, &saved_lifetime, NULL, NULL); ++ ++ if (!GSS_ERROR(major)) { ++ saved_mech = ctxt->oid; ++ saved_lifetime+= now; ++ } else { ++ /* Handle the error */ ++ } ++ return 0; ++ } ++ ++ if (now - last_call < 10) ++ return 0; ++ ++ last_call = now; ++ ++ if (saved_mech == GSS_C_NO_OID) ++ return 0; ++ ++ major = gss_inquire_cred(&minor, GSS_C_NO_CREDENTIAL, ++ &name, &lifetime, NULL, NULL); ++ if (major == GSS_S_CREDENTIALS_EXPIRED) ++ return 0; ++ else if (GSS_ERROR(major)) ++ return 0; ++ ++ major = gss_compare_name(&minor, saved_name, name, &equal); ++ gss_release_name(&minor, &name); ++ if (GSS_ERROR(major)) ++ return 0; ++ ++ if (equal && (saved_lifetime < lifetime + now - 10)) ++ return 1; ++ ++ return 0; ++} ++ + #endif /* GSSAPI */ +diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c +index a151bc1e4..ef9beb67c 100644 +--- a/gss-serv-krb5.c ++++ b/gss-serv-krb5.c +@@ -1,7 +1,7 @@ + /* $OpenBSD: gss-serv-krb5.c,v 1.9 2018/07/09 21:37:55 markus Exp $ */ + + /* +- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. ++ * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions +@@ -120,8 +120,8 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client) + krb5_error_code problem; + krb5_principal princ; + OM_uint32 maj_status, min_status; +- int len; + const char *errmsg; ++ const char *new_ccname; + + if (client->creds == NULL) { + debug("No credentials stored"); +@@ -180,11 +180,16 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client) + return; + } + +- client->store.filename = xstrdup(krb5_cc_get_name(krb_context, ccache)); ++ new_ccname = krb5_cc_get_name(krb_context, ccache); ++ + client->store.envvar = "KRB5CCNAME"; +- len = strlen(client->store.filename) + 6; +- client->store.envval = xmalloc(len); +- snprintf(client->store.envval, len, "FILE:%s", client->store.filename); ++#ifdef USE_CCAPI ++ xasprintf(&client->store.envval, "API:%s", new_ccname); ++ client->store.filename = NULL; ++#else ++ xasprintf(&client->store.envval, "FILE:%s", new_ccname); ++ client->store.filename = xstrdup(new_ccname); ++#endif + + #ifdef USE_PAM + if (options.use_pam) +@@ -196,6 +201,71 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client) + return; + } + ++int ++ssh_gssapi_krb5_updatecreds(ssh_gssapi_ccache *store, ++ ssh_gssapi_client *client) ++{ ++ krb5_ccache ccache = NULL; ++ krb5_principal principal = NULL; ++ char *name = NULL; ++ krb5_error_code problem; ++ OM_uint32 maj_status, min_status; ++ ++ if ((problem = krb5_cc_resolve(krb_context, store->envval, &ccache))) { ++ logit("krb5_cc_resolve(): %.100s", ++ krb5_get_err_text(krb_context, problem)); ++ return 0; ++ } ++ ++ /* Find out who the principal in this cache is */ ++ if ((problem = krb5_cc_get_principal(krb_context, ccache, ++ &principal))) { ++ logit("krb5_cc_get_principal(): %.100s", ++ krb5_get_err_text(krb_context, problem)); ++ krb5_cc_close(krb_context, ccache); ++ return 0; ++ } ++ ++ if ((problem = krb5_unparse_name(krb_context, principal, &name))) { ++ logit("krb5_unparse_name(): %.100s", ++ krb5_get_err_text(krb_context, problem)); ++ krb5_free_principal(krb_context, principal); ++ krb5_cc_close(krb_context, ccache); ++ return 0; ++ } ++ ++ ++ if (strcmp(name,client->exportedname.value)!=0) { ++ debug("Name in local credentials cache differs. Not storing"); ++ krb5_free_principal(krb_context, principal); ++ krb5_cc_close(krb_context, ccache); ++ krb5_free_unparsed_name(krb_context, name); ++ return 0; ++ } ++ krb5_free_unparsed_name(krb_context, name); ++ ++ /* Name matches, so lets get on with it! */ ++ ++ if ((problem = krb5_cc_initialize(krb_context, ccache, principal))) { ++ logit("krb5_cc_initialize(): %.100s", ++ krb5_get_err_text(krb_context, problem)); ++ krb5_free_principal(krb_context, principal); ++ krb5_cc_close(krb_context, ccache); ++ return 0; ++ } ++ ++ krb5_free_principal(krb_context, principal); ++ ++ if ((maj_status = gss_krb5_copy_ccache(&min_status, client->creds, ++ ccache))) { ++ logit("gss_krb5_copy_ccache() failed. Sorry!"); ++ krb5_cc_close(krb_context, ccache); ++ return 0; ++ } ++ ++ return 1; ++} ++ + ssh_gssapi_mech gssapi_kerberos_mech = { + "toWM5Slw5Ew8Mqkay+al2g==", + "Kerberos", +@@ -203,7 +273,8 @@ ssh_gssapi_mech gssapi_kerberos_mech = { + NULL, + &ssh_gssapi_krb5_userok, + NULL, +- &ssh_gssapi_krb5_storecreds ++ &ssh_gssapi_krb5_storecreds, ++ &ssh_gssapi_krb5_updatecreds + }; + + #endif /* KRB5 */ +diff --git a/gss-serv.c b/gss-serv.c +index b5d4bb2d1..55f4d4bda 100644 +--- a/gss-serv.c ++++ b/gss-serv.c +@@ -1,7 +1,7 @@ + /* $OpenBSD: gss-serv.c,v 1.32 2020/03/13 03:17:07 djm Exp $ */ + + /* +- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. ++ * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions +@@ -44,17 +44,19 @@ + #include "session.h" + #include "misc.h" + #include "servconf.h" ++#include "uidswap.h" + + #include "ssh-gss.h" ++#include "monitor_wrap.h" + + extern ServerOptions options; + + static ssh_gssapi_client gssapi_client = +- { GSS_C_EMPTY_BUFFER, GSS_C_EMPTY_BUFFER, +- GSS_C_NO_CREDENTIAL, NULL, {NULL, NULL, NULL, NULL}}; ++ { GSS_C_EMPTY_BUFFER, GSS_C_EMPTY_BUFFER, GSS_C_NO_CREDENTIAL, ++ GSS_C_NO_NAME, NULL, {NULL, NULL, NULL, NULL, NULL}, 0, 0}; + + ssh_gssapi_mech gssapi_null_mech = +- { NULL, NULL, {0, NULL}, NULL, NULL, NULL, NULL}; ++ { NULL, NULL, {0, NULL}, NULL, NULL, NULL, NULL, NULL}; + + #ifdef KRB5 + extern ssh_gssapi_mech gssapi_kerberos_mech; +@@ -140,6 +142,29 @@ ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid) + return (ssh_gssapi_acquire_cred(*ctx)); + } + ++/* Unprivileged */ ++char * ++ssh_gssapi_server_mechanisms(void) { ++ if (supported_oids == NULL) ++ ssh_gssapi_prepare_supported_oids(); ++ return (ssh_gssapi_kex_mechs(supported_oids, ++ &ssh_gssapi_server_check_mech, NULL, NULL, ++ options.gss_kex_algorithms)); ++} ++ ++/* Unprivileged */ ++int ++ssh_gssapi_server_check_mech(Gssctxt **dum, gss_OID oid, const char *data, ++ const char *dummy) { ++ Gssctxt *ctx = NULL; ++ int res; ++ ++ res = !GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctx, oid))); ++ ssh_gssapi_delete_ctx(&ctx); ++ ++ return (res); ++} ++ + /* Unprivileged */ + void + ssh_gssapi_supported_oids(gss_OID_set *oidset) +@@ -150,7 +175,9 @@ ssh_gssapi_supported_oids(gss_OID_set *oidset) + gss_OID_set supported; + + gss_create_empty_oid_set(&min_status, oidset); +- gss_indicate_mechs(&min_status, &supported); ++ ++ if (GSS_ERROR(gss_indicate_mechs(&min_status, &supported))) ++ return; + + while (supported_mechs[i]->name != NULL) { + if (GSS_ERROR(gss_test_oid_set_member(&min_status, +@@ -276,8 +303,48 @@ OM_uint32 + ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client) + { + int i = 0; ++ int equal = 0; ++ gss_name_t new_name = GSS_C_NO_NAME; ++ gss_buffer_desc ename = GSS_C_EMPTY_BUFFER; ++ ++ if (options.gss_store_rekey && client->used && ctx->client_creds) { ++ if (client->mech->oid.length != ctx->oid->length || ++ (memcmp(client->mech->oid.elements, ++ ctx->oid->elements, ctx->oid->length) !=0)) { ++ debug("Rekeyed credentials have different mechanism"); ++ return GSS_S_COMPLETE; ++ } ++ ++ if ((ctx->major = gss_inquire_cred_by_mech(&ctx->minor, ++ ctx->client_creds, ctx->oid, &new_name, ++ NULL, NULL, NULL))) { ++ ssh_gssapi_error(ctx); ++ return (ctx->major); ++ } ++ ++ ctx->major = gss_compare_name(&ctx->minor, client->name, ++ new_name, &equal); ++ ++ if (GSS_ERROR(ctx->major)) { ++ ssh_gssapi_error(ctx); ++ return (ctx->major); ++ } ++ ++ if (!equal) { ++ debug("Rekeyed credentials have different name"); ++ return GSS_S_COMPLETE; ++ } + +- gss_buffer_desc ename; ++ debug("Marking rekeyed credentials for export"); ++ ++ gss_release_name(&ctx->minor, &client->name); ++ gss_release_cred(&ctx->minor, &client->creds); ++ client->name = new_name; ++ client->creds = ctx->client_creds; ++ ctx->client_creds = GSS_C_NO_CREDENTIAL; ++ client->updated = 1; ++ return GSS_S_COMPLETE; ++ } + + client->mech = NULL; + +@@ -292,6 +359,13 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client) + if (client->mech == NULL) + return GSS_S_FAILURE; + ++ if (ctx->client_creds && ++ (ctx->major = gss_inquire_cred_by_mech(&ctx->minor, ++ ctx->client_creds, ctx->oid, &client->name, NULL, NULL, NULL))) { ++ ssh_gssapi_error(ctx); ++ return (ctx->major); ++ } ++ + if ((ctx->major = gss_display_name(&ctx->minor, ctx->client, + &client->displayname, NULL))) { + ssh_gssapi_error(ctx); +@@ -309,6 +383,8 @@ ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client) + return (ctx->major); + } + ++ gss_release_buffer(&ctx->minor, &ename); ++ + /* We can't copy this structure, so we just move the pointer to it */ + client->creds = ctx->client_creds; + ctx->client_creds = GSS_C_NO_CREDENTIAL; +@@ -356,19 +432,23 @@ ssh_gssapi_do_child(char ***envp, u_int *envsizep) + + /* Privileged */ + int +-ssh_gssapi_userok(char *user) ++ssh_gssapi_userok(char *user, struct passwd *pw, int kex) + { + OM_uint32 lmin; + ++ (void) kex; /* used in privilege separation */ ++ + if (gssapi_client.exportedname.length == 0 || + gssapi_client.exportedname.value == NULL) { + debug("No suitable client data"); + return 0; + } + if (gssapi_client.mech && gssapi_client.mech->userok) +- if ((*gssapi_client.mech->userok)(&gssapi_client, user)) ++ if ((*gssapi_client.mech->userok)(&gssapi_client, user)) { ++ gssapi_client.used = 1; ++ gssapi_client.store.owner = pw; + return 1; +- else { ++ } else { + /* Destroy delegated credentials if userok fails */ + gss_release_buffer(&lmin, &gssapi_client.displayname); + gss_release_buffer(&lmin, &gssapi_client.exportedname); +@@ -382,14 +462,90 @@ ssh_gssapi_userok(char *user) + return (0); + } + +-/* Privileged */ +-OM_uint32 +-ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic) ++/* These bits are only used for rekeying. The unpriviledged child is running ++ * as the user, the monitor is root. ++ * ++ * In the child, we want to : ++ * *) Ask the monitor to store our credentials into the store we specify ++ * *) If it succeeds, maybe do a PAM update ++ */ ++ ++/* Stuff for PAM */ ++ ++#ifdef USE_PAM ++static int ssh_gssapi_simple_conv(int n, const struct pam_message **msg, ++ struct pam_response **resp, void *data) + { +- ctx->major = gss_verify_mic(&ctx->minor, ctx->context, +- gssbuf, gssmic, NULL); ++ return (PAM_CONV_ERR); ++} ++#endif + +- return (ctx->major); ++void ++ssh_gssapi_rekey_creds(void) { ++ int ok; ++#ifdef USE_PAM ++ int ret; ++ pam_handle_t *pamh = NULL; ++ struct pam_conv pamconv = {ssh_gssapi_simple_conv, NULL}; ++ char *envstr; ++#endif ++ ++ if (gssapi_client.store.filename == NULL && ++ gssapi_client.store.envval == NULL && ++ gssapi_client.store.envvar == NULL) ++ return; ++ ++ ok = PRIVSEP(ssh_gssapi_update_creds(&gssapi_client.store)); ++ ++ if (!ok) ++ return; ++ ++ debug("Rekeyed credentials stored successfully"); ++ ++ /* Actually managing to play with the ssh pam stack from here will ++ * be next to impossible. In any case, we may want different options ++ * for rekeying. So, use our own :) ++ */ ++#ifdef USE_PAM ++ if (!use_privsep) { ++ debug("Not even going to try and do PAM with privsep disabled"); ++ return; ++ } ++ ++ ret = pam_start("sshd-rekey", gssapi_client.store.owner->pw_name, ++ &pamconv, &pamh); ++ if (ret) ++ return; ++ ++ xasprintf(&envstr, "%s=%s", gssapi_client.store.envvar, ++ gssapi_client.store.envval); ++ ++ ret = pam_putenv(pamh, envstr); ++ if (!ret) ++ pam_setcred(pamh, PAM_REINITIALIZE_CRED); ++ pam_end(pamh, PAM_SUCCESS); ++#endif ++} ++ ++int ++ssh_gssapi_update_creds(ssh_gssapi_ccache *store) { ++ int ok = 0; ++ ++ /* Check we've got credentials to store */ ++ if (!gssapi_client.updated) ++ return 0; ++ ++ gssapi_client.updated = 0; ++ ++ temporarily_use_uid(gssapi_client.store.owner); ++ if (gssapi_client.mech && gssapi_client.mech->updatecreds) ++ ok = (*gssapi_client.mech->updatecreds)(store, &gssapi_client); ++ else ++ debug("No update function for this mechanism"); ++ ++ restore_uid(); ++ ++ return ok; + } + + /* Privileged */ +diff --git a/kex.c b/kex.c +index aecb9394d..751cfc710 100644 +--- a/kex.c ++++ b/kex.c +@@ -57,11 +57,16 @@ + #include "misc.h" + #include "dispatch.h" + #include "monitor.h" ++#include "xmalloc.h" + + #include "ssherr.h" + #include "sshbuf.h" + #include "digest.h" + ++#ifdef GSSAPI ++#include "ssh-gss.h" ++#endif ++ + /* prototype */ + static int kex_choose_conf(struct ssh *); + static int kex_input_newkeys(int, u_int32_t, struct ssh *); +@@ -115,15 +120,28 @@ static const struct kexalg kexalgs[] = { + #endif /* HAVE_EVP_SHA256 || !WITH_OPENSSL */ + { NULL, 0, -1, -1}, + }; ++static const struct kexalg gss_kexalgs[] = { ++#ifdef GSSAPI ++ { KEX_GSS_GEX_SHA1_ID, KEX_GSS_GEX_SHA1, 0, SSH_DIGEST_SHA1 }, ++ { KEX_GSS_GRP1_SHA1_ID, KEX_GSS_GRP1_SHA1, 0, SSH_DIGEST_SHA1 }, ++ { KEX_GSS_GRP14_SHA1_ID, KEX_GSS_GRP14_SHA1, 0, SSH_DIGEST_SHA1 }, ++ { KEX_GSS_GRP14_SHA256_ID, KEX_GSS_GRP14_SHA256, 0, SSH_DIGEST_SHA256 }, ++ { KEX_GSS_GRP16_SHA512_ID, KEX_GSS_GRP16_SHA512, 0, SSH_DIGEST_SHA512 }, ++ { KEX_GSS_NISTP256_SHA256_ID, KEX_GSS_NISTP256_SHA256, ++ NID_X9_62_prime256v1, SSH_DIGEST_SHA256 }, ++ { KEX_GSS_C25519_SHA256_ID, KEX_GSS_C25519_SHA256, 0, SSH_DIGEST_SHA256 }, ++#endif ++ { NULL, 0, -1, -1}, ++}; + +-char * +-kex_alg_list(char sep) ++static char * ++kex_alg_list_internal(char sep, const struct kexalg *algs) + { + char *ret = NULL, *tmp; + size_t nlen, rlen = 0; + const struct kexalg *k; + +- for (k = kexalgs; k->name != NULL; k++) { ++ for (k = algs; k->name != NULL; k++) { + if (ret != NULL) + ret[rlen++] = sep; + nlen = strlen(k->name); +@@ -138,6 +156,18 @@ kex_alg_list(char sep) + return ret; + } + ++char * ++kex_alg_list(char sep) ++{ ++ return kex_alg_list_internal(sep, kexalgs); ++} ++ ++char * ++kex_gss_alg_list(char sep) ++{ ++ return kex_alg_list_internal(sep, gss_kexalgs); ++} ++ + static const struct kexalg * + kex_alg_by_name(const char *name) + { +@@ -147,6 +177,10 @@ kex_alg_by_name(const char *name) + if (strcmp(k->name, name) == 0) + return k; + } ++ for (k = gss_kexalgs; k->name != NULL; k++) { ++ if (strncmp(k->name, name, strlen(k->name)) == 0) ++ return k; ++ } + return NULL; + } + +@@ -315,6 +349,29 @@ kex_assemble_names(char **listp, const char *def, const char *all) + return r; + } + ++/* Validate GSS KEX method name list */ ++int ++kex_gss_names_valid(const char *names) ++{ ++ char *s, *cp, *p; ++ ++ if (names == NULL || *names == '\0') ++ return 0; ++ s = cp = xstrdup(names); ++ for ((p = strsep(&cp, ",")); p && *p != '\0'; ++ (p = strsep(&cp, ","))) { ++ if (strncmp(p, "gss-", 4) != 0 ++ || kex_alg_by_name(p) == NULL) { ++ error("Unsupported KEX algorithm \"%.100s\"", p); ++ free(s); ++ return 0; ++ } ++ } ++ debug3("gss kex names ok: [%s]", names); ++ free(s); ++ return 1; ++} ++ + /* put algorithm proposal into buffer */ + int + kex_prop2buf(struct sshbuf *b, char *proposal[PROPOSAL_MAX]) +@@ -697,6 +754,9 @@ kex_free(struct kex *kex) + sshbuf_free(kex->server_version); + sshbuf_free(kex->client_pub); + free(kex->session_id); ++#ifdef GSSAPI ++ free(kex->gss_host); ++#endif /* GSSAPI */ + free(kex->failed_choice); + free(kex->hostkey_alg); + free(kex->name); +diff --git a/kex.h b/kex.h +index a5ae6ac05..fe7141414 100644 +--- a/kex.h ++++ b/kex.h +@@ -102,6 +102,15 @@ enum kex_exchange { + KEX_ECDH_SHA2, + KEX_C25519_SHA256, + KEX_KEM_SNTRUP4591761X25519_SHA512, ++#ifdef GSSAPI ++ KEX_GSS_GRP1_SHA1, ++ KEX_GSS_GRP14_SHA1, ++ KEX_GSS_GRP14_SHA256, ++ KEX_GSS_GRP16_SHA512, ++ KEX_GSS_GEX_SHA1, ++ KEX_GSS_NISTP256_SHA256, ++ KEX_GSS_C25519_SHA256, ++#endif + KEX_MAX + }; + +@@ -153,6 +162,12 @@ struct kex { + u_int flags; + int hash_alg; + int ec_nid; ++#ifdef GSSAPI ++ int gss_deleg_creds; ++ int gss_trust_dns; ++ char *gss_host; ++ char *gss_client; ++#endif + char *failed_choice; + int (*verify_host_key)(struct sshkey *, struct ssh *); + struct sshkey *(*load_host_public_key)(int, int, struct ssh *); +@@ -174,8 +189,10 @@ struct kex { + + int kex_names_valid(const char *); + char *kex_alg_list(char); ++char *kex_gss_alg_list(char); + char *kex_names_cat(const char *, const char *); + int kex_assemble_names(char **, const char *, const char *); ++int kex_gss_names_valid(const char *); + + int kex_exchange_identification(struct ssh *, int, const char *); + +@@ -202,6 +219,12 @@ int kexgex_client(struct ssh *); + int kexgex_server(struct ssh *); + int kex_gen_client(struct ssh *); + int kex_gen_server(struct ssh *); ++#if defined(GSSAPI) && defined(WITH_OPENSSL) ++int kexgssgex_client(struct ssh *); ++int kexgssgex_server(struct ssh *); ++int kexgss_client(struct ssh *); ++int kexgss_server(struct ssh *); ++#endif + + int kex_dh_keypair(struct kex *); + int kex_dh_enc(struct kex *, const struct sshbuf *, struct sshbuf **, +@@ -234,6 +257,12 @@ int kexgex_hash(int, const struct sshbuf *, const struct sshbuf *, + const BIGNUM *, const u_char *, size_t, + u_char *, size_t *); + ++int kex_gen_hash(int hash_alg, const struct sshbuf *client_version, ++ const struct sshbuf *server_version, const struct sshbuf *client_kexinit, ++ const struct sshbuf *server_kexinit, const struct sshbuf *server_host_key_blob, ++ const struct sshbuf *client_pub, const struct sshbuf *server_pub, ++ const struct sshbuf *shared_secret, u_char *hash, size_t *hashlen); ++ + void kexc25519_keygen(u_char key[CURVE25519_SIZE], u_char pub[CURVE25519_SIZE]) + __attribute__((__bounded__(__minbytes__, 1, CURVE25519_SIZE))) + __attribute__((__bounded__(__minbytes__, 2, CURVE25519_SIZE))); +diff --git a/kexdh.c b/kexdh.c +index 6e0159f9f..d024a8b9a 100644 +--- a/kexdh.c ++++ b/kexdh.c +@@ -49,13 +49,23 @@ kex_dh_keygen(struct kex *kex) + { + switch (kex->kex_type) { + case KEX_DH_GRP1_SHA1: ++#ifdef GSSAPI ++ case KEX_GSS_GRP1_SHA1: ++#endif + kex->dh = dh_new_group1(); + break; + case KEX_DH_GRP14_SHA1: + case KEX_DH_GRP14_SHA256: ++#ifdef GSSAPI ++ case KEX_GSS_GRP14_SHA1: ++ case KEX_GSS_GRP14_SHA256: ++#endif + kex->dh = dh_new_group14(); + break; + case KEX_DH_GRP16_SHA512: ++#ifdef GSSAPI ++ case KEX_GSS_GRP16_SHA512: ++#endif + kex->dh = dh_new_group16(); + break; + case KEX_DH_GRP18_SHA512: +diff --git a/kexgen.c b/kexgen.c +index 69348b964..c0e8c2f44 100644 +--- a/kexgen.c ++++ b/kexgen.c +@@ -44,7 +44,7 @@ + static int input_kex_gen_init(int, u_int32_t, struct ssh *); + static int input_kex_gen_reply(int type, u_int32_t seq, struct ssh *ssh); + +-static int ++int + kex_gen_hash( + int hash_alg, + const struct sshbuf *client_version, +diff --git a/kexgssc.c b/kexgssc.c +new file mode 100644 +index 000000000..f6e1405eb +--- /dev/null ++++ b/kexgssc.c +@@ -0,0 +1,606 @@ ++/* ++ * Copyright (c) 2001-2009 Simon Wilkinson. 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. ++ */ ++ ++#include "includes.h" ++ ++#if defined(GSSAPI) && defined(WITH_OPENSSL) ++ ++#include "includes.h" ++ ++#include ++#include ++ ++#include ++ ++#include "xmalloc.h" ++#include "sshbuf.h" ++#include "ssh2.h" ++#include "sshkey.h" ++#include "cipher.h" ++#include "kex.h" ++#include "log.h" ++#include "packet.h" ++#include "dh.h" ++#include "digest.h" ++#include "ssherr.h" ++ ++#include "ssh-gss.h" ++ ++int ++kexgss_client(struct ssh *ssh) ++{ ++ struct kex *kex = ssh->kex; ++ gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER, ++ recv_tok = GSS_C_EMPTY_BUFFER, ++ gssbuf, msg_tok = GSS_C_EMPTY_BUFFER, *token_ptr; ++ Gssctxt *ctxt; ++ OM_uint32 maj_status, min_status, ret_flags; ++ struct sshbuf *server_blob = NULL; ++ struct sshbuf *shared_secret = NULL; ++ struct sshbuf *server_host_key_blob = NULL; ++ struct sshbuf *empty = NULL; ++ u_char *msg; ++ int type = 0; ++ int first = 1; ++ u_char hash[SSH_DIGEST_MAX_LENGTH]; ++ size_t hashlen; ++ u_char c; ++ int r; ++ ++ /* Initialise our GSSAPI world */ ++ ssh_gssapi_build_ctx(&ctxt); ++ if (ssh_gssapi_id_kex(ctxt, kex->name, kex->kex_type) ++ == GSS_C_NO_OID) ++ fatal("Couldn't identify host exchange"); ++ ++ if (ssh_gssapi_import_name(ctxt, kex->gss_host)) ++ fatal("Couldn't import hostname"); ++ ++ if (kex->gss_client && ++ ssh_gssapi_client_identity(ctxt, kex->gss_client)) ++ fatal("Couldn't acquire client credentials"); ++ ++ /* Step 1 */ ++ switch (kex->kex_type) { ++ case KEX_GSS_GRP1_SHA1: ++ case KEX_GSS_GRP14_SHA1: ++ case KEX_GSS_GRP14_SHA256: ++ case KEX_GSS_GRP16_SHA512: ++ r = kex_dh_keypair(kex); ++ break; ++ case KEX_GSS_NISTP256_SHA256: ++ r = kex_ecdh_keypair(kex); ++ break; ++ case KEX_GSS_C25519_SHA256: ++ r = kex_c25519_keypair(kex); ++ break; ++ default: ++ fatal("%s: Unexpected KEX type %d", __func__, kex->kex_type); ++ } ++ if (r != 0) ++ return r; ++ ++ token_ptr = GSS_C_NO_BUFFER; ++ ++ do { ++ debug("Calling gss_init_sec_context"); ++ ++ maj_status = ssh_gssapi_init_ctx(ctxt, ++ kex->gss_deleg_creds, token_ptr, &send_tok, ++ &ret_flags); ++ ++ if (GSS_ERROR(maj_status)) { ++ /* XXX Useles code: Missing send? */ ++ if (send_tok.length != 0) { ++ if ((r = sshpkt_start(ssh, ++ SSH2_MSG_KEXGSS_CONTINUE)) != 0 || ++ (r = sshpkt_put_string(ssh, send_tok.value, ++ send_tok.length)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ } ++ fatal("gss_init_context failed"); ++ } ++ ++ /* If we've got an old receive buffer get rid of it */ ++ if (token_ptr != GSS_C_NO_BUFFER) ++ gss_release_buffer(&min_status, &recv_tok); ++ ++ if (maj_status == GSS_S_COMPLETE) { ++ /* If mutual state flag is not true, kex fails */ ++ if (!(ret_flags & GSS_C_MUTUAL_FLAG)) ++ fatal("Mutual authentication failed"); ++ ++ /* If integ avail flag is not true kex fails */ ++ if (!(ret_flags & GSS_C_INTEG_FLAG)) ++ fatal("Integrity check failed"); ++ } ++ ++ /* ++ * If we have data to send, then the last message that we ++ * received cannot have been a 'complete'. ++ */ ++ if (send_tok.length != 0) { ++ if (first) { ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_INIT)) != 0 || ++ (r = sshpkt_put_string(ssh, send_tok.value, ++ send_tok.length)) != 0 || ++ (r = sshpkt_put_stringb(ssh, kex->client_pub)) != 0) ++ fatal("failed to construct packet: %s", ssh_err(r)); ++ first = 0; ++ } else { ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_CONTINUE)) != 0 || ++ (r = sshpkt_put_string(ssh, send_tok.value, ++ send_tok.length)) != 0) ++ fatal("failed to construct packet: %s", ssh_err(r)); ++ } ++ if ((r = sshpkt_send(ssh)) != 0) ++ fatal("failed to send packet: %s", ssh_err(r)); ++ gss_release_buffer(&min_status, &send_tok); ++ ++ /* If we've sent them data, they should reply */ ++ do { ++ type = ssh_packet_read(ssh); ++ if (type == SSH2_MSG_KEXGSS_HOSTKEY) { ++ debug("Received KEXGSS_HOSTKEY"); ++ if (server_host_key_blob) ++ fatal("Server host key received more than once"); ++ if ((r = sshpkt_getb_froms(ssh, &server_host_key_blob)) != 0) ++ fatal("Failed to read server host key: %s", ssh_err(r)); ++ } ++ } while (type == SSH2_MSG_KEXGSS_HOSTKEY); ++ ++ switch (type) { ++ case SSH2_MSG_KEXGSS_CONTINUE: ++ debug("Received GSSAPI_CONTINUE"); ++ if (maj_status == GSS_S_COMPLETE) ++ fatal("GSSAPI Continue received from server when complete"); ++ if ((r = ssh_gssapi_sshpkt_get_buffer_desc(ssh, ++ &recv_tok)) != 0 || ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("Failed to read token: %s", ssh_err(r)); ++ break; ++ case SSH2_MSG_KEXGSS_COMPLETE: ++ debug("Received GSSAPI_COMPLETE"); ++ if (msg_tok.value != NULL) ++ fatal("Received GSSAPI_COMPLETE twice?"); ++ if ((r = sshpkt_getb_froms(ssh, &server_blob)) != 0 || ++ (r = ssh_gssapi_sshpkt_get_buffer_desc(ssh, ++ &msg_tok)) != 0) ++ fatal("Failed to read message: %s", ssh_err(r)); ++ ++ /* Is there a token included? */ ++ if ((r = sshpkt_get_u8(ssh, &c)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ if (c) { ++ if ((r = ssh_gssapi_sshpkt_get_buffer_desc( ++ ssh, &recv_tok)) != 0) ++ fatal("Failed to read token: %s", ssh_err(r)); ++ /* If we're already complete - protocol error */ ++ if (maj_status == GSS_S_COMPLETE) ++ sshpkt_disconnect(ssh, "Protocol error: received token when complete"); ++ } else { ++ /* No token included */ ++ if (maj_status != GSS_S_COMPLETE) ++ sshpkt_disconnect(ssh, "Protocol error: did not receive final token"); ++ } ++ if ((r = sshpkt_get_end(ssh)) != 0) { ++ fatal("Expecting end of packet."); ++ } ++ break; ++ case SSH2_MSG_KEXGSS_ERROR: ++ debug("Received Error"); ++ if ((r = sshpkt_get_u32(ssh, &maj_status)) != 0 || ++ (r = sshpkt_get_u32(ssh, &min_status)) != 0 || ++ (r = sshpkt_get_string(ssh, &msg, NULL)) != 0 || ++ (r = sshpkt_get_string(ssh, NULL, NULL)) != 0 || /* lang tag */ ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("sshpkt_get failed: %s", ssh_err(r)); ++ fatal("GSSAPI Error: \n%.400s", msg); ++ default: ++ sshpkt_disconnect(ssh, "Protocol error: didn't expect packet type %d", ++ type); ++ } ++ token_ptr = &recv_tok; ++ } else { ++ /* No data, and not complete */ ++ if (maj_status != GSS_S_COMPLETE) ++ fatal("Not complete, and no token output"); ++ } ++ } while (maj_status & GSS_S_CONTINUE_NEEDED); ++ ++ /* ++ * We _must_ have received a COMPLETE message in reply from the ++ * server, which will have set server_blob and msg_tok ++ */ ++ ++ if (type != SSH2_MSG_KEXGSS_COMPLETE) ++ fatal("Didn't receive a SSH2_MSG_KEXGSS_COMPLETE when I expected it"); ++ ++ /* compute shared secret */ ++ switch (kex->kex_type) { ++ case KEX_GSS_GRP1_SHA1: ++ case KEX_GSS_GRP14_SHA1: ++ case KEX_GSS_GRP14_SHA256: ++ case KEX_GSS_GRP16_SHA512: ++ r = kex_dh_dec(kex, server_blob, &shared_secret); ++ break; ++ case KEX_GSS_C25519_SHA256: ++ if (sshbuf_ptr(server_blob)[sshbuf_len(server_blob)] & 0x80) ++ fatal("The received key has MSB of last octet set!"); ++ r = kex_c25519_dec(kex, server_blob, &shared_secret); ++ break; ++ case KEX_GSS_NISTP256_SHA256: ++ if (sshbuf_len(server_blob) != 65) ++ fatal("The received NIST-P256 key did not match" ++ "expected length (expected 65, got %zu)", sshbuf_len(server_blob)); ++ ++ if (sshbuf_ptr(server_blob)[0] != POINT_CONVERSION_UNCOMPRESSED) ++ fatal("The received NIST-P256 key does not have first octet 0x04"); ++ ++ r = kex_ecdh_dec(kex, server_blob, &shared_secret); ++ break; ++ default: ++ r = SSH_ERR_INVALID_ARGUMENT; ++ break; ++ } ++ if (r != 0) ++ goto out; ++ ++ if ((empty = sshbuf_new()) == NULL) { ++ r = SSH_ERR_ALLOC_FAIL; ++ goto out; ++ } ++ ++ hashlen = sizeof(hash); ++ if ((r = kex_gen_hash( ++ kex->hash_alg, ++ kex->client_version, ++ kex->server_version, ++ kex->my, ++ kex->peer, ++ (server_host_key_blob ? server_host_key_blob : empty), ++ kex->client_pub, ++ server_blob, ++ shared_secret, ++ hash, &hashlen)) != 0) ++ fatal("%s: Unexpected KEX type %d", __func__, kex->kex_type); ++ ++ gssbuf.value = hash; ++ gssbuf.length = hashlen; ++ ++ /* Verify that the hash matches the MIC we just got. */ ++ if (GSS_ERROR(ssh_gssapi_checkmic(ctxt, &gssbuf, &msg_tok))) ++ sshpkt_disconnect(ssh, "Hash's MIC didn't verify"); ++ ++ gss_release_buffer(&min_status, &msg_tok); ++ ++ if (kex->gss_deleg_creds) ++ ssh_gssapi_credentials_updated(ctxt); ++ ++ if (gss_kex_context == NULL) ++ gss_kex_context = ctxt; ++ else ++ ssh_gssapi_delete_ctx(&ctxt); ++ ++ if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0) ++ r = kex_send_newkeys(ssh); ++ ++out: ++ explicit_bzero(hash, sizeof(hash)); ++ explicit_bzero(kex->c25519_client_key, sizeof(kex->c25519_client_key)); ++ sshbuf_free(empty); ++ sshbuf_free(server_host_key_blob); ++ sshbuf_free(server_blob); ++ sshbuf_free(shared_secret); ++ sshbuf_free(kex->client_pub); ++ kex->client_pub = NULL; ++ return r; ++} ++ ++int ++kexgssgex_client(struct ssh *ssh) ++{ ++ struct kex *kex = ssh->kex; ++ gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER, ++ recv_tok = GSS_C_EMPTY_BUFFER, gssbuf, ++ msg_tok = GSS_C_EMPTY_BUFFER, *token_ptr; ++ Gssctxt *ctxt; ++ OM_uint32 maj_status, min_status, ret_flags; ++ struct sshbuf *shared_secret = NULL; ++ BIGNUM *p = NULL; ++ BIGNUM *g = NULL; ++ struct sshbuf *buf = NULL; ++ struct sshbuf *server_host_key_blob = NULL; ++ struct sshbuf *server_blob = NULL; ++ BIGNUM *dh_server_pub = NULL; ++ u_char *msg; ++ int type = 0; ++ int first = 1; ++ u_char hash[SSH_DIGEST_MAX_LENGTH]; ++ size_t hashlen; ++ const BIGNUM *pub_key, *dh_p, *dh_g; ++ int nbits = 0, min = DH_GRP_MIN, max = DH_GRP_MAX; ++ struct sshbuf *empty = NULL; ++ u_char c; ++ int r; ++ ++ /* Initialise our GSSAPI world */ ++ ssh_gssapi_build_ctx(&ctxt); ++ if (ssh_gssapi_id_kex(ctxt, kex->name, kex->kex_type) ++ == GSS_C_NO_OID) ++ fatal("Couldn't identify host exchange"); ++ ++ if (ssh_gssapi_import_name(ctxt, kex->gss_host)) ++ fatal("Couldn't import hostname"); ++ ++ if (kex->gss_client && ++ ssh_gssapi_client_identity(ctxt, kex->gss_client)) ++ fatal("Couldn't acquire client credentials"); ++ ++ debug("Doing group exchange"); ++ nbits = dh_estimate(kex->dh_need * 8); ++ ++ kex->min = DH_GRP_MIN; ++ kex->max = DH_GRP_MAX; ++ kex->nbits = nbits; ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_GROUPREQ)) != 0 || ++ (r = sshpkt_put_u32(ssh, min)) != 0 || ++ (r = sshpkt_put_u32(ssh, nbits)) != 0 || ++ (r = sshpkt_put_u32(ssh, max)) != 0 || ++ (r = sshpkt_send(ssh)) != 0) ++ fatal("Failed to construct a packet: %s", ssh_err(r)); ++ ++ if ((r = ssh_packet_read_expect(ssh, SSH2_MSG_KEXGSS_GROUP)) != 0) ++ fatal("Error: %s", ssh_err(r)); ++ ++ if ((r = sshpkt_get_bignum2(ssh, &p)) != 0 || ++ (r = sshpkt_get_bignum2(ssh, &g)) != 0 || ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("shpkt_get_bignum2 failed: %s", ssh_err(r)); ++ ++ if (BN_num_bits(p) < min || BN_num_bits(p) > max) ++ fatal("GSSGRP_GEX group out of range: %d !< %d !< %d", ++ min, BN_num_bits(p), max); ++ ++ if ((kex->dh = dh_new_group(g, p)) == NULL) ++ fatal("dn_new_group() failed"); ++ p = g = NULL; /* belong to kex->dh now */ ++ ++ if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) ++ goto out; ++ DH_get0_key(kex->dh, &pub_key, NULL); ++ ++ token_ptr = GSS_C_NO_BUFFER; ++ ++ do { ++ /* Step 2 - call GSS_Init_sec_context() */ ++ debug("Calling gss_init_sec_context"); ++ ++ maj_status = ssh_gssapi_init_ctx(ctxt, ++ kex->gss_deleg_creds, token_ptr, &send_tok, ++ &ret_flags); ++ ++ if (GSS_ERROR(maj_status)) { ++ /* XXX Useles code: Missing send? */ ++ if (send_tok.length != 0) { ++ if ((r = sshpkt_start(ssh, ++ SSH2_MSG_KEXGSS_CONTINUE)) != 0 || ++ (r = sshpkt_put_string(ssh, send_tok.value, ++ send_tok.length)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ } ++ fatal("gss_init_context failed"); ++ } ++ ++ /* If we've got an old receive buffer get rid of it */ ++ if (token_ptr != GSS_C_NO_BUFFER) ++ gss_release_buffer(&min_status, &recv_tok); ++ ++ if (maj_status == GSS_S_COMPLETE) { ++ /* If mutual state flag is not true, kex fails */ ++ if (!(ret_flags & GSS_C_MUTUAL_FLAG)) ++ fatal("Mutual authentication failed"); ++ ++ /* If integ avail flag is not true kex fails */ ++ if (!(ret_flags & GSS_C_INTEG_FLAG)) ++ fatal("Integrity check failed"); ++ } ++ ++ /* ++ * If we have data to send, then the last message that we ++ * received cannot have been a 'complete'. ++ */ ++ if (send_tok.length != 0) { ++ if (first) { ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_INIT)) != 0 || ++ (r = sshpkt_put_string(ssh, send_tok.value, ++ send_tok.length)) != 0 || ++ (r = sshpkt_put_bignum2(ssh, pub_key)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ first = 0; ++ } else { ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_CONTINUE)) != 0 || ++ (r = sshpkt_put_string(ssh,send_tok.value, ++ send_tok.length)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ } ++ if ((r = sshpkt_send(ssh)) != 0) ++ fatal("sshpkt_send failed: %s", ssh_err(r)); ++ gss_release_buffer(&min_status, &send_tok); ++ ++ /* If we've sent them data, they should reply */ ++ do { ++ type = ssh_packet_read(ssh); ++ if (type == SSH2_MSG_KEXGSS_HOSTKEY) { ++ debug("Received KEXGSS_HOSTKEY"); ++ if (server_host_key_blob) ++ fatal("Server host key received more than once"); ++ if ((r = sshpkt_getb_froms(ssh, &server_host_key_blob)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ } ++ } while (type == SSH2_MSG_KEXGSS_HOSTKEY); ++ ++ switch (type) { ++ case SSH2_MSG_KEXGSS_CONTINUE: ++ debug("Received GSSAPI_CONTINUE"); ++ if (maj_status == GSS_S_COMPLETE) ++ fatal("GSSAPI Continue received from server when complete"); ++ if ((r = ssh_gssapi_sshpkt_get_buffer_desc(ssh, ++ &recv_tok)) != 0 || ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ break; ++ case SSH2_MSG_KEXGSS_COMPLETE: ++ debug("Received GSSAPI_COMPLETE"); ++ if (msg_tok.value != NULL) ++ fatal("Received GSSAPI_COMPLETE twice?"); ++ if ((r = sshpkt_getb_froms(ssh, &server_blob)) != 0 || ++ (r = ssh_gssapi_sshpkt_get_buffer_desc(ssh, ++ &msg_tok)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ ++ /* Is there a token included? */ ++ if ((r = sshpkt_get_u8(ssh, &c)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ if (c) { ++ if ((r = ssh_gssapi_sshpkt_get_buffer_desc( ++ ssh, &recv_tok)) != 0 || ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ /* If we're already complete - protocol error */ ++ if (maj_status == GSS_S_COMPLETE) ++ sshpkt_disconnect(ssh, "Protocol error: received token when complete"); ++ } else { ++ /* No token included */ ++ if (maj_status != GSS_S_COMPLETE) ++ sshpkt_disconnect(ssh, "Protocol error: did not receive final token"); ++ } ++ break; ++ case SSH2_MSG_KEXGSS_ERROR: ++ debug("Received Error"); ++ if ((r = sshpkt_get_u32(ssh, &maj_status)) != 0 || ++ (r = sshpkt_get_u32(ssh, &min_status)) != 0 || ++ (r = sshpkt_get_string(ssh, &msg, NULL)) != 0 || ++ (r = sshpkt_get_string(ssh, NULL, NULL)) != 0 || /* lang tag */ ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ fatal("GSSAPI Error: \n%.400s", msg); ++ default: ++ sshpkt_disconnect(ssh, "Protocol error: didn't expect packet type %d", ++ type); ++ } ++ token_ptr = &recv_tok; ++ } else { ++ /* No data, and not complete */ ++ if (maj_status != GSS_S_COMPLETE) ++ fatal("Not complete, and no token output"); ++ } ++ } while (maj_status & GSS_S_CONTINUE_NEEDED); ++ ++ /* ++ * We _must_ have received a COMPLETE message in reply from the ++ * server, which will have set dh_server_pub and msg_tok ++ */ ++ ++ if (type != SSH2_MSG_KEXGSS_COMPLETE) ++ fatal("Didn't receive a SSH2_MSG_KEXGSS_COMPLETE when I expected it"); ++ ++ /* 7. C verifies that the key Q_S is valid */ ++ /* 8. C computes shared secret */ ++ if ((buf = sshbuf_new()) == NULL || ++ (r = sshbuf_put_stringb(buf, server_blob)) != 0 || ++ (r = sshbuf_get_bignum2(buf, &dh_server_pub)) != 0) ++ goto out; ++ sshbuf_free(buf); ++ buf = NULL; ++ ++ if ((shared_secret = sshbuf_new()) == NULL) { ++ r = SSH_ERR_ALLOC_FAIL; ++ goto out; ++ } ++ ++ if ((r = kex_dh_compute_key(kex, dh_server_pub, shared_secret)) != 0) ++ goto out; ++ if ((empty = sshbuf_new()) == NULL) { ++ r = SSH_ERR_ALLOC_FAIL; ++ goto out; ++ } ++ ++ DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g); ++ hashlen = sizeof(hash); ++ if ((r = kexgex_hash( ++ kex->hash_alg, ++ kex->client_version, ++ kex->server_version, ++ kex->my, ++ kex->peer, ++ (server_host_key_blob ? server_host_key_blob : empty), ++ kex->min, kex->nbits, kex->max, ++ dh_p, dh_g, ++ pub_key, ++ dh_server_pub, ++ sshbuf_ptr(shared_secret), sshbuf_len(shared_secret), ++ hash, &hashlen)) != 0) ++ fatal("Failed to calculate hash: %s", ssh_err(r)); ++ ++ gssbuf.value = hash; ++ gssbuf.length = hashlen; ++ ++ /* Verify that the hash matches the MIC we just got. */ ++ if (GSS_ERROR(ssh_gssapi_checkmic(ctxt, &gssbuf, &msg_tok))) ++ sshpkt_disconnect(ssh, "Hash's MIC didn't verify"); ++ ++ gss_release_buffer(&min_status, &msg_tok); ++ ++ /* save session id */ ++ if (kex->session_id == NULL) { ++ kex->session_id_len = hashlen; ++ kex->session_id = xmalloc(kex->session_id_len); ++ memcpy(kex->session_id, hash, kex->session_id_len); ++ } ++ ++ if (kex->gss_deleg_creds) ++ ssh_gssapi_credentials_updated(ctxt); ++ ++ if (gss_kex_context == NULL) ++ gss_kex_context = ctxt; ++ else ++ ssh_gssapi_delete_ctx(&ctxt); ++ ++ /* Finally derive the keys and send them */ ++ if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0) ++ r = kex_send_newkeys(ssh); ++out: ++ sshbuf_free(buf); ++ sshbuf_free(server_blob); ++ sshbuf_free(empty); ++ explicit_bzero(hash, sizeof(hash)); ++ DH_free(kex->dh); ++ kex->dh = NULL; ++ BN_clear_free(dh_server_pub); ++ sshbuf_free(shared_secret); ++ sshbuf_free(server_host_key_blob); ++ return r; ++} ++#endif /* defined(GSSAPI) && defined(WITH_OPENSSL) */ +diff --git a/kexgsss.c b/kexgsss.c +new file mode 100644 +index 000000000..60bc02deb +--- /dev/null ++++ b/kexgsss.c +@@ -0,0 +1,474 @@ ++/* ++ * Copyright (c) 2001-2009 Simon Wilkinson. 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. ++ */ ++ ++#include "includes.h" ++ ++#if defined(GSSAPI) && defined(WITH_OPENSSL) ++ ++#include ++ ++#include ++#include ++ ++#include "xmalloc.h" ++#include "sshbuf.h" ++#include "ssh2.h" ++#include "sshkey.h" ++#include "cipher.h" ++#include "kex.h" ++#include "log.h" ++#include "packet.h" ++#include "dh.h" ++#include "ssh-gss.h" ++#include "monitor_wrap.h" ++#include "misc.h" /* servconf.h needs misc.h for struct ForwardOptions */ ++#include "servconf.h" ++#include "ssh-gss.h" ++#include "digest.h" ++#include "ssherr.h" ++ ++extern ServerOptions options; ++ ++int ++kexgss_server(struct ssh *ssh) ++{ ++ struct kex *kex = ssh->kex; ++ OM_uint32 maj_status, min_status; ++ ++ /* ++ * Some GSSAPI implementations use the input value of ret_flags (an ++ * output variable) as a means of triggering mechanism specific ++ * features. Initializing it to zero avoids inadvertently ++ * activating this non-standard behaviour. ++ */ ++ ++ OM_uint32 ret_flags = 0; ++ gss_buffer_desc gssbuf, recv_tok, msg_tok; ++ gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER; ++ Gssctxt *ctxt = NULL; ++ struct sshbuf *shared_secret = NULL; ++ struct sshbuf *client_pubkey = NULL; ++ struct sshbuf *server_pubkey = NULL; ++ struct sshbuf *empty = sshbuf_new(); ++ int type = 0; ++ gss_OID oid; ++ char *mechs; ++ u_char hash[SSH_DIGEST_MAX_LENGTH]; ++ size_t hashlen; ++ int r; ++ ++ /* Initialise GSSAPI */ ++ ++ /* If we're rekeying, privsep means that some of the private structures ++ * in the GSSAPI code are no longer available. This kludges them back ++ * into life ++ */ ++ if (!ssh_gssapi_oid_table_ok()) { ++ mechs = ssh_gssapi_server_mechanisms(); ++ free(mechs); ++ } ++ ++ debug2("%s: Identifying %s", __func__, kex->name); ++ oid = ssh_gssapi_id_kex(NULL, kex->name, kex->kex_type); ++ if (oid == GSS_C_NO_OID) ++ fatal("Unknown gssapi mechanism"); ++ ++ debug2("%s: Acquiring credentials", __func__); ++ ++ if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, oid)))) ++ fatal("Unable to acquire credentials for the server"); ++ ++ do { ++ debug("Wait SSH2_MSG_KEXGSS_INIT"); ++ type = ssh_packet_read(ssh); ++ switch(type) { ++ case SSH2_MSG_KEXGSS_INIT: ++ if (client_pubkey != NULL) ++ fatal("Received KEXGSS_INIT after initialising"); ++ if ((r = ssh_gssapi_sshpkt_get_buffer_desc(ssh, ++ &recv_tok)) != 0 || ++ (r = sshpkt_getb_froms(ssh, &client_pubkey)) != 0 || ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ ++ switch (kex->kex_type) { ++ case KEX_GSS_GRP1_SHA1: ++ case KEX_GSS_GRP14_SHA1: ++ case KEX_GSS_GRP14_SHA256: ++ case KEX_GSS_GRP16_SHA512: ++ r = kex_dh_enc(kex, client_pubkey, &server_pubkey, ++ &shared_secret); ++ break; ++ case KEX_GSS_NISTP256_SHA256: ++ r = kex_ecdh_enc(kex, client_pubkey, &server_pubkey, ++ &shared_secret); ++ break; ++ case KEX_GSS_C25519_SHA256: ++ r = kex_c25519_enc(kex, client_pubkey, &server_pubkey, ++ &shared_secret); ++ break; ++ default: ++ fatal("%s: Unexpected KEX type %d", __func__, kex->kex_type); ++ } ++ if (r != 0) ++ goto out; ++ ++ /* Send SSH_MSG_KEXGSS_HOSTKEY here, if we want */ ++ break; ++ case SSH2_MSG_KEXGSS_CONTINUE: ++ if ((r = ssh_gssapi_sshpkt_get_buffer_desc(ssh, ++ &recv_tok)) != 0 || ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ break; ++ default: ++ sshpkt_disconnect(ssh, ++ "Protocol error: didn't expect packet type %d", ++ type); ++ } ++ ++ maj_status = PRIVSEP(ssh_gssapi_accept_ctx(ctxt, &recv_tok, ++ &send_tok, &ret_flags)); ++ ++ gss_release_buffer(&min_status, &recv_tok); ++ ++ if (maj_status != GSS_S_COMPLETE && send_tok.length == 0) ++ fatal("Zero length token output when incomplete"); ++ ++ if (client_pubkey == NULL) ++ fatal("No client public key"); ++ ++ if (maj_status & GSS_S_CONTINUE_NEEDED) { ++ debug("Sending GSSAPI_CONTINUE"); ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_CONTINUE)) != 0 || ++ (r = sshpkt_put_string(ssh, send_tok.value, send_tok.length)) != 0 || ++ (r = sshpkt_send(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ gss_release_buffer(&min_status, &send_tok); ++ } ++ } while (maj_status & GSS_S_CONTINUE_NEEDED); ++ ++ if (GSS_ERROR(maj_status)) { ++ if (send_tok.length > 0) { ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_CONTINUE)) != 0 || ++ (r = sshpkt_put_string(ssh, send_tok.value, send_tok.length)) != 0 || ++ (r = sshpkt_send(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ } ++ fatal("accept_ctx died"); ++ } ++ ++ if (!(ret_flags & GSS_C_MUTUAL_FLAG)) ++ fatal("Mutual Authentication flag wasn't set"); ++ ++ if (!(ret_flags & GSS_C_INTEG_FLAG)) ++ fatal("Integrity flag wasn't set"); ++ ++ hashlen = sizeof(hash); ++ if ((r = kex_gen_hash( ++ kex->hash_alg, ++ kex->client_version, ++ kex->server_version, ++ kex->peer, ++ kex->my, ++ empty, ++ client_pubkey, ++ server_pubkey, ++ shared_secret, ++ hash, &hashlen)) != 0) ++ goto out; ++ ++ gssbuf.value = hash; ++ gssbuf.length = hashlen; ++ ++ if (GSS_ERROR(PRIVSEP(ssh_gssapi_sign(ctxt, &gssbuf, &msg_tok)))) ++ fatal("Couldn't get MIC"); ++ ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_COMPLETE)) != 0 || ++ (r = sshpkt_put_stringb(ssh, server_pubkey)) != 0 || ++ (r = sshpkt_put_string(ssh, msg_tok.value, msg_tok.length)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ ++ if (send_tok.length != 0) { ++ if ((r = sshpkt_put_u8(ssh, 1)) != 0 || /* true */ ++ (r = sshpkt_put_string(ssh, send_tok.value, send_tok.length)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ } else { ++ if ((r = sshpkt_put_u8(ssh, 0)) != 0) /* false */ ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ } ++ if ((r = sshpkt_send(ssh)) != 0) ++ fatal("sshpkt_send failed: %s", ssh_err(r)); ++ ++ gss_release_buffer(&min_status, &send_tok); ++ gss_release_buffer(&min_status, &msg_tok); ++ ++ if (gss_kex_context == NULL) ++ gss_kex_context = ctxt; ++ else ++ ssh_gssapi_delete_ctx(&ctxt); ++ ++ if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0) ++ r = kex_send_newkeys(ssh); ++ ++ /* If this was a rekey, then save out any delegated credentials we ++ * just exchanged. */ ++ if (options.gss_store_rekey) ++ ssh_gssapi_rekey_creds(); ++out: ++ sshbuf_free(empty); ++ explicit_bzero(hash, sizeof(hash)); ++ sshbuf_free(shared_secret); ++ sshbuf_free(client_pubkey); ++ sshbuf_free(server_pubkey); ++ return r; ++} ++ ++int ++kexgssgex_server(struct ssh *ssh) ++{ ++ struct kex *kex = ssh->kex; ++ OM_uint32 maj_status, min_status; ++ ++ /* ++ * Some GSSAPI implementations use the input value of ret_flags (an ++ * output variable) as a means of triggering mechanism specific ++ * features. Initializing it to zero avoids inadvertently ++ * activating this non-standard behaviour. ++ */ ++ ++ OM_uint32 ret_flags = 0; ++ gss_buffer_desc gssbuf, recv_tok, msg_tok; ++ gss_buffer_desc send_tok = GSS_C_EMPTY_BUFFER; ++ Gssctxt *ctxt = NULL; ++ struct sshbuf *shared_secret = NULL; ++ int type = 0; ++ gss_OID oid; ++ char *mechs; ++ u_char hash[SSH_DIGEST_MAX_LENGTH]; ++ size_t hashlen; ++ BIGNUM *dh_client_pub = NULL; ++ const BIGNUM *pub_key, *dh_p, *dh_g; ++ int min = -1, max = -1, nbits = -1; ++ int cmin = -1, cmax = -1; /* client proposal */ ++ struct sshbuf *empty = sshbuf_new(); ++ int r; ++ ++ /* Initialise GSSAPI */ ++ ++ /* If we're rekeying, privsep means that some of the private structures ++ * in the GSSAPI code are no longer available. This kludges them back ++ * into life ++ */ ++ if (!ssh_gssapi_oid_table_ok()) ++ if ((mechs = ssh_gssapi_server_mechanisms())) ++ free(mechs); ++ ++ debug2("%s: Identifying %s", __func__, kex->name); ++ oid = ssh_gssapi_id_kex(NULL, kex->name, kex->kex_type); ++ if (oid == GSS_C_NO_OID) ++ fatal("Unknown gssapi mechanism"); ++ ++ debug2("%s: Acquiring credentials", __func__); ++ ++ if (GSS_ERROR(PRIVSEP(ssh_gssapi_server_ctx(&ctxt, oid)))) ++ fatal("Unable to acquire credentials for the server"); ++ ++ /* 5. S generates an ephemeral key pair (do the allocations early) */ ++ debug("Doing group exchange"); ++ ssh_packet_read_expect(ssh, SSH2_MSG_KEXGSS_GROUPREQ); ++ /* store client proposal to provide valid signature */ ++ if ((r = sshpkt_get_u32(ssh, &cmin)) != 0 || ++ (r = sshpkt_get_u32(ssh, &nbits)) != 0 || ++ (r = sshpkt_get_u32(ssh, &cmax)) != 0 || ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ kex->nbits = nbits; ++ kex->min = cmin; ++ kex->max = cmax; ++ min = MAX(DH_GRP_MIN, cmin); ++ max = MIN(DH_GRP_MAX, cmax); ++ nbits = MAXIMUM(DH_GRP_MIN, nbits); ++ nbits = MINIMUM(DH_GRP_MAX, nbits); ++ if (max < min || nbits < min || max < nbits) ++ fatal("GSS_GEX, bad parameters: %d !< %d !< %d", ++ min, nbits, max); ++ kex->dh = PRIVSEP(choose_dh(min, nbits, max)); ++ if (kex->dh == NULL) { ++ sshpkt_disconnect(ssh, "Protocol error: no matching group found"); ++ fatal("Protocol error: no matching group found"); ++ } ++ ++ DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g); ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_GROUP)) != 0 || ++ (r = sshpkt_put_bignum2(ssh, dh_p)) != 0 || ++ (r = sshpkt_put_bignum2(ssh, dh_g)) != 0 || ++ (r = sshpkt_send(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ ++ if ((r = ssh_packet_write_wait(ssh)) != 0) ++ fatal("ssh_packet_write_wait: %s", ssh_err(r)); ++ ++ /* Compute our exchange value in parallel with the client */ ++ if ((r = dh_gen_key(kex->dh, kex->we_need * 8)) != 0) ++ goto out; ++ ++ do { ++ debug("Wait SSH2_MSG_GSSAPI_INIT"); ++ type = ssh_packet_read(ssh); ++ switch(type) { ++ case SSH2_MSG_KEXGSS_INIT: ++ if (dh_client_pub != NULL) ++ fatal("Received KEXGSS_INIT after initialising"); ++ if ((r = ssh_gssapi_sshpkt_get_buffer_desc(ssh, ++ &recv_tok)) != 0 || ++ (r = sshpkt_get_bignum2(ssh, &dh_client_pub)) != 0 || ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ ++ /* Send SSH_MSG_KEXGSS_HOSTKEY here, if we want */ ++ break; ++ case SSH2_MSG_KEXGSS_CONTINUE: ++ if ((r = ssh_gssapi_sshpkt_get_buffer_desc(ssh, ++ &recv_tok)) != 0 || ++ (r = sshpkt_get_end(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ break; ++ default: ++ sshpkt_disconnect(ssh, ++ "Protocol error: didn't expect packet type %d", ++ type); ++ } ++ ++ maj_status = PRIVSEP(ssh_gssapi_accept_ctx(ctxt, &recv_tok, ++ &send_tok, &ret_flags)); ++ ++ gss_release_buffer(&min_status, &recv_tok); ++ ++ if (maj_status != GSS_S_COMPLETE && send_tok.length == 0) ++ fatal("Zero length token output when incomplete"); ++ ++ if (dh_client_pub == NULL) ++ fatal("No client public key"); ++ ++ if (maj_status & GSS_S_CONTINUE_NEEDED) { ++ debug("Sending GSSAPI_CONTINUE"); ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_CONTINUE)) != 0 || ++ (r = sshpkt_put_string(ssh, send_tok.value, send_tok.length)) != 0 || ++ (r = sshpkt_send(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ gss_release_buffer(&min_status, &send_tok); ++ } ++ } while (maj_status & GSS_S_CONTINUE_NEEDED); ++ ++ if (GSS_ERROR(maj_status)) { ++ if (send_tok.length > 0) { ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_CONTINUE)) != 0 || ++ (r = sshpkt_put_string(ssh, send_tok.value, send_tok.length)) != 0 || ++ (r = sshpkt_send(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ } ++ fatal("accept_ctx died"); ++ } ++ ++ if (!(ret_flags & GSS_C_MUTUAL_FLAG)) ++ fatal("Mutual Authentication flag wasn't set"); ++ ++ if (!(ret_flags & GSS_C_INTEG_FLAG)) ++ fatal("Integrity flag wasn't set"); ++ ++ /* calculate shared secret */ ++ if ((shared_secret = sshbuf_new()) == NULL) { ++ r = SSH_ERR_ALLOC_FAIL; ++ goto out; ++ } ++ if ((r = kex_dh_compute_key(kex, dh_client_pub, shared_secret)) != 0) ++ goto out; ++ ++ DH_get0_key(kex->dh, &pub_key, NULL); ++ DH_get0_pqg(kex->dh, &dh_p, NULL, &dh_g); ++ hashlen = sizeof(hash); ++ if ((r = kexgex_hash( ++ kex->hash_alg, ++ kex->client_version, ++ kex->server_version, ++ kex->peer, ++ kex->my, ++ empty, ++ cmin, nbits, cmax, ++ dh_p, dh_g, ++ dh_client_pub, ++ pub_key, ++ sshbuf_ptr(shared_secret), sshbuf_len(shared_secret), ++ hash, &hashlen)) != 0) ++ fatal("kexgex_hash failed: %s", ssh_err(r)); ++ ++ gssbuf.value = hash; ++ gssbuf.length = hashlen; ++ ++ if (GSS_ERROR(PRIVSEP(ssh_gssapi_sign(ctxt, &gssbuf, &msg_tok)))) ++ fatal("Couldn't get MIC"); ++ ++ if ((r = sshpkt_start(ssh, SSH2_MSG_KEXGSS_COMPLETE)) != 0 || ++ (r = sshpkt_put_bignum2(ssh, pub_key)) != 0 || ++ (r = sshpkt_put_string(ssh, msg_tok.value, msg_tok.length)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ ++ if (send_tok.length != 0) { ++ if ((r = sshpkt_put_u8(ssh, 1)) != 0 || /* true */ ++ (r = sshpkt_put_string(ssh, send_tok.value, send_tok.length)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ } else { ++ if ((r = sshpkt_put_u8(ssh, 0)) != 0) /* false */ ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ } ++ if ((r = sshpkt_send(ssh)) != 0) ++ fatal("sshpkt failed: %s", ssh_err(r)); ++ ++ gss_release_buffer(&min_status, &send_tok); ++ gss_release_buffer(&min_status, &msg_tok); ++ ++ if (gss_kex_context == NULL) ++ gss_kex_context = ctxt; ++ else ++ ssh_gssapi_delete_ctx(&ctxt); ++ ++ /* Finally derive the keys and send them */ ++ if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0) ++ r = kex_send_newkeys(ssh); ++ ++ /* If this was a rekey, then save out any delegated credentials we ++ * just exchanged. */ ++ if (options.gss_store_rekey) ++ ssh_gssapi_rekey_creds(); ++out: ++ sshbuf_free(empty); ++ explicit_bzero(hash, sizeof(hash)); ++ DH_free(kex->dh); ++ kex->dh = NULL; ++ BN_clear_free(dh_client_pub); ++ sshbuf_free(shared_secret); ++ return r; ++} ++#endif /* defined(GSSAPI) && defined(WITH_OPENSSL) */ +diff --git a/monitor.c b/monitor.c +index 4cf79dfc9..11868952b 100644 +--- a/monitor.c ++++ b/monitor.c +@@ -148,6 +148,8 @@ int mm_answer_gss_setup_ctx(struct ssh *, int, struct sshbuf *); + int mm_answer_gss_accept_ctx(struct ssh *, int, struct sshbuf *); + int mm_answer_gss_userok(struct ssh *, int, struct sshbuf *); + int mm_answer_gss_checkmic(struct ssh *, int, struct sshbuf *); ++int mm_answer_gss_sign(struct ssh *, int, struct sshbuf *); ++int mm_answer_gss_updatecreds(struct ssh *, int, struct sshbuf *); + #endif + + #ifdef SSH_AUDIT_EVENTS +@@ -220,11 +222,18 @@ struct mon_table mon_dispatch_proto20[] = { + {MONITOR_REQ_GSSSTEP, 0, mm_answer_gss_accept_ctx}, + {MONITOR_REQ_GSSUSEROK, MON_ONCE|MON_AUTHDECIDE, mm_answer_gss_userok}, + {MONITOR_REQ_GSSCHECKMIC, MON_ONCE, mm_answer_gss_checkmic}, ++ {MONITOR_REQ_GSSSIGN, MON_ONCE, mm_answer_gss_sign}, + #endif + {0, 0, NULL} + }; + + struct mon_table mon_dispatch_postauth20[] = { ++#ifdef GSSAPI ++ {MONITOR_REQ_GSSSETUP, 0, mm_answer_gss_setup_ctx}, ++ {MONITOR_REQ_GSSSTEP, 0, mm_answer_gss_accept_ctx}, ++ {MONITOR_REQ_GSSSIGN, 0, mm_answer_gss_sign}, ++ {MONITOR_REQ_GSSUPCREDS, 0, mm_answer_gss_updatecreds}, ++#endif + #ifdef WITH_OPENSSL + {MONITOR_REQ_MODULI, 0, mm_answer_moduli}, + #endif +@@ -293,6 +302,10 @@ monitor_child_preauth(struct ssh *ssh, struct monitor *pmonitor) + /* Permit requests for moduli and signatures */ + monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1); + monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1); ++#ifdef GSSAPI ++ /* and for the GSSAPI key exchange */ ++ monitor_permit(mon_dispatch, MONITOR_REQ_GSSSETUP, 1); ++#endif + + /* The first few requests do not require asynchronous access */ + while (!authenticated) { +@@ -406,6 +419,10 @@ monitor_child_postauth(struct ssh *ssh, struct monitor *pmonitor) + monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1); + monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1); + monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1); ++#ifdef GSSAPI ++ /* and for the GSSAPI key exchange */ ++ monitor_permit(mon_dispatch, MONITOR_REQ_GSSSETUP, 1); ++#endif + + if (auth_opts->permit_pty_flag) { + monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1); +@@ -1725,6 +1742,17 @@ monitor_apply_keystate(struct ssh *ssh, struct monitor *pmonitor) + # ifdef OPENSSL_HAS_ECC + kex->kex[KEX_ECDH_SHA2] = kex_gen_server; + # endif ++# ifdef GSSAPI ++ if (options.gss_keyex) { ++ kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server; ++ kex->kex[KEX_GSS_GRP14_SHA1] = kexgss_server; ++ kex->kex[KEX_GSS_GRP14_SHA256] = kexgss_server; ++ kex->kex[KEX_GSS_GRP16_SHA512] = kexgss_server; ++ kex->kex[KEX_GSS_GEX_SHA1] = kexgssgex_server; ++ kex->kex[KEX_GSS_NISTP256_SHA256] = kexgss_server; ++ kex->kex[KEX_GSS_C25519_SHA256] = kexgss_server; ++ } ++# endif + #endif /* WITH_OPENSSL */ + kex->kex[KEX_C25519_SHA256] = kex_gen_server; + kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_gen_server; +@@ -1818,8 +1846,8 @@ mm_answer_gss_setup_ctx(struct ssh *ssh, int sock, struct sshbuf *m) + u_char *p; + int r; + +- if (!options.gss_authentication) +- fatal("%s: GSSAPI authentication not enabled", __func__); ++ if (!options.gss_authentication && !options.gss_keyex) ++ fatal("%s: GSSAPI not enabled", __func__); + + if ((r = sshbuf_get_string(m, &p, &len)) != 0) + fatal("%s: buffer error: %s", __func__, ssh_err(r)); +@@ -1851,8 +1879,8 @@ mm_answer_gss_accept_ctx(struct ssh *ssh, int sock, struct sshbuf *m) + OM_uint32 flags = 0; /* GSI needs this */ + int r; + +- if (!options.gss_authentication) +- fatal("%s: GSSAPI authentication not enabled", __func__); ++ if (!options.gss_authentication && !options.gss_keyex) ++ fatal("%s: GSSAPI not enabled", __func__); + + if ((r = ssh_gssapi_get_buffer_desc(m, &in)) != 0) + fatal("%s: buffer error: %s", __func__, ssh_err(r)); +@@ -1872,6 +1900,7 @@ mm_answer_gss_accept_ctx(struct ssh *ssh, int sock, struct sshbuf *m) + monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0); + monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1); + monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1); ++ monitor_permit(mon_dispatch, MONITOR_REQ_GSSSIGN, 1); + } + return (0); + } +@@ -1883,8 +1912,8 @@ mm_answer_gss_checkmic(struct ssh *ssh, int sock, struct sshbuf *m) + OM_uint32 ret; + int r; + +- if (!options.gss_authentication) +- fatal("%s: GSSAPI authentication not enabled", __func__); ++ if (!options.gss_authentication && !options.gss_keyex) ++ fatal("%s: GSSAPI not enabled", __func__); + + if ((r = ssh_gssapi_get_buffer_desc(m, &gssbuf)) != 0 || + (r = ssh_gssapi_get_buffer_desc(m, &mic)) != 0) +@@ -1910,13 +1939,17 @@ mm_answer_gss_checkmic(struct ssh *ssh, int sock, struct sshbuf *m) + int + mm_answer_gss_userok(struct ssh *ssh, int sock, struct sshbuf *m) + { +- int r, authenticated; ++ int r, authenticated, kex; + const char *displayname; + +- if (!options.gss_authentication) +- fatal("%s: GSSAPI authentication not enabled", __func__); ++ if (!options.gss_authentication && !options.gss_keyex) ++ fatal("%s: GSSAPI not enabled", __func__); + +- authenticated = authctxt->valid && ssh_gssapi_userok(authctxt->user); ++ if ((r = sshbuf_get_u32(m, &kex)) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ ++ authenticated = authctxt->valid && ++ ssh_gssapi_userok(authctxt->user, authctxt->pw, kex); + + sshbuf_reset(m); + if ((r = sshbuf_put_u32(m, authenticated)) != 0) +@@ -1925,7 +1958,11 @@ mm_answer_gss_userok(struct ssh *ssh, int sock, struct sshbuf *m) + debug3("%s: sending result %d", __func__, authenticated); + mm_request_send(sock, MONITOR_ANS_GSSUSEROK, m); + +- auth_method = "gssapi-with-mic"; ++ if (kex) { ++ auth_method = "gssapi-keyex"; ++ } else { ++ auth_method = "gssapi-with-mic"; ++ } + + if ((displayname = ssh_gssapi_displayname()) != NULL) + auth2_record_info(authctxt, "%s", displayname); +@@ -1933,5 +1970,85 @@ mm_answer_gss_userok(struct ssh *ssh, int sock, struct sshbuf *m) + /* Monitor loop will terminate if authenticated */ + return (authenticated); + } ++ ++int ++mm_answer_gss_sign(struct ssh *ssh, int socket, struct sshbuf *m) ++{ ++ gss_buffer_desc data; ++ gss_buffer_desc hash = GSS_C_EMPTY_BUFFER; ++ OM_uint32 major, minor; ++ size_t len; ++ u_char *p = NULL; ++ int r; ++ ++ if (!options.gss_authentication && !options.gss_keyex) ++ fatal("%s: GSSAPI not enabled", __func__); ++ ++ if ((r = sshbuf_get_string(m, &p, &len)) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ data.value = p; ++ data.length = len; ++ /* Lengths of SHA-1, SHA-256 and SHA-512 hashes that are used */ ++ if (data.length != 20 && data.length != 32 && data.length != 64) ++ fatal("%s: data length incorrect: %d", __func__, ++ (int) data.length); ++ ++ /* Save the session ID on the first time around */ ++ if (session_id2_len == 0) { ++ session_id2_len = data.length; ++ session_id2 = xmalloc(session_id2_len); ++ memcpy(session_id2, data.value, session_id2_len); ++ } ++ major = ssh_gssapi_sign(gsscontext, &data, &hash); ++ ++ free(data.value); ++ ++ sshbuf_reset(m); ++ ++ if ((r = sshbuf_put_u32(m, major)) != 0 || ++ (r = sshbuf_put_string(m, hash.value, hash.length)) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ ++ mm_request_send(socket, MONITOR_ANS_GSSSIGN, m); ++ ++ gss_release_buffer(&minor, &hash); ++ ++ /* Turn on getpwnam permissions */ ++ monitor_permit(mon_dispatch, MONITOR_REQ_PWNAM, 1); ++ ++ /* And credential updating, for when rekeying */ ++ monitor_permit(mon_dispatch, MONITOR_REQ_GSSUPCREDS, 1); ++ ++ return (0); ++} ++ ++int ++mm_answer_gss_updatecreds(struct ssh *ssh, int socket, struct sshbuf *m) { ++ ssh_gssapi_ccache store; ++ int r, ok; ++ ++ if (!options.gss_authentication && !options.gss_keyex) ++ fatal("%s: GSSAPI not enabled", __func__); ++ ++ if ((r = sshbuf_get_string(m, (u_char **)&store.filename, NULL)) != 0 || ++ (r = sshbuf_get_string(m, (u_char **)&store.envvar, NULL)) != 0 || ++ (r = sshbuf_get_string(m, (u_char **)&store.envval, NULL)) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ ++ ok = ssh_gssapi_update_creds(&store); ++ ++ free(store.filename); ++ free(store.envvar); ++ free(store.envval); ++ ++ sshbuf_reset(m); ++ if ((r = sshbuf_put_u32(m, ok)) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ ++ mm_request_send(socket, MONITOR_ANS_GSSUPCREDS, m); ++ ++ return(0); ++} ++ + #endif /* GSSAPI */ + +diff --git a/monitor.h b/monitor.h +index 683e5e071..2b1a2d590 100644 +--- a/monitor.h ++++ b/monitor.h +@@ -63,6 +63,8 @@ enum monitor_reqtype { + MONITOR_REQ_PAM_FREE_CTX = 110, MONITOR_ANS_PAM_FREE_CTX = 111, + MONITOR_REQ_AUDIT_EVENT = 112, MONITOR_REQ_AUDIT_COMMAND = 113, + ++ MONITOR_REQ_GSSSIGN = 150, MONITOR_ANS_GSSSIGN = 151, ++ MONITOR_REQ_GSSUPCREDS = 152, MONITOR_ANS_GSSUPCREDS = 153, + }; + + struct ssh; +diff --git a/monitor_wrap.c b/monitor_wrap.c +index 5e38d83eb..0e78cd006 100644 +--- a/monitor_wrap.c ++++ b/monitor_wrap.c +@@ -993,13 +993,15 @@ mm_ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic) + } + + int +-mm_ssh_gssapi_userok(char *user) ++mm_ssh_gssapi_userok(char *user, struct passwd *pw, int kex) + { + struct sshbuf *m; + int r, authenticated = 0; + + if ((m = sshbuf_new()) == NULL) + fatal("%s: sshbuf_new failed", __func__); ++ if ((r = sshbuf_put_u32(m, kex)) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); + + mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUSEROK, m); + mm_request_receive_expect(pmonitor->m_recvfd, +@@ -1012,4 +1014,57 @@ mm_ssh_gssapi_userok(char *user) + debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); + return (authenticated); + } ++ ++OM_uint32 ++mm_ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_desc *data, gss_buffer_desc *hash) ++{ ++ struct sshbuf *m; ++ OM_uint32 major; ++ int r; ++ ++ if ((m = sshbuf_new()) == NULL) ++ fatal("%s: sshbuf_new failed", __func__); ++ if ((r = sshbuf_put_string(m, data->value, data->length)) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ ++ mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSSIGN, m); ++ mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSSIGN, m); ++ ++ if ((r = sshbuf_get_u32(m, &major)) != 0 || ++ (r = ssh_gssapi_get_buffer_desc(m, hash)) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ ++ sshbuf_free(m); ++ ++ return (major); ++} ++ ++int ++mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store) ++{ ++ struct sshbuf *m; ++ int r, ok; ++ ++ if ((m = sshbuf_new()) == NULL) ++ fatal("%s: sshbuf_new failed", __func__); ++ ++ if ((r = sshbuf_put_cstring(m, ++ store->filename ? store->filename : "")) != 0 || ++ (r = sshbuf_put_cstring(m, ++ store->envvar ? store->envvar : "")) != 0 || ++ (r = sshbuf_put_cstring(m, ++ store->envval ? store->envval : "")) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ ++ mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GSSUPCREDS, m); ++ mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GSSUPCREDS, m); ++ ++ if ((r = sshbuf_get_u32(m, &ok)) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ ++ sshbuf_free(m); ++ ++ return (ok); ++} ++ + #endif /* GSSAPI */ +diff --git a/monitor_wrap.h b/monitor_wrap.h +index 0db38c206..75aef1c74 100644 +--- a/monitor_wrap.h ++++ b/monitor_wrap.h +@@ -65,8 +65,10 @@ int mm_sshkey_verify(const struct sshkey *, const u_char *, size_t, + OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **, gss_OID); + OM_uint32 mm_ssh_gssapi_accept_ctx(Gssctxt *, + gss_buffer_desc *, gss_buffer_desc *, OM_uint32 *); +-int mm_ssh_gssapi_userok(char *user); ++int mm_ssh_gssapi_userok(char *user, struct passwd *, int kex); + OM_uint32 mm_ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t); ++OM_uint32 mm_ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t); ++int mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *); + #endif + + #ifdef USE_PAM +diff --git a/readconf.c b/readconf.c +index 554efd7c9..57dae55d1 100644 +--- a/readconf.c ++++ b/readconf.c +@@ -67,6 +67,7 @@ + #include "uidswap.h" + #include "myproposal.h" + #include "digest.h" ++#include "ssh-gss.h" + + /* Format of the configuration file: + +@@ -160,6 +161,8 @@ typedef enum { + oClearAllForwardings, oNoHostAuthenticationForLocalhost, + oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, + oAddressFamily, oGssAuthentication, oGssDelegateCreds, ++ oGssTrustDns, oGssKeyEx, oGssClientIdentity, oGssRenewalRekey, ++ oGssServerIdentity, oGssKexAlgorithms, + oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, + oSendEnv, oSetEnv, oControlPath, oControlMaster, oControlPersist, + oHashKnownHosts, +@@ -204,10 +207,22 @@ static struct { + /* Sometimes-unsupported options */ + #if defined(GSSAPI) + { "gssapiauthentication", oGssAuthentication }, ++ { "gssapikeyexchange", oGssKeyEx }, + { "gssapidelegatecredentials", oGssDelegateCreds }, ++ { "gssapitrustdns", oGssTrustDns }, ++ { "gssapiclientidentity", oGssClientIdentity }, ++ { "gssapiserveridentity", oGssServerIdentity }, ++ { "gssapirenewalforcesrekey", oGssRenewalRekey }, ++ { "gssapikexalgorithms", oGssKexAlgorithms }, + # else + { "gssapiauthentication", oUnsupported }, ++ { "gssapikeyexchange", oUnsupported }, + { "gssapidelegatecredentials", oUnsupported }, ++ { "gssapitrustdns", oUnsupported }, ++ { "gssapiclientidentity", oUnsupported }, ++ { "gssapiserveridentity", oUnsupported }, ++ { "gssapirenewalforcesrekey", oUnsupported }, ++ { "gssapikexalgorithms", oUnsupported }, + #endif + #ifdef ENABLE_PKCS11 + { "pkcs11provider", oPKCS11Provider }, +@@ -1068,10 +1083,42 @@ parse_time: + intptr = &options->gss_authentication; + goto parse_flag; + ++ case oGssKeyEx: ++ intptr = &options->gss_keyex; ++ goto parse_flag; ++ + case oGssDelegateCreds: + intptr = &options->gss_deleg_creds; + goto parse_flag; + ++ case oGssTrustDns: ++ intptr = &options->gss_trust_dns; ++ goto parse_flag; ++ ++ case oGssClientIdentity: ++ charptr = &options->gss_client_identity; ++ goto parse_string; ++ ++ case oGssServerIdentity: ++ charptr = &options->gss_server_identity; ++ goto parse_string; ++ ++ case oGssRenewalRekey: ++ intptr = &options->gss_renewal_rekey; ++ goto parse_flag; ++ ++ case oGssKexAlgorithms: ++ arg = strdelim(&s); ++ if (!arg || *arg == '\0') ++ fatal("%.200s line %d: Missing argument.", ++ filename, linenum); ++ if (!kex_gss_names_valid(arg)) ++ fatal("%.200s line %d: Bad GSSAPI KexAlgorithms '%s'.", ++ filename, linenum, arg ? arg : ""); ++ if (*activep && options->gss_kex_algorithms == NULL) ++ options->gss_kex_algorithms = xstrdup(arg); ++ break; ++ + case oBatchMode: + intptr = &options->batch_mode; + goto parse_flag; +@@ -1976,7 +2023,13 @@ initialize_options(Options * options) + options->pubkey_authentication = -1; + options->challenge_response_authentication = -1; + options->gss_authentication = -1; ++ options->gss_keyex = -1; + options->gss_deleg_creds = -1; ++ options->gss_trust_dns = -1; ++ options->gss_renewal_rekey = -1; ++ options->gss_client_identity = NULL; ++ options->gss_server_identity = NULL; ++ options->gss_kex_algorithms = NULL; + options->password_authentication = -1; + options->kbd_interactive_authentication = -1; + options->kbd_interactive_devices = NULL; +@@ -2125,8 +2178,18 @@ fill_default_options(Options * options) + options->challenge_response_authentication = 1; + if (options->gss_authentication == -1) + options->gss_authentication = 0; ++ if (options->gss_keyex == -1) ++ options->gss_keyex = 0; + if (options->gss_deleg_creds == -1) + options->gss_deleg_creds = 0; ++ if (options->gss_trust_dns == -1) ++ options->gss_trust_dns = 0; ++ if (options->gss_renewal_rekey == -1) ++ options->gss_renewal_rekey = 0; ++#ifdef GSSAPI ++ if (options->gss_kex_algorithms == NULL) ++ options->gss_kex_algorithms = strdup(GSS_KEX_DEFAULT_KEX); ++#endif + if (options->password_authentication == -1) + options->password_authentication = 1; + if (options->kbd_interactive_authentication == -1) +@@ -2776,7 +2839,14 @@ dump_client_config(Options *o, const char *host) + dump_cfg_fmtint(oGatewayPorts, o->fwd_opts.gateway_ports); + #ifdef GSSAPI + dump_cfg_fmtint(oGssAuthentication, o->gss_authentication); ++ dump_cfg_fmtint(oGssKeyEx, o->gss_keyex); + dump_cfg_fmtint(oGssDelegateCreds, o->gss_deleg_creds); ++ dump_cfg_fmtint(oGssTrustDns, o->gss_trust_dns); ++ dump_cfg_fmtint(oGssRenewalRekey, o->gss_renewal_rekey); ++ dump_cfg_string(oGssClientIdentity, o->gss_client_identity); ++ dump_cfg_string(oGssServerIdentity, o->gss_server_identity); ++ dump_cfg_string(oGssKexAlgorithms, o->gss_kex_algorithms ? ++ o->gss_kex_algorithms : GSS_KEX_DEFAULT_KEX); + #endif /* GSSAPI */ + dump_cfg_fmtint(oHashKnownHosts, o->hash_known_hosts); + dump_cfg_fmtint(oHostbasedAuthentication, o->hostbased_authentication); +diff --git a/readconf.h b/readconf.h +index d6a15550d..3803eeddf 100644 +--- a/readconf.h ++++ b/readconf.h +@@ -41,7 +41,13 @@ typedef struct { + int challenge_response_authentication; + /* Try S/Key or TIS, authentication. */ + int gss_authentication; /* Try GSS authentication */ ++ int gss_keyex; /* Try GSS key exchange */ + int gss_deleg_creds; /* Delegate GSS credentials */ ++ int gss_trust_dns; /* Trust DNS for GSS canonicalization */ ++ int gss_renewal_rekey; /* Credential renewal forces rekey */ ++ char *gss_client_identity; /* Principal to initiate GSSAPI with */ ++ char *gss_server_identity; /* GSSAPI target principal */ ++ char *gss_kex_algorithms; /* GSSAPI kex methods to be offered by client. */ + int password_authentication; /* Try password + * authentication. */ + int kbd_interactive_authentication; /* Try keyboard-interactive auth. */ +diff --git a/servconf.c b/servconf.c +index f08e37477..ded8f4a87 100644 +--- a/servconf.c ++++ b/servconf.c +@@ -70,6 +70,7 @@ + #include "auth.h" + #include "myproposal.h" + #include "digest.h" ++#include "ssh-gss.h" + + static void add_listen_addr(ServerOptions *, const char *, + const char *, int); +@@ -134,8 +135,11 @@ initialize_server_options(ServerOptions *options) + options->kerberos_ticket_cleanup = -1; + options->kerberos_get_afs_token = -1; + options->gss_authentication=-1; ++ options->gss_keyex = -1; + options->gss_cleanup_creds = -1; + options->gss_strict_acceptor = -1; ++ options->gss_store_rekey = -1; ++ options->gss_kex_algorithms = NULL; + options->password_authentication = -1; + options->kbd_interactive_authentication = -1; + options->challenge_response_authentication = -1; +@@ -376,10 +380,18 @@ fill_default_server_options(ServerOptions *options) + options->kerberos_get_afs_token = 0; + if (options->gss_authentication == -1) + options->gss_authentication = 0; ++ if (options->gss_keyex == -1) ++ options->gss_keyex = 0; + if (options->gss_cleanup_creds == -1) + options->gss_cleanup_creds = 1; + if (options->gss_strict_acceptor == -1) + options->gss_strict_acceptor = 1; ++ if (options->gss_store_rekey == -1) ++ options->gss_store_rekey = 0; ++#ifdef GSSAPI ++ if (options->gss_kex_algorithms == NULL) ++ options->gss_kex_algorithms = strdup(GSS_KEX_DEFAULT_KEX); ++#endif + if (options->password_authentication == -1) + options->password_authentication = 1; + if (options->kbd_interactive_authentication == -1) +@@ -523,6 +535,7 @@ typedef enum { + sHostKeyAlgorithms, + sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile, + sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor, ++ sGssKeyEx, sGssKexAlgorithms, sGssStoreRekey, + sAcceptEnv, sSetEnv, sPermitTunnel, + sMatch, sPermitOpen, sPermitListen, sForceCommand, sChrootDirectory, + sUsePrivilegeSeparation, sAllowAgentForwarding, +@@ -600,12 +613,22 @@ static struct { + #ifdef GSSAPI + { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, + { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, ++ { "gssapicleanupcreds", sGssCleanupCreds, SSHCFG_GLOBAL }, + { "gssapistrictacceptorcheck", sGssStrictAcceptor, SSHCFG_GLOBAL }, ++ { "gssapikeyexchange", sGssKeyEx, SSHCFG_GLOBAL }, ++ { "gssapistorecredentialsonrekey", sGssStoreRekey, SSHCFG_GLOBAL }, ++ { "gssapikexalgorithms", sGssKexAlgorithms, SSHCFG_GLOBAL }, + #else + { "gssapiauthentication", sUnsupported, SSHCFG_ALL }, + { "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL }, ++ { "gssapicleanupcreds", sUnsupported, SSHCFG_GLOBAL }, + { "gssapistrictacceptorcheck", sUnsupported, SSHCFG_GLOBAL }, ++ { "gssapikeyexchange", sUnsupported, SSHCFG_GLOBAL }, ++ { "gssapistorecredentialsonrekey", sUnsupported, SSHCFG_GLOBAL }, ++ { "gssapikexalgorithms", sUnsupported, SSHCFG_GLOBAL }, + #endif ++ { "gssusesessionccache", sUnsupported, SSHCFG_GLOBAL }, ++ { "gssapiusesessioncredcache", sUnsupported, SSHCFG_GLOBAL }, + { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL }, + { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL }, + { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, +@@ -1557,6 +1580,10 @@ process_server_config_line_depth(ServerOptions *options, char *line, + intptr = &options->gss_authentication; + goto parse_flag; + ++ case sGssKeyEx: ++ intptr = &options->gss_keyex; ++ goto parse_flag; ++ + case sGssCleanupCreds: + intptr = &options->gss_cleanup_creds; + goto parse_flag; +@@ -1565,6 +1592,22 @@ process_server_config_line_depth(ServerOptions *options, char *line, + intptr = &options->gss_strict_acceptor; + goto parse_flag; + ++ case sGssStoreRekey: ++ intptr = &options->gss_store_rekey; ++ goto parse_flag; ++ ++ case sGssKexAlgorithms: ++ arg = strdelim(&cp); ++ if (!arg || *arg == '\0') ++ fatal("%.200s line %d: Missing argument.", ++ filename, linenum); ++ if (!kex_gss_names_valid(arg)) ++ fatal("%.200s line %d: Bad GSSAPI KexAlgorithms '%s'.", ++ filename, linenum, arg ? arg : ""); ++ if (*activep && options->gss_kex_algorithms == NULL) ++ options->gss_kex_algorithms = xstrdup(arg); ++ break; ++ + case sPasswordAuthentication: + intptr = &options->password_authentication; + goto parse_flag; +@@ -2808,6 +2851,10 @@ dump_config(ServerOptions *o) + #ifdef GSSAPI + dump_cfg_fmtint(sGssAuthentication, o->gss_authentication); + dump_cfg_fmtint(sGssCleanupCreds, o->gss_cleanup_creds); ++ dump_cfg_fmtint(sGssKeyEx, o->gss_keyex); ++ dump_cfg_fmtint(sGssStrictAcceptor, o->gss_strict_acceptor); ++ dump_cfg_fmtint(sGssStoreRekey, o->gss_store_rekey); ++ dump_cfg_string(sGssKexAlgorithms, o->gss_kex_algorithms); + #endif + dump_cfg_fmtint(sPasswordAuthentication, o->password_authentication); + dump_cfg_fmtint(sKbdInteractiveAuthentication, +diff --git a/servconf.h b/servconf.h +index 1df8f3db8..f10908e5b 100644 +--- a/servconf.h ++++ b/servconf.h +@@ -138,8 +138,11 @@ typedef struct { + int kerberos_get_afs_token; /* If true, try to get AFS token if + * authenticated with Kerberos. */ + int gss_authentication; /* If true, permit GSSAPI authentication */ ++ int gss_keyex; /* If true, permit GSSAPI key exchange */ + int gss_cleanup_creds; /* If true, destroy cred cache on logout */ + int gss_strict_acceptor; /* If true, restrict the GSSAPI acceptor name */ ++ int gss_store_rekey; ++ char *gss_kex_algorithms; /* GSSAPI kex methods to be offered by client. */ + int password_authentication; /* If true, permit password + * authentication. */ + int kbd_interactive_authentication; /* If true, permit */ +diff --git a/session.c b/session.c +index 27ca8a104..857f17b3c 100644 +--- a/session.c ++++ b/session.c +@@ -2685,13 +2685,19 @@ do_cleanup(struct ssh *ssh, Authctxt *authctxt) + + #ifdef KRB5 + if (options.kerberos_ticket_cleanup && +- authctxt->krb5_ctx) ++ authctxt->krb5_ctx) { ++ temporarily_use_uid(authctxt->pw); + krb5_cleanup_proc(authctxt); ++ restore_uid(); ++ } + #endif + + #ifdef GSSAPI +- if (options.gss_cleanup_creds) ++ if (options.gss_cleanup_creds) { ++ temporarily_use_uid(authctxt->pw); + ssh_gssapi_cleanup_creds(); ++ restore_uid(); ++ } + #endif + + /* remove agent socket */ +diff --git a/ssh-gss.h b/ssh-gss.h +index 36180d07a..50d80bbca 100644 +--- a/ssh-gss.h ++++ b/ssh-gss.h +@@ -1,6 +1,6 @@ + /* $OpenBSD: ssh-gss.h,v 1.14 2018/07/10 09:13:30 djm Exp $ */ + /* +- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. ++ * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions +@@ -61,10 +61,34 @@ + + #define SSH_GSS_OIDTYPE 0x06 + ++#define SSH2_MSG_KEXGSS_INIT 30 ++#define SSH2_MSG_KEXGSS_CONTINUE 31 ++#define SSH2_MSG_KEXGSS_COMPLETE 32 ++#define SSH2_MSG_KEXGSS_HOSTKEY 33 ++#define SSH2_MSG_KEXGSS_ERROR 34 ++#define SSH2_MSG_KEXGSS_GROUPREQ 40 ++#define SSH2_MSG_KEXGSS_GROUP 41 ++#define KEX_GSS_GRP1_SHA1_ID "gss-group1-sha1-" ++#define KEX_GSS_GRP14_SHA1_ID "gss-group14-sha1-" ++#define KEX_GSS_GRP14_SHA256_ID "gss-group14-sha256-" ++#define KEX_GSS_GRP16_SHA512_ID "gss-group16-sha512-" ++#define KEX_GSS_GEX_SHA1_ID "gss-gex-sha1-" ++#define KEX_GSS_NISTP256_SHA256_ID "gss-nistp256-sha256-" ++#define KEX_GSS_C25519_SHA256_ID "gss-curve25519-sha256-" ++ ++#define GSS_KEX_DEFAULT_KEX \ ++ KEX_GSS_GRP14_SHA256_ID "," \ ++ KEX_GSS_GRP16_SHA512_ID "," \ ++ KEX_GSS_NISTP256_SHA256_ID "," \ ++ KEX_GSS_C25519_SHA256_ID "," \ ++ KEX_GSS_GRP14_SHA1_ID "," \ ++ KEX_GSS_GEX_SHA1_ID ++ + typedef struct { + char *filename; + char *envvar; + char *envval; ++ struct passwd *owner; + void *data; + } ssh_gssapi_ccache; + +@@ -72,8 +96,11 @@ typedef struct { + gss_buffer_desc displayname; + gss_buffer_desc exportedname; + gss_cred_id_t creds; ++ gss_name_t name; + struct ssh_gssapi_mech_struct *mech; + ssh_gssapi_ccache store; ++ int used; ++ int updated; + } ssh_gssapi_client; + + typedef struct ssh_gssapi_mech_struct { +@@ -84,6 +111,7 @@ typedef struct ssh_gssapi_mech_struct { + int (*userok) (ssh_gssapi_client *, char *); + int (*localname) (ssh_gssapi_client *, char **); + void (*storecreds) (ssh_gssapi_client *); ++ int (*updatecreds) (ssh_gssapi_ccache *, ssh_gssapi_client *); + } ssh_gssapi_mech; + + typedef struct { +@@ -94,10 +122,11 @@ typedef struct { + gss_OID oid; /* client */ + gss_cred_id_t creds; /* server */ + gss_name_t client; /* server */ +- gss_cred_id_t client_creds; /* server */ ++ gss_cred_id_t client_creds; /* both */ + } Gssctxt; + + extern ssh_gssapi_mech *supported_mechs[]; ++extern Gssctxt *gss_kex_context; + + int ssh_gssapi_check_oid(Gssctxt *, void *, size_t); + void ssh_gssapi_set_oid_data(Gssctxt *, void *, size_t); +@@ -109,6 +138,7 @@ OM_uint32 ssh_gssapi_test_oid_supported(OM_uint32 *, gss_OID, int *); + + struct sshbuf; + int ssh_gssapi_get_buffer_desc(struct sshbuf *, gss_buffer_desc *); ++int ssh_gssapi_sshpkt_get_buffer_desc(struct ssh *, gss_buffer_desc *); + + OM_uint32 ssh_gssapi_import_name(Gssctxt *, const char *); + OM_uint32 ssh_gssapi_init_ctx(Gssctxt *, int, +@@ -123,17 +153,33 @@ void ssh_gssapi_delete_ctx(Gssctxt **); + OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t); + void ssh_gssapi_buildmic(struct sshbuf *, const char *, + const char *, const char *); +-int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *); ++int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, const char *, const char *); ++OM_uint32 ssh_gssapi_client_identity(Gssctxt *, const char *); ++int ssh_gssapi_credentials_updated(Gssctxt *); + + /* In the server */ ++typedef int ssh_gssapi_check_fn(Gssctxt **, gss_OID, const char *, ++ const char *); ++char *ssh_gssapi_client_mechanisms(const char *, const char *, const char *); ++char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, const char *, ++ const char *, const char *); ++gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int); ++int ssh_gssapi_server_check_mech(Gssctxt **,gss_OID, const char *, ++ const char *); + OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID); +-int ssh_gssapi_userok(char *name); ++int ssh_gssapi_userok(char *name, struct passwd *, int kex); + OM_uint32 ssh_gssapi_checkmic(Gssctxt *, gss_buffer_t, gss_buffer_t); + void ssh_gssapi_do_child(char ***, u_int *); + void ssh_gssapi_cleanup_creds(void); + void ssh_gssapi_storecreds(void); + const char *ssh_gssapi_displayname(void); + ++char *ssh_gssapi_server_mechanisms(void); ++int ssh_gssapi_oid_table_ok(void); ++ ++int ssh_gssapi_update_creds(ssh_gssapi_ccache *store); ++void ssh_gssapi_rekey_creds(void); ++ + #endif /* GSSAPI */ + + #endif /* _SSH_GSS_H */ +diff --git a/ssh.1 b/ssh.1 +index 555317887..be8e964f0 100644 +--- a/ssh.1 ++++ b/ssh.1 +@@ -506,7 +506,13 @@ For full details of the options listed below, and their possible values, see + .It GatewayPorts + .It GlobalKnownHostsFile + .It GSSAPIAuthentication ++.It GSSAPIKeyExchange ++.It GSSAPIClientIdentity + .It GSSAPIDelegateCredentials ++.It GSSAPIKexAlgorithms ++.It GSSAPIRenewalForcesRekey ++.It GSSAPIServerIdentity ++.It GSSAPITrustDns + .It HashKnownHosts + .It Host + .It HostbasedAuthentication +@@ -582,6 +588,8 @@ flag), + (supported message integrity codes), + .Ar kex + (key exchange algorithms), ++.Ar kex-gss ++(GSSAPI key exchange algorithms), + .Ar key + (key types), + .Ar key-cert +diff --git a/ssh.c b/ssh.c +index f34ca0d71..bb98a7e2d 100644 +--- a/ssh.c ++++ b/ssh.c +@@ -801,6 +801,8 @@ main(int ac, char **av) + else if (strcmp(optarg, "kex") == 0 || + strcasecmp(optarg, "KexAlgorithms") == 0) + cp = kex_alg_list('\n'); ++ else if (strcmp(optarg, "kex-gss") == 0) ++ cp = kex_gss_alg_list('\n'); + else if (strcmp(optarg, "key") == 0) + cp = sshkey_alg_list(0, 0, 0, '\n'); + else if (strcmp(optarg, "key-cert") == 0) +@@ -826,8 +828,8 @@ main(int ac, char **av) + } else if (strcmp(optarg, "help") == 0) { + cp = xstrdup( + "cipher\ncipher-auth\ncompression\nkex\n" +- "key\nkey-cert\nkey-plain\nkey-sig\nmac\n" +- "protocol-version\nsig"); ++ "kex-gss\nkey\nkey-cert\nkey-plain\n" ++ "key-sig\nmac\nprotocol-version\nsig"); + } + if (cp == NULL) + fatal("Unsupported query \"%s\"", optarg); +diff --git a/ssh_config b/ssh_config +index 842ea866c..52aae8692 100644 +--- a/ssh_config ++++ b/ssh_config +@@ -24,6 +24,8 @@ + # HostbasedAuthentication no + # GSSAPIAuthentication no + # GSSAPIDelegateCredentials no ++# GSSAPIKeyExchange no ++# GSSAPITrustDNS no + # BatchMode no + # CheckHostIP yes + # AddressFamily any +diff --git a/ssh_config.5 b/ssh_config.5 +index 6be1f1aa2..bd86d000c 100644 +--- a/ssh_config.5 ++++ b/ssh_config.5 +@@ -779,10 +779,67 @@ The default is + Specifies whether user authentication based on GSSAPI is allowed. + The default is + .Cm no . ++.It Cm GSSAPIClientIdentity ++If set, specifies the GSSAPI client identity that ssh should use when ++connecting to the server. The default is unset, which means that the default ++identity will be used. + .It Cm GSSAPIDelegateCredentials + Forward (delegate) credentials to the server. + The default is + .Cm no . ++.It Cm GSSAPIKeyExchange ++Specifies whether key exchange based on GSSAPI may be used. When using ++GSSAPI key exchange the server need not have a host key. ++The default is ++.Dq no . ++.It Cm GSSAPIRenewalForcesRekey ++If set to ++.Dq yes ++then renewal of the client's GSSAPI credentials will force the rekeying of the ++ssh connection. With a compatible server, this will delegate the renewed ++credentials to a session on the server. ++.Pp ++Checks are made to ensure that credentials are only propagated when the new ++credentials match the old ones on the originating client and where the ++receiving server still has the old set in its cache. ++.Pp ++The default is ++.Dq no . ++.Pp ++For this to work ++.Cm GSSAPIKeyExchange ++needs to be enabled in the server and also used by the client. ++.It Cm GSSAPIServerIdentity ++If set, specifies the GSSAPI server identity that ssh should expect when ++connecting to the server. The default is unset, which means that the ++expected GSSAPI server identity will be determined from the target ++hostname. ++.It Cm GSSAPITrustDns ++Set to ++.Dq yes ++to indicate that the DNS is trusted to securely canonicalize ++the name of the host being connected to. If ++.Dq no , ++the hostname entered on the ++command line will be passed untouched to the GSSAPI library. ++The default is ++.Dq no . ++.It Cm GSSAPIKexAlgorithms ++The list of key exchange algorithms that are offered for GSSAPI ++key exchange. Possible values are ++.Bd -literal -offset 3n ++gss-gex-sha1-, ++gss-group1-sha1-, ++gss-group14-sha1-, ++gss-group14-sha256-, ++gss-group16-sha512-, ++gss-nistp256-sha256-, ++gss-curve25519-sha256- ++.Ed ++.Pp ++The default is ++.Dq gss-group14-sha256-,gss-group16-sha512-,gss-nistp256-sha256-,gss-curve25519-sha256-,gss-gex-sha1-,gss-group14-sha1- . ++This option only applies to connections using GSSAPI. + .It Cm HashKnownHosts + Indicates that + .Xr ssh 1 +diff --git a/sshconnect2.c b/sshconnect2.c +index f64aae66a..c47fc31a6 100644 +--- a/sshconnect2.c ++++ b/sshconnect2.c +@@ -80,8 +80,6 @@ + #endif + + /* import */ +-extern char *client_version_string; +-extern char *server_version_string; + extern Options options; + + /* +@@ -210,6 +208,11 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port) + char *s, *all_key; + int r, use_known_hosts_order = 0; + ++#if defined(GSSAPI) && defined(WITH_OPENSSL) ++ char *orig = NULL, *gss = NULL; ++ char *gss_host = NULL; ++#endif ++ + xxx_host = host; + xxx_hostaddr = hostaddr; + +@@ -253,6 +256,41 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port) + compat_pkalg_proposal(options.hostkeyalgorithms); + } + ++#if defined(GSSAPI) && defined(WITH_OPENSSL) ++ if (options.gss_keyex) { ++ /* Add the GSSAPI mechanisms currently supported on this ++ * client to the key exchange algorithm proposal */ ++ orig = myproposal[PROPOSAL_KEX_ALGS]; ++ ++ if (options.gss_server_identity) { ++ gss_host = xstrdup(options.gss_server_identity); ++ } else if (options.gss_trust_dns) { ++ gss_host = remote_hostname(ssh); ++ /* Fall back to specified host if we are using proxy command ++ * and can not use DNS on that socket */ ++ if (strcmp(gss_host, "UNKNOWN") == 0) { ++ gss_host = xstrdup(host); ++ } ++ } else { ++ gss_host = xstrdup(host); ++ } ++ ++ gss = ssh_gssapi_client_mechanisms(gss_host, ++ options.gss_client_identity, options.gss_kex_algorithms); ++ if (gss) { ++ debug("Offering GSSAPI proposal: %s", gss); ++ xasprintf(&myproposal[PROPOSAL_KEX_ALGS], ++ "%s,%s", gss, orig); ++ ++ /* If we've got GSSAPI algorithms, then we also support the ++ * 'null' hostkey, as a last resort */ ++ orig = myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS]; ++ xasprintf(&myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS], ++ "%s,null", orig); ++ } ++ } ++#endif ++ + if (options.rekey_limit || options.rekey_interval) + ssh_packet_set_rekey_limits(ssh, options.rekey_limit, + options.rekey_interval); +@@ -271,16 +309,46 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port) + # ifdef OPENSSL_HAS_ECC + ssh->kex->kex[KEX_ECDH_SHA2] = kex_gen_client; + # endif +-#endif ++# ifdef GSSAPI ++ if (options.gss_keyex) { ++ ssh->kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_client; ++ ssh->kex->kex[KEX_GSS_GRP14_SHA1] = kexgss_client; ++ ssh->kex->kex[KEX_GSS_GRP14_SHA256] = kexgss_client; ++ ssh->kex->kex[KEX_GSS_GRP16_SHA512] = kexgss_client; ++ ssh->kex->kex[KEX_GSS_GEX_SHA1] = kexgssgex_client; ++ ssh->kex->kex[KEX_GSS_NISTP256_SHA256] = kexgss_client; ++ ssh->kex->kex[KEX_GSS_C25519_SHA256] = kexgss_client; ++ } ++# endif ++#endif /* WITH_OPENSSL */ + ssh->kex->kex[KEX_C25519_SHA256] = kex_gen_client; + ssh->kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_gen_client; + ssh->kex->verify_host_key=&verify_host_key_callback; + ++#if defined(GSSAPI) && defined(WITH_OPENSSL) ++ if (options.gss_keyex) { ++ ssh->kex->gss_deleg_creds = options.gss_deleg_creds; ++ ssh->kex->gss_trust_dns = options.gss_trust_dns; ++ ssh->kex->gss_client = options.gss_client_identity; ++ ssh->kex->gss_host = gss_host; ++ } ++#endif ++ + ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &ssh->kex->done); + + /* remove ext-info from the KEX proposals for rekeying */ + myproposal[PROPOSAL_KEX_ALGS] = + compat_kex_proposal(options.kex_algorithms); ++#if defined(GSSAPI) && defined(WITH_OPENSSL) ++ /* repair myproposal after it was crumpled by the */ ++ /* ext-info removal above */ ++ if (gss) { ++ orig = myproposal[PROPOSAL_KEX_ALGS]; ++ xasprintf(&myproposal[PROPOSAL_KEX_ALGS], ++ "%s,%s", gss, orig); ++ free(gss); ++ } ++#endif + if ((r = kex_prop2buf(ssh->kex->my, myproposal)) != 0) + fatal("kex_prop2buf: %s", ssh_err(r)); + +@@ -377,6 +445,7 @@ static int input_gssapi_response(int type, u_int32_t, struct ssh *); + static int input_gssapi_token(int type, u_int32_t, struct ssh *); + static int input_gssapi_error(int, u_int32_t, struct ssh *); + static int input_gssapi_errtok(int, u_int32_t, struct ssh *); ++static int userauth_gsskeyex(struct ssh *); + #endif + + void userauth(struct ssh *, char *); +@@ -393,6 +462,11 @@ static char *authmethods_get(void); + + Authmethod authmethods[] = { + #ifdef GSSAPI ++ {"gssapi-keyex", ++ userauth_gsskeyex, ++ NULL, ++ &options.gss_keyex, ++ NULL}, + {"gssapi-with-mic", + userauth_gssapi, + userauth_gssapi_cleanup, +@@ -763,12 +837,31 @@ userauth_gssapi(struct ssh *ssh) + OM_uint32 min; + int r, ok = 0; + gss_OID mech = NULL; ++ char *gss_host; ++ ++ if (options.gss_server_identity) { ++ gss_host = xstrdup(options.gss_server_identity); ++ } else if (options.gss_trust_dns) { ++ gss_host = remote_hostname(ssh); ++ /* Fall back to specified host if we are using proxy command ++ * and can not use DNS on that socket */ ++ if (strcmp(gss_host, "UNKNOWN") == 0) { ++ gss_host = authctxt->host; ++ } ++ } else { ++ gss_host = xstrdup(authctxt->host); ++ } + + /* Try one GSSAPI method at a time, rather than sending them all at + * once. */ + + if (authctxt->gss_supported_mechs == NULL) +- gss_indicate_mechs(&min, &authctxt->gss_supported_mechs); ++ if (GSS_ERROR(gss_indicate_mechs(&min, ++ &authctxt->gss_supported_mechs))) { ++ authctxt->gss_supported_mechs = NULL; ++ free(gss_host); ++ return 0; ++ } + + /* Check to see whether the mechanism is usable before we offer it */ + while (authctxt->mech_tried < authctxt->gss_supported_mechs->count && +@@ -777,13 +870,15 @@ userauth_gssapi(struct ssh *ssh) + elements[authctxt->mech_tried]; + /* My DER encoding requires length<128 */ + if (mech->length < 128 && ssh_gssapi_check_mechanism(&gssctxt, +- mech, authctxt->host)) { ++ mech, gss_host, options.gss_client_identity)) { + ok = 1; /* Mechanism works */ + } else { + authctxt->mech_tried++; + } + } + ++ free(gss_host); ++ + if (!ok || mech == NULL) + return 0; + +@@ -1023,6 +1118,55 @@ input_gssapi_error(int type, u_int32_t plen, struct ssh *ssh) + free(lang); + return r; + } ++ ++int ++userauth_gsskeyex(struct ssh *ssh) ++{ ++ struct sshbuf *b = NULL; ++ Authctxt *authctxt = ssh->authctxt; ++ gss_buffer_desc gssbuf; ++ gss_buffer_desc mic = GSS_C_EMPTY_BUFFER; ++ OM_uint32 ms; ++ int r; ++ ++ static int attempt = 0; ++ if (attempt++ >= 1) ++ return (0); ++ ++ if (gss_kex_context == NULL) { ++ debug("No valid Key exchange context"); ++ return (0); ++ } ++ ++ if ((b = sshbuf_new()) == NULL) ++ fatal("%s: sshbuf_new failed", __func__); ++ ++ ssh_gssapi_buildmic(b, authctxt->server_user, authctxt->service, ++ "gssapi-keyex"); ++ ++ if ((gssbuf.value = sshbuf_mutable_ptr(b)) == NULL) ++ fatal("%s: sshbuf_mutable_ptr failed", __func__); ++ gssbuf.length = sshbuf_len(b); ++ ++ if (GSS_ERROR(ssh_gssapi_sign(gss_kex_context, &gssbuf, &mic))) { ++ sshbuf_free(b); ++ return (0); ++ } ++ ++ if ((r = sshpkt_start(ssh, SSH2_MSG_USERAUTH_REQUEST)) != 0 || ++ (r = sshpkt_put_cstring(ssh, authctxt->server_user)) != 0 || ++ (r = sshpkt_put_cstring(ssh, authctxt->service)) != 0 || ++ (r = sshpkt_put_cstring(ssh, authctxt->method->name)) != 0 || ++ (r = sshpkt_put_string(ssh, mic.value, mic.length)) != 0 || ++ (r = sshpkt_send(ssh)) != 0) ++ fatal("%s: %s", __func__, ssh_err(r)); ++ ++ sshbuf_free(b); ++ gss_release_buffer(&ms, &mic); ++ ++ return (1); ++} ++ + #endif /* GSSAPI */ + + static int +diff --git a/sshd.c b/sshd.c +index 8aa7f3df6..8c5d5822e 100644 +--- a/sshd.c ++++ b/sshd.c +@@ -816,8 +816,8 @@ notify_hostkeys(struct ssh *ssh) + } + debug3("%s: sent %u hostkeys", __func__, nkeys); + if (nkeys == 0) +- fatal("%s: no hostkeys", __func__); +- if ((r = sshpkt_send(ssh)) != 0) ++ debug3("%s: no hostkeys", __func__); ++ else if ((r = sshpkt_send(ssh)) != 0) + sshpkt_fatal(ssh, r, "%s: send", __func__); + sshbuf_free(buf); + } +@@ -1901,7 +1901,8 @@ main(int ac, char **av) + free(fp); + } + accumulate_host_timing_secret(cfg, NULL); +- if (!sensitive_data.have_ssh2_key) { ++ /* The GSSAPI key exchange can run without a host key */ ++ if (!sensitive_data.have_ssh2_key && !options.gss_keyex) { + logit("sshd: no hostkeys available -- exiting."); + exit(1); + } +@@ -2393,6 +2394,48 @@ do_ssh2_kex(struct ssh *ssh) + myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = compat_pkalg_proposal( + list_hostkey_types()); + ++#if defined(GSSAPI) && defined(WITH_OPENSSL) ++ { ++ char *orig; ++ char *gss = NULL; ++ char *newstr = NULL; ++ orig = myproposal[PROPOSAL_KEX_ALGS]; ++ ++ /* ++ * If we don't have a host key, then there's no point advertising ++ * the other key exchange algorithms ++ */ ++ ++ if (strlen(myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS]) == 0) ++ orig = NULL; ++ ++ if (options.gss_keyex) ++ gss = ssh_gssapi_server_mechanisms(); ++ else ++ gss = NULL; ++ ++ if (gss && orig) ++ xasprintf(&newstr, "%s,%s", gss, orig); ++ else if (gss) ++ newstr = gss; ++ else if (orig) ++ newstr = orig; ++ ++ /* ++ * If we've got GSSAPI mechanisms, then we've got the 'null' host ++ * key alg, but we can't tell people about it unless its the only ++ * host key algorithm we support ++ */ ++ if (gss && (strlen(myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS])) == 0) ++ myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = "null"; ++ ++ if (newstr) ++ myproposal[PROPOSAL_KEX_ALGS] = newstr; ++ else ++ fatal("No supported key exchange algorithms"); ++ } ++#endif ++ + /* start key exchange */ + if ((r = kex_setup(ssh, myproposal)) != 0) + fatal("kex_setup: %s", ssh_err(r)); +@@ -2408,7 +2451,18 @@ do_ssh2_kex(struct ssh *ssh) + # ifdef OPENSSL_HAS_ECC + kex->kex[KEX_ECDH_SHA2] = kex_gen_server; + # endif +-#endif ++# ifdef GSSAPI ++ if (options.gss_keyex) { ++ kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server; ++ kex->kex[KEX_GSS_GRP14_SHA1] = kexgss_server; ++ kex->kex[KEX_GSS_GRP14_SHA256] = kexgss_server; ++ kex->kex[KEX_GSS_GRP16_SHA512] = kexgss_server; ++ kex->kex[KEX_GSS_GEX_SHA1] = kexgssgex_server; ++ kex->kex[KEX_GSS_NISTP256_SHA256] = kexgss_server; ++ kex->kex[KEX_GSS_C25519_SHA256] = kexgss_server; ++ } ++# endif ++#endif /* WITH_OPENSSL */ + kex->kex[KEX_C25519_SHA256] = kex_gen_server; + kex->kex[KEX_KEM_SNTRUP4591761X25519_SHA512] = kex_gen_server; + kex->load_host_public_key=&get_hostkey_public_by_type; +diff --git a/sshd_config b/sshd_config +index 19b7c91a1..2c48105f8 100644 +--- a/sshd_config ++++ b/sshd_config +@@ -69,6 +69,8 @@ AuthorizedKeysFile .ssh/authorized_keys + # GSSAPI options + #GSSAPIAuthentication no + #GSSAPICleanupCredentials yes ++#GSSAPIStrictAcceptorCheck yes ++#GSSAPIKeyExchange no + + # Set this to 'yes' to enable PAM authentication, account processing, + # and session processing. If this is enabled, PAM authentication will +diff --git a/sshd_config.5 b/sshd_config.5 +index 6fa421cae..eabbe9e73 100644 +--- a/sshd_config.5 ++++ b/sshd_config.5 +@@ -644,6 +644,11 @@ Specifies whether to automatically destroy the user's credentials cache + on logout. + The default is + .Cm yes . ++.It Cm GSSAPIKeyExchange ++Specifies whether key exchange based on GSSAPI is allowed. GSSAPI key exchange ++doesn't rely on ssh keys to verify host identity. ++The default is ++.Cm no . + .It Cm GSSAPIStrictAcceptorCheck + Determines whether to be strict about the identity of the GSSAPI acceptor + a client authenticates against. +@@ -658,6 +663,31 @@ machine's default store. + This facility is provided to assist with operation on multi homed machines. + The default is + .Cm yes . ++.It Cm GSSAPIStoreCredentialsOnRekey ++Controls whether the user's GSSAPI credentials should be updated following a ++successful connection rekeying. This option can be used to accepted renewed ++or updated credentials from a compatible client. The default is ++.Dq no . ++.Pp ++For this to work ++.Cm GSSAPIKeyExchange ++needs to be enabled in the server and also used by the client. ++.It Cm GSSAPIKexAlgorithms ++The list of key exchange algorithms that are accepted by GSSAPI ++key exchange. Possible values are ++.Bd -literal -offset 3n ++gss-gex-sha1-, ++gss-group1-sha1-, ++gss-group14-sha1-, ++gss-group14-sha256-, ++gss-group16-sha512-, ++gss-nistp256-sha256-, ++gss-curve25519-sha256- ++.Ed ++.Pp ++The default is ++.Dq gss-group14-sha256-,gss-group16-sha512-,gss-nistp256-sha256-,gss-curve25519-sha256-,gss-gex-sha1-,gss-group14-sha1- . ++This option only applies to connections using GSSAPI. + .It Cm HostbasedAcceptedKeyTypes + Specifies the key types that will be accepted for hostbased authentication + as a list of comma-separated patterns. +diff --git a/sshkey.c b/sshkey.c +index ac451f1a8..b88282e19 100644 +--- a/sshkey.c ++++ b/sshkey.c +@@ -156,6 +156,7 @@ static const struct keytype keytypes[] = { + KEY_ECDSA_SK_CERT, NID_X9_62_prime256v1, 1, 0 }, + # endif /* OPENSSL_HAS_ECC */ + #endif /* WITH_OPENSSL */ ++ { "null", "null", NULL, KEY_NULL, 0, 0, 0 }, + { NULL, NULL, NULL, -1, -1, 0, 0 } + }; + +@@ -257,7 +258,7 @@ sshkey_alg_list(int certs_only, int plain_only, int include_sigonly, char sep) + const struct keytype *kt; + + for (kt = keytypes; kt->type != -1; kt++) { +- if (kt->name == NULL) ++ if (kt->name == NULL || kt->type == KEY_NULL) + continue; + if (!include_sigonly && kt->sigonly) + continue; +diff --git a/sshkey.h b/sshkey.h +index 2d8b62497..dc1c10597 100644 +--- a/sshkey.h ++++ b/sshkey.h +@@ -69,6 +69,7 @@ enum sshkey_types { + KEY_ECDSA_SK_CERT, + KEY_ED25519_SK, + KEY_ED25519_SK_CERT, ++ KEY_NULL, + KEY_UNSPEC + }; + diff --git a/debian/patches/keepalive-extensions.patch b/debian/patches/keepalive-extensions.patch new file mode 100644 index 0000000..c9bc832 --- /dev/null +++ b/debian/patches/keepalive-extensions.patch @@ -0,0 +1,135 @@ +From 164d1c9f11309d38273ac64e30eda2baa3733f78 Mon Sep 17 00:00:00 2001 +From: Richard Kettlewell +Date: Sun, 9 Feb 2014 16:09:52 +0000 +Subject: Various keepalive extensions + +Add compatibility aliases for ProtocolKeepAlives and SetupTimeOut, supported +in previous versions of Debian's OpenSSH package but since superseded by +ServerAliveInterval. (We're probably stuck with this bit for +compatibility.) + +In batch mode, default ServerAliveInterval to five minutes. + +Adjust documentation to match and to give some more advice on use of +keepalives. + +Author: Ian Jackson +Author: Matthew Vernon +Author: Colin Watson +Last-Update: 2020-02-21 + +Patch-Name: keepalive-extensions.patch +--- + readconf.c | 14 ++++++++++++-- + ssh_config.5 | 21 +++++++++++++++++++-- + sshd_config.5 | 3 +++ + 3 files changed, 34 insertions(+), 4 deletions(-) + +diff --git a/readconf.c b/readconf.c +index b069333fa..3d0a812b3 100644 +--- a/readconf.c ++++ b/readconf.c +@@ -176,6 +176,7 @@ typedef enum { + oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, + oPubkeyAcceptedKeyTypes, oCASignatureAlgorithms, oProxyJump, + oSecurityKeyProvider, ++ oProtocolKeepAlives, oSetupTimeOut, + oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported + } OpCodes; + +@@ -326,6 +327,8 @@ static struct { + { "ignoreunknown", oIgnoreUnknown }, + { "proxyjump", oProxyJump }, + { "securitykeyprovider", oSecurityKeyProvider }, ++ { "protocolkeepalives", oProtocolKeepAlives }, ++ { "setuptimeout", oSetupTimeOut }, + + { NULL, oBadOption } + }; +@@ -1534,6 +1537,8 @@ parse_keytypes: + goto parse_flag; + + case oServerAliveInterval: ++ case oProtocolKeepAlives: /* Debian-specific compatibility alias */ ++ case oSetupTimeOut: /* Debian-specific compatibility alias */ + intptr = &options->server_alive_interval; + goto parse_time; + +@@ -2266,8 +2271,13 @@ fill_default_options(Options * options) + options->rekey_interval = 0; + if (options->verify_host_key_dns == -1) + options->verify_host_key_dns = 0; +- if (options->server_alive_interval == -1) +- options->server_alive_interval = 0; ++ if (options->server_alive_interval == -1) { ++ /* in batch mode, default is 5mins */ ++ if (options->batch_mode == 1) ++ options->server_alive_interval = 300; ++ else ++ options->server_alive_interval = 0; ++ } + if (options->server_alive_count_max == -1) + options->server_alive_count_max = 3; + if (options->control_master == -1) +diff --git a/ssh_config.5 b/ssh_config.5 +index bd86d000c..3ceb800ba 100644 +--- a/ssh_config.5 ++++ b/ssh_config.5 +@@ -275,9 +275,13 @@ If set to + .Cm yes , + user interaction such as password prompts and host key confirmation requests + will be disabled. ++In addition, the ++.Cm ServerAliveInterval ++option will be set to 300 seconds by default (Debian-specific). + This option is useful in scripts and other batch jobs where no user + is present to interact with +-.Xr ssh 1 . ++.Xr ssh 1 , ++and where it is desirable to detect a broken network swiftly. + The argument must be + .Cm yes + or +@@ -1624,7 +1628,14 @@ from the server, + will send a message through the encrypted + channel to request a response from the server. + The default +-is 0, indicating that these messages will not be sent to the server. ++is 0, indicating that these messages will not be sent to the server, ++or 300 if the ++.Cm BatchMode ++option is set (Debian-specific). ++.Cm ProtocolKeepAlives ++and ++.Cm SetupTimeOut ++are Debian-specific compatibility aliases for this option. + .It Cm SetEnv + Directly specify one or more environment variables and their contents to + be sent to the server. +@@ -1704,6 +1715,12 @@ Specifies whether the system should send TCP keepalive messages to the + other side. + If they are sent, death of the connection or crash of one + of the machines will be properly noticed. ++This option only uses TCP keepalives (as opposed to using ssh level ++keepalives), so takes a long time to notice when the connection dies. ++As such, you probably want ++the ++.Cm ServerAliveInterval ++option as well. + However, this means that + connections will die if the route is down temporarily, and some people + find it annoying. +diff --git a/sshd_config.5 b/sshd_config.5 +index eabbe9e73..6457620bb 100644 +--- a/sshd_config.5 ++++ b/sshd_config.5 +@@ -1691,6 +1691,9 @@ This avoids infinitely hanging sessions. + .Pp + To disable TCP keepalive messages, the value should be set to + .Cm no . ++.Pp ++This option was formerly called ++.Cm KeepAlive . + .It Cm TrustedUserCAKeys + Specifies a file containing public keys of certificate authorities that are + trusted to sign user certificates for authentication, or diff --git a/debian/patches/mention-ssh-keygen-on-keychange.patch b/debian/patches/mention-ssh-keygen-on-keychange.patch new file mode 100644 index 0000000..cb227f8 --- /dev/null +++ b/debian/patches/mention-ssh-keygen-on-keychange.patch @@ -0,0 +1,44 @@ +From c8da63c601b5d44fd233548385809c9c3a2fa0b8 Mon Sep 17 00:00:00 2001 +From: Scott Moser +Date: Sun, 9 Feb 2014 16:10:03 +0000 +Subject: Mention ssh-keygen in ssh fingerprint changed warning + +Author: Chris Lamb +Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1843 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/686607 +Last-Update: 2017-08-22 + +Patch-Name: mention-ssh-keygen-on-keychange.patch +--- + sshconnect.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/sshconnect.c b/sshconnect.c +index 5f8c81b84..3ae20b74e 100644 +--- a/sshconnect.c ++++ b/sshconnect.c +@@ -994,9 +994,13 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, + error("%s. This could either mean that", key_msg); + error("DNS SPOOFING is happening or the IP address for the host"); + error("and its host key have changed at the same time."); +- if (ip_status != HOST_NEW) ++ if (ip_status != HOST_NEW) { + error("Offending key for IP in %s:%lu", + ip_found->file, ip_found->line); ++ error(" remove with:"); ++ error(" ssh-keygen -f \"%s\" -R \"%s\"", ++ ip_found->file, ip); ++ } + } + /* The host key has changed. */ + warn_changed_key(host_key); +@@ -1005,6 +1009,9 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, + error("Offending %s key in %s:%lu", + sshkey_type(host_found->key), + host_found->file, host_found->line); ++ error(" remove with:"); ++ error(" ssh-keygen -f \"%s\" -R \"%s\"", ++ host_found->file, host); + + /* + * If strict host key checking is in use, the user will have diff --git a/debian/patches/no-openssl-version-status.patch b/debian/patches/no-openssl-version-status.patch new file mode 100644 index 0000000..e383375 --- /dev/null +++ b/debian/patches/no-openssl-version-status.patch @@ -0,0 +1,62 @@ +From cf3ffd6a25d425bed33dd698f92e64953d9769eb Mon Sep 17 00:00:00 2001 +From: Kurt Roeckx +Date: Sun, 9 Feb 2014 16:10:14 +0000 +Subject: Don't check the status field of the OpenSSL version + +There is no reason to check the version of OpenSSL (in Debian). If it's +not compatible the soname will change. OpenSSH seems to want to do a +check for the soname based on the version number, but wants to keep the +status of the release the same. Remove that check on the status since +it doesn't tell you anything about how compatible that version is. + +Author: Colin Watson +Bug-Debian: https://bugs.debian.org/93581 +Bug-Debian: https://bugs.debian.org/664383 +Bug-Debian: https://bugs.debian.org/732940 +Forwarded: not-needed +Last-Update: 2014-10-07 + +Patch-Name: no-openssl-version-status.patch +--- + openbsd-compat/openssl-compat.c | 6 +++--- + openbsd-compat/regress/opensslvertest.c | 1 + + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c +index a37ca61bf..c1749210d 100644 +--- a/openbsd-compat/openssl-compat.c ++++ b/openbsd-compat/openssl-compat.c +@@ -34,7 +34,7 @@ + /* + * OpenSSL version numbers: MNNFFPPS: major minor fix patch status + * We match major, minor, fix and status (not patch) for <1.0.0. +- * After that, we acceptable compatible fix versions (so we ++ * After that, we accept compatible fix and status versions (so we + * allow 1.0.1 to work with 1.0.0). Going backwards is only allowed + * within a patch series. + */ +@@ -55,10 +55,10 @@ ssh_compatible_openssl(long headerver, long libver) + } + + /* +- * For versions >= 1.0.0, major,minor,status must match and library ++ * For versions >= 1.0.0, major,minor must match and library + * fix version must be equal to or newer than the header. + */ +- mask = 0xfff0000fL; /* major,minor,status */ ++ mask = 0xfff00000L; /* major,minor */ + hfix = (headerver & 0x000ff000) >> 12; + lfix = (libver & 0x000ff000) >> 12; + if ( (headerver & mask) == (libver & mask) && lfix >= hfix) +diff --git a/openbsd-compat/regress/opensslvertest.c b/openbsd-compat/regress/opensslvertest.c +index 5d019b598..58474873d 100644 +--- a/openbsd-compat/regress/opensslvertest.c ++++ b/openbsd-compat/regress/opensslvertest.c +@@ -35,6 +35,7 @@ struct version_test { + + /* built with 1.0.1b release headers */ + { 0x1000101fL, 0x1000101fL, 1},/* exact match */ ++ { 0x1000101fL, 0x10001010L, 1}, /* different status: ok */ + { 0x1000101fL, 0x1000102fL, 1}, /* newer library patch version: ok */ + { 0x1000101fL, 0x1000100fL, 1}, /* older library patch version: ok */ + { 0x1000101fL, 0x1000201fL, 1}, /* newer library fix version: ok */ diff --git a/debian/patches/openbsd-docs.patch b/debian/patches/openbsd-docs.patch new file mode 100644 index 0000000..64405d5 --- /dev/null +++ b/debian/patches/openbsd-docs.patch @@ -0,0 +1,148 @@ +From 6bcbfca92b58917dba48b696dd63529fa5dcbb82 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sun, 9 Feb 2014 16:10:09 +0000 +Subject: Adjust various OpenBSD-specific references in manual pages + +No single bug reference for this patch, but history includes: + http://bugs.debian.org/154434 (login.conf(5)) + http://bugs.debian.org/513417 (/etc/rc) + http://bugs.debian.org/530692 (ssl(8)) + https://bugs.launchpad.net/bugs/456660 (ssl(8)) + +Forwarded: not-needed +Last-Update: 2017-10-04 + +Patch-Name: openbsd-docs.patch +--- + moduli.5 | 4 ++-- + ssh-keygen.1 | 12 ++++-------- + ssh.1 | 4 ++++ + sshd.8 | 5 ++--- + sshd_config.5 | 3 +-- + 5 files changed, 13 insertions(+), 15 deletions(-) + +diff --git a/moduli.5 b/moduli.5 +index ef0de0850..149846c8c 100644 +--- a/moduli.5 ++++ b/moduli.5 +@@ -21,7 +21,7 @@ + .Nd Diffie-Hellman moduli + .Sh DESCRIPTION + The +-.Pa /etc/moduli ++.Pa /etc/ssh/moduli + file contains prime numbers and generators for use by + .Xr sshd 8 + in the Diffie-Hellman Group Exchange key exchange method. +@@ -110,7 +110,7 @@ first estimates the size of the modulus required to produce enough + Diffie-Hellman output to sufficiently key the selected symmetric cipher. + .Xr sshd 8 + then randomly selects a modulus from +-.Fa /etc/moduli ++.Fa /etc/ssh/moduli + that best meets the size requirement. + .Sh SEE ALSO + .Xr ssh-keygen 1 , +diff --git a/ssh-keygen.1 b/ssh-keygen.1 +index 3ae596caa..836174fb6 100644 +--- a/ssh-keygen.1 ++++ b/ssh-keygen.1 +@@ -202,9 +202,7 @@ key in + .Pa ~/.ssh/id_ed25519_sk + or + .Pa ~/.ssh/id_rsa . +-Additionally, the system administrator may use this to generate host keys, +-as seen in +-.Pa /etc/rc . ++Additionally, the system administrator may use this to generate host keys. + .Pp + Normally this program generates the key and asks for a file in which + to store the private key. +@@ -269,9 +267,7 @@ If + .Fl f + has also been specified, its argument is used as a prefix to the + default path for the resulting host key files. +-This is used by +-.Pa /etc/rc +-to generate new host keys. ++This is used by system administration scripts to generate new host keys. + .It Fl a Ar rounds + When saving a private key, this option specifies the number of KDF + (key derivation function) rounds used. +@@ -804,7 +800,7 @@ option. + Valid generator values are 2, 3, and 5. + .Pp + Screened DH groups may be installed in +-.Pa /etc/moduli . ++.Pa /etc/ssh/moduli . + It is important that this file contains moduli of a range of bit lengths and + that both ends of a connection share common moduli. + .Pp +@@ -1185,7 +1181,7 @@ on all machines + where the user wishes to log in using public key authentication. + There is no need to keep the contents of this file secret. + .Pp +-.It Pa /etc/moduli ++.It Pa /etc/ssh/moduli + Contains Diffie-Hellman groups used for DH-GEX. + The file format is described in + .Xr moduli 5 . +diff --git a/ssh.1 b/ssh.1 +index 5d613076c..1880c032d 100644 +--- a/ssh.1 ++++ b/ssh.1 +@@ -890,6 +890,10 @@ implements public key authentication protocol automatically, + using one of the DSA, ECDSA, Ed25519 or RSA algorithms. + The HISTORY section of + .Xr ssl 8 ++(on non-OpenBSD systems, see ++.nh ++http://www.openbsd.org/cgi\-bin/man.cgi?query=ssl&sektion=8#HISTORY) ++.hy + contains a brief discussion of the DSA and RSA algorithms. + .Pp + The file +diff --git a/sshd.8 b/sshd.8 +index 97d547ffa..7895a6a94 100644 +--- a/sshd.8 ++++ b/sshd.8 +@@ -65,7 +65,7 @@ over an insecure network. + .Nm + listens for connections from clients. + It is normally started at boot from +-.Pa /etc/rc . ++.Pa /etc/init.d/ssh . + It forks a new + daemon for each incoming connection. + The forked daemons handle +@@ -911,7 +911,7 @@ This file is for host-based authentication (see + .Xr ssh 1 ) . + It should only be writable by root. + .Pp +-.It Pa /etc/moduli ++.It Pa /etc/ssh/moduli + Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange" + key exchange method. + The file format is described in +@@ -1009,7 +1009,6 @@ The content of this file is not sensitive; it can be world-readable. + .Xr ssh-keyscan 1 , + .Xr chroot 2 , + .Xr hosts_access 5 , +-.Xr login.conf 5 , + .Xr moduli 5 , + .Xr sshd_config 5 , + .Xr inetd 8 , +diff --git a/sshd_config.5 b/sshd_config.5 +index 33dc0c675..32ae46476 100644 +--- a/sshd_config.5 ++++ b/sshd_config.5 +@@ -385,8 +385,7 @@ Certificates signed using other algorithms will not be accepted for + public key or host-based authentication. + .It Cm ChallengeResponseAuthentication + Specifies whether challenge-response authentication is allowed (e.g. via +-PAM or through authentication styles supported in +-.Xr login.conf 5 ) ++PAM). + The default is + .Cm yes . + .It Cm ChrootDirectory diff --git a/debian/patches/package-versioning.patch b/debian/patches/package-versioning.patch new file mode 100644 index 0000000..daa1473 --- /dev/null +++ b/debian/patches/package-versioning.patch @@ -0,0 +1,47 @@ +From 707144d399b9fc959a4f6be3fd8e239c208c88ff Mon Sep 17 00:00:00 2001 +From: Matthew Vernon +Date: Sun, 9 Feb 2014 16:10:05 +0000 +Subject: Include the Debian version in our identification + +This makes it easier to audit networks for versions patched against security +vulnerabilities. It has little detrimental effect, as attackers will +generally just try attacks rather than bothering to scan for +vulnerable-looking version strings. (However, see debian-banner.patch.) + +Forwarded: not-needed +Last-Update: 2019-06-05 + +Patch-Name: package-versioning.patch +--- + kex.c | 2 +- + version.h | 7 ++++++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/kex.c b/kex.c +index 751cfc710..ce7bb5b3b 100644 +--- a/kex.c ++++ b/kex.c +@@ -1243,7 +1243,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms, + if (version_addendum != NULL && *version_addendum == '\0') + version_addendum = NULL; + if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%.100s%s%s\r\n", +- PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION, ++ PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE, + version_addendum == NULL ? "" : " ", + version_addendum == NULL ? "" : version_addendum)) != 0) { + oerrno = errno; +diff --git a/version.h b/version.h +index c2f9c55bb..480cd59e1 100644 +--- a/version.h ++++ b/version.h +@@ -3,4 +3,9 @@ + #define SSH_VERSION "OpenSSH_8.4" + + #define SSH_PORTABLE "p1" +-#define SSH_RELEASE SSH_VERSION SSH_PORTABLE ++#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE ++#ifdef SSH_EXTRAVERSION ++#define SSH_RELEASE SSH_RELEASE_MINIMUM " " SSH_EXTRAVERSION ++#else ++#define SSH_RELEASE SSH_RELEASE_MINIMUM ++#endif diff --git a/debian/patches/restore-authorized_keys2.patch b/debian/patches/restore-authorized_keys2.patch new file mode 100644 index 0000000..a1f5205 --- /dev/null +++ b/debian/patches/restore-authorized_keys2.patch @@ -0,0 +1,35 @@ +From 8dc9bb0d9cf53a35d6003623f1e7c91326d79875 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sun, 5 Mar 2017 02:02:11 +0000 +Subject: Restore reading authorized_keys2 by default + +Upstream seems to intend to gradually phase this out, so don't assume +that this will remain the default forever. However, we were late in +adopting the upstream sshd_config changes, so it makes sense to extend +the grace period. + +Bug-Debian: https://bugs.debian.org/852320 +Forwarded: not-needed +Last-Update: 2017-03-05 + +Patch-Name: restore-authorized_keys2.patch +--- + sshd_config | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/sshd_config b/sshd_config +index 459c1b230..dc0db5706 100644 +--- a/sshd_config ++++ b/sshd_config +@@ -38,9 +38,8 @@ Include /etc/ssh/sshd_config.d/*.conf + + #PubkeyAuthentication yes + +-# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 +-# but this is overridden so installations will only check .ssh/authorized_keys +-AuthorizedKeysFile .ssh/authorized_keys ++# Expect .ssh/authorized_keys2 to be disregarded by default in future. ++#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 + + #AuthorizedPrincipalsFile none + diff --git a/debian/patches/restore-tcp-wrappers.patch b/debian/patches/restore-tcp-wrappers.patch new file mode 100644 index 0000000..7388fad --- /dev/null +++ b/debian/patches/restore-tcp-wrappers.patch @@ -0,0 +1,172 @@ +From 6806b85f30244d186206004386a9faddc16b8738 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Tue, 7 Oct 2014 13:22:41 +0100 +Subject: Restore TCP wrappers support + +Support for TCP wrappers was dropped in OpenSSH 6.7. See this message +and thread: + + https://lists.mindrot.org/pipermail/openssh-unix-dev/2014-April/032497.html + +It is true that this reduces preauth attack surface in sshd. On the +other hand, this support seems to be quite widely used, and abruptly +dropping it (from the perspective of users who don't read +openssh-unix-dev) could easily cause more serious problems in practice. + +It's not entirely clear what the right long-term answer for Debian is, +but it at least probably doesn't involve dropping this feature shortly +before a freeze. + +Forwarded: not-needed +Last-Update: 2019-06-05 + +Patch-Name: restore-tcp-wrappers.patch +--- + configure.ac | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + sshd.8 | 7 +++++++ + sshd.c | 25 +++++++++++++++++++++++ + 3 files changed, 89 insertions(+) + +diff --git a/configure.ac b/configure.ac +index c8a96deb4..bb435ec1f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1571,6 +1571,62 @@ else + AC_MSG_RESULT([no]) + fi + ++# Check whether user wants TCP wrappers support ++TCPW_MSG="no" ++AC_ARG_WITH([tcp-wrappers], ++ [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support (optionally in PATH)], ++ [ ++ if test "x$withval" != "xno" ; then ++ saved_LIBS="$LIBS" ++ saved_LDFLAGS="$LDFLAGS" ++ saved_CPPFLAGS="$CPPFLAGS" ++ if test -n "${withval}" && \ ++ test "x${withval}" != "xyes"; then ++ if test -d "${withval}/lib"; then ++ if test -n "${need_dash_r}"; then ++ LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" ++ else ++ LDFLAGS="-L${withval}/lib ${LDFLAGS}" ++ fi ++ else ++ if test -n "${need_dash_r}"; then ++ LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}" ++ else ++ LDFLAGS="-L${withval} ${LDFLAGS}" ++ fi ++ fi ++ if test -d "${withval}/include"; then ++ CPPFLAGS="-I${withval}/include ${CPPFLAGS}" ++ else ++ CPPFLAGS="-I${withval} ${CPPFLAGS}" ++ fi ++ fi ++ LIBS="-lwrap $LIBS" ++ AC_MSG_CHECKING([for libwrap]) ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ++#include ++#include ++#include ++#include ++int deny_severity = 0, allow_severity = 0; ++ ]], [[ ++ hosts_access(0); ++ ]])], [ ++ AC_MSG_RESULT([yes]) ++ AC_DEFINE([LIBWRAP], [1], ++ [Define if you want ++ TCP Wrappers support]) ++ SSHDLIBS="$SSHDLIBS -lwrap" ++ TCPW_MSG="yes" ++ ], [ ++ AC_MSG_ERROR([*** libwrap missing]) ++ ++ ]) ++ LIBS="$saved_LIBS" ++ fi ++ ] ++) ++ + # Check whether user wants to use ldns + LDNS_MSG="no" + AC_ARG_WITH(ldns, +@@ -5536,6 +5592,7 @@ echo " PAM support: $PAM_MSG" + echo " OSF SIA support: $SIA_MSG" + echo " KerberosV support: $KRB5_MSG" + echo " SELinux support: $SELINUX_MSG" ++echo " TCP Wrappers support: $TCPW_MSG" + echo " MD5 password support: $MD5_MSG" + echo " libedit support: $LIBEDIT_MSG" + echo " libldns support: $LDNS_MSG" +diff --git a/sshd.8 b/sshd.8 +index b2fad56d3..97d547ffa 100644 +--- a/sshd.8 ++++ b/sshd.8 +@@ -900,6 +900,12 @@ the user's home directory becomes accessible. + This file should be writable only by the user, and need not be + readable by anyone else. + .Pp ++.It Pa /etc/hosts.allow ++.It Pa /etc/hosts.deny ++Access controls that should be enforced by tcp-wrappers are defined here. ++Further details are described in ++.Xr hosts_access 5 . ++.Pp + .It Pa /etc/hosts.equiv + This file is for host-based authentication (see + .Xr ssh 1 ) . +@@ -1002,6 +1008,7 @@ The content of this file is not sensitive; it can be world-readable. + .Xr ssh-keygen 1 , + .Xr ssh-keyscan 1 , + .Xr chroot 2 , ++.Xr hosts_access 5 , + .Xr login.conf 5 , + .Xr moduli 5 , + .Xr sshd_config 5 , +diff --git a/sshd.c b/sshd.c +index 8c5d5822e..a50ec3584 100644 +--- a/sshd.c ++++ b/sshd.c +@@ -124,6 +124,13 @@ + #include "ssherr.h" + #include "sk-api.h" + ++#ifdef LIBWRAP ++#include ++#include ++int allow_severity; ++int deny_severity; ++#endif /* LIBWRAP */ ++ + /* Re-exec fds */ + #define REEXEC_DEVCRYPTO_RESERVED_FD (STDERR_FILENO + 1) + #define REEXEC_STARTUP_PIPE_FD (STDERR_FILENO + 2) +@@ -2183,6 +2190,24 @@ main(int ac, char **av) + #ifdef SSH_AUDIT_EVENTS + audit_connection_from(remote_ip, remote_port); + #endif ++#ifdef LIBWRAP ++ allow_severity = options.log_facility|LOG_INFO; ++ deny_severity = options.log_facility|LOG_WARNING; ++ /* Check whether logins are denied from this host. */ ++ if (ssh_packet_connection_is_on_socket(ssh)) { ++ struct request_info req; ++ ++ request_init(&req, RQ_DAEMON, __progname, RQ_FILE, sock_in, 0); ++ fromhost(&req); ++ ++ if (!hosts_access(&req)) { ++ debug("Connection refused by tcp wrapper"); ++ refuse(&req); ++ /* NOTREACHED */ ++ fatal("libwrap refuse returns"); ++ } ++ } ++#endif /* LIBWRAP */ + + rdomain = ssh_packet_rdomain_in(ssh); + diff --git a/debian/patches/revert-ipqos-defaults.patch b/debian/patches/revert-ipqos-defaults.patch new file mode 100644 index 0000000..b84cef1 --- /dev/null +++ b/debian/patches/revert-ipqos-defaults.patch @@ -0,0 +1,93 @@ +From 3728919292c05983372954d27426f7d966813139 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Mon, 8 Apr 2019 10:46:29 +0100 +Subject: Revert "upstream: Update default IPQoS in ssh(1), sshd(8) to DSCP + AF21 for" + +This reverts commit 5ee8448ad7c306f05a9f56769f95336a8269f379. + +The IPQoS default changes have some unfortunate interactions with +iptables (see https://bugs.debian.org/923880) and VMware, so I'm +temporarily reverting them until those have been fixed. + +Bug-Debian: https://bugs.debian.org/923879 +Bug-Debian: https://bugs.debian.org/926229 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1822370 +Last-Update: 2019-04-08 + +Patch-Name: revert-ipqos-defaults.patch +--- + readconf.c | 4 ++-- + servconf.c | 4 ++-- + ssh_config.5 | 6 ++---- + sshd_config.5 | 6 ++---- + 4 files changed, 8 insertions(+), 12 deletions(-) + +diff --git a/readconf.c b/readconf.c +index e676b6be6..c60df5602 100644 +--- a/readconf.c ++++ b/readconf.c +@@ -2298,9 +2298,9 @@ fill_default_options(Options * options) + if (options->visual_host_key == -1) + options->visual_host_key = 0; + if (options->ip_qos_interactive == -1) +- options->ip_qos_interactive = IPTOS_DSCP_AF21; ++ options->ip_qos_interactive = IPTOS_LOWDELAY; + if (options->ip_qos_bulk == -1) +- options->ip_qos_bulk = IPTOS_DSCP_CS1; ++ options->ip_qos_bulk = IPTOS_THROUGHPUT; + if (options->request_tty == -1) + options->request_tty = REQUEST_TTY_AUTO; + if (options->proxy_use_fdpass == -1) +diff --git a/servconf.c b/servconf.c +index f9eb778d6..98afcfcec 100644 +--- a/servconf.c ++++ b/servconf.c +@@ -453,9 +453,9 @@ fill_default_server_options(ServerOptions *options) + if (options->permit_tun == -1) + options->permit_tun = SSH_TUNMODE_NO; + if (options->ip_qos_interactive == -1) +- options->ip_qos_interactive = IPTOS_DSCP_AF21; ++ options->ip_qos_interactive = IPTOS_LOWDELAY; + if (options->ip_qos_bulk == -1) +- options->ip_qos_bulk = IPTOS_DSCP_CS1; ++ options->ip_qos_bulk = IPTOS_THROUGHPUT; + if (options->version_addendum == NULL) + options->version_addendum = xstrdup(""); + if (options->fwd_opts.streamlocal_bind_mask == (mode_t)-1) +diff --git a/ssh_config.5 b/ssh_config.5 +index 6d6c59521..080d289a7 100644 +--- a/ssh_config.5 ++++ b/ssh_config.5 +@@ -1156,11 +1156,9 @@ If one argument is specified, it is used as the packet class unconditionally. + If two values are specified, the first is automatically selected for + interactive sessions and the second for non-interactive sessions. + The default is +-.Cm af21 +-(Low-Latency Data) ++.Cm lowdelay + for interactive sessions and +-.Cm cs1 +-(Lower Effort) ++.Cm throughput + for non-interactive sessions. + .It Cm KbdInteractiveAuthentication + Specifies whether to use keyboard-interactive authentication. +diff --git a/sshd_config.5 b/sshd_config.5 +index 472001dd1..a555e7ec3 100644 +--- a/sshd_config.5 ++++ b/sshd_config.5 +@@ -925,11 +925,9 @@ If one argument is specified, it is used as the packet class unconditionally. + If two values are specified, the first is automatically selected for + interactive sessions and the second for non-interactive sessions. + The default is +-.Cm af21 +-(Low-Latency Data) ++.Cm lowdelay + for interactive sessions and +-.Cm cs1 +-(Lower Effort) ++.Cm throughput + for non-interactive sessions. + .It Cm KbdInteractiveAuthentication + Specifies whether to allow keyboard-interactive authentication. diff --git a/debian/patches/revert-x32-sandbox-breakage.patch b/debian/patches/revert-x32-sandbox-breakage.patch new file mode 100644 index 0000000..32cff92 --- /dev/null +++ b/debian/patches/revert-x32-sandbox-breakage.patch @@ -0,0 +1,39 @@ +From 67434174b3d64b352a794275f77489ebf1575849 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Mon, 26 Oct 2020 17:36:22 +0000 +Subject: Revert "detect Linux/X32 systems" + +This reverts commit 5b56bd0affea7b02b540bdbc4d1d271b0e4fc885. The bug +reporter wasn't actually using x32, but rather an ordinary 32-bit +userspace on a 64-bit kernel; this patch broke the seccomp sandbox on +the actual x32 architecture. + +Patch-Name: revert-x32-sandbox-breakage.patch +--- + configure.ac | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5944299fa..15fc0d653 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -521,8 +521,6 @@ SPP_MSG="no" + # the --with-solaris-privs option and --with-sandbox=solaris). + SOLARIS_PRIVS="no" + +-AC_CHECK_SIZEOF([size_t]) +- + # Check for some target-specific stuff + case "$host" in + *-*-aix*) +@@ -891,10 +889,6 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) + case "$host" in + x86_64-*) + seccomp_audit_arch=AUDIT_ARCH_X86_64 +- # X32: AMD64 instructions in 32bit address space. +- if test "x$ac_cv_sizeof_size_t" = "x4" ; then +- seccomp_audit_arch=AUDIT_ARCH_I386 +- fi + ;; + i*86-*) + seccomp_audit_arch=AUDIT_ARCH_I386 diff --git a/debian/patches/sandbox-pselect6_time64.patch b/debian/patches/sandbox-pselect6_time64.patch new file mode 100644 index 0000000..7a14bc1 --- /dev/null +++ b/debian/patches/sandbox-pselect6_time64.patch @@ -0,0 +1,32 @@ +From ed99ef256258d8556dbe39d976c2528ede050f14 Mon Sep 17 00:00:00 2001 +From: Darren Tucker +Date: Fri, 20 Nov 2020 13:37:54 +1100 +Subject: Add new pselect6_time64 syscall on ARM. + +This is apparently needed on armhfp/armv7hl. bz#3232, patch from +jjelen at redhat.com. + +Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=0f90440ca70abab947acbd77795e9f130967956c +Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=3232 +Bug-Debian: https://bugs.debian.org/1004427 +Last-Update: 2022-02-25 + +Patch-Name: sandbox-pselect6_time64.patch +--- + sandbox-seccomp-filter.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c +index e0768c063..5065ae7ef 100644 +--- a/sandbox-seccomp-filter.c ++++ b/sandbox-seccomp-filter.c +@@ -267,6 +267,9 @@ static const struct sock_filter preauth_insns[] = { + #ifdef __NR_pselect6 + SC_ALLOW(__NR_pselect6), + #endif ++#ifdef __NR_pselect6_time64 ++ SC_ALLOW(__NR_pselect6_time64), ++#endif + #ifdef __NR_read + SC_ALLOW(__NR_read), + #endif diff --git a/debian/patches/scp-quoting.patch b/debian/patches/scp-quoting.patch new file mode 100644 index 0000000..604e831 --- /dev/null +++ b/debian/patches/scp-quoting.patch @@ -0,0 +1,41 @@ +From 94f06f8888f2e11267120eeebdb931d95bbfb7fd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nicolas=20Valc=C3=A1rcel?= +Date: Sun, 9 Feb 2014 16:09:59 +0000 +Subject: Adjust scp quoting in verbose mode + +Tweak scp's reporting of filenames in verbose mode to be a bit less +confusing with spaces. + +This should be revised to mimic real shell quoting. + +Bug-Ubuntu: https://bugs.launchpad.net/bugs/89945 +Last-Update: 2010-02-27 + +Patch-Name: scp-quoting.patch +--- + scp.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/scp.c b/scp.c +index 6ae17061d..2d1b8e9b9 100644 +--- a/scp.c ++++ b/scp.c +@@ -201,8 +201,16 @@ do_local_cmd(arglist *a) + + if (verbose_mode) { + fprintf(stderr, "Executing:"); +- for (i = 0; i < a->num; i++) +- fmprintf(stderr, " %s", a->list[i]); ++ for (i = 0; i < a->num; i++) { ++ if (i == 0) ++ fmprintf(stderr, " %s", a->list[i]); ++ else ++ /* ++ * TODO: misbehaves if a->list[i] contains a ++ * single quote ++ */ ++ fmprintf(stderr, " '%s'", a->list[i]); ++ } + fprintf(stderr, "\n"); + } + if ((pid = fork()) == -1) diff --git a/debian/patches/selinux-role.patch b/debian/patches/selinux-role.patch new file mode 100644 index 0000000..3161999 --- /dev/null +++ b/debian/patches/selinux-role.patch @@ -0,0 +1,472 @@ +From c574865182e2c5dfa183b577f49ac602d16df5c0 Mon Sep 17 00:00:00 2001 +From: Manoj Srivastava +Date: Sun, 9 Feb 2014 16:09:49 +0000 +Subject: Handle SELinux authorisation roles + +Rejected upstream due to discomfort with magic usernames; a better approach +will need an SSH protocol change. In the meantime, this came from Debian's +SELinux maintainer, so we'll keep it until we have something better. + +Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1641 +Bug-Debian: http://bugs.debian.org/394795 +Last-Update: 2020-10-18 + +Patch-Name: selinux-role.patch +--- + auth.h | 1 + + auth2.c | 10 ++++++++-- + monitor.c | 37 +++++++++++++++++++++++++++++++++---- + monitor.h | 2 ++ + monitor_wrap.c | 27 ++++++++++++++++++++++++--- + monitor_wrap.h | 3 ++- + openbsd-compat/port-linux.c | 21 ++++++++++++++------- + openbsd-compat/port-linux.h | 4 ++-- + platform.c | 4 ++-- + platform.h | 2 +- + session.c | 10 +++++----- + session.h | 2 +- + sshd.c | 2 +- + sshpty.c | 4 ++-- + sshpty.h | 2 +- + 15 files changed, 99 insertions(+), 32 deletions(-) + +diff --git a/auth.h b/auth.h +index becc672b5..5da9fe75f 100644 +--- a/auth.h ++++ b/auth.h +@@ -63,6 +63,7 @@ struct Authctxt { + char *service; + struct passwd *pw; /* set if 'valid' */ + char *style; ++ char *role; + + /* Method lists for multiple authentication */ + char **auth_methods; /* modified from server config */ +diff --git a/auth2.c b/auth2.c +index 9fa1404b3..d8363bdba 100644 +--- a/auth2.c ++++ b/auth2.c +@@ -265,7 +265,7 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh) + { + Authctxt *authctxt = ssh->authctxt; + Authmethod *m = NULL; +- char *user = NULL, *service = NULL, *method = NULL, *style = NULL; ++ char *user = NULL, *service = NULL, *method = NULL, *style = NULL, *role = NULL; + int r, authenticated = 0; + double tstart = monotime_double(); + +@@ -279,8 +279,13 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh) + debug("userauth-request for user %s service %s method %s", user, service, method); + debug("attempt %d failures %d", authctxt->attempt, authctxt->failures); + ++ if ((role = strchr(user, '/')) != NULL) ++ *role++ = 0; ++ + if ((style = strchr(user, ':')) != NULL) + *style++ = 0; ++ else if (role && (style = strchr(role, ':')) != NULL) ++ *style++ = '\0'; + + if (authctxt->attempt++ == 0) { + /* setup auth context */ +@@ -307,8 +312,9 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh) + use_privsep ? " [net]" : ""); + authctxt->service = xstrdup(service); + authctxt->style = style ? xstrdup(style) : NULL; ++ authctxt->role = role ? xstrdup(role) : NULL; + if (use_privsep) +- mm_inform_authserv(service, style); ++ mm_inform_authserv(service, style, role); + userauth_banner(ssh); + if (auth2_setup_methods_lists(authctxt) != 0) + ssh_packet_disconnect(ssh, +diff --git a/monitor.c b/monitor.c +index 11868952b..98362948f 100644 +--- a/monitor.c ++++ b/monitor.c +@@ -118,6 +118,7 @@ int mm_answer_sign(struct ssh *, int, struct sshbuf *); + int mm_answer_pwnamallow(struct ssh *, int, struct sshbuf *); + int mm_answer_auth2_read_banner(struct ssh *, int, struct sshbuf *); + int mm_answer_authserv(struct ssh *, int, struct sshbuf *); ++int mm_answer_authrole(struct ssh *, int, struct sshbuf *); + int mm_answer_authpassword(struct ssh *, int, struct sshbuf *); + int mm_answer_bsdauthquery(struct ssh *, int, struct sshbuf *); + int mm_answer_bsdauthrespond(struct ssh *, int, struct sshbuf *); +@@ -198,6 +199,7 @@ struct mon_table mon_dispatch_proto20[] = { + {MONITOR_REQ_SIGN, MON_ONCE, mm_answer_sign}, + {MONITOR_REQ_PWNAM, MON_ONCE, mm_answer_pwnamallow}, + {MONITOR_REQ_AUTHSERV, MON_ONCE, mm_answer_authserv}, ++ {MONITOR_REQ_AUTHROLE, MON_ONCE, mm_answer_authrole}, + {MONITOR_REQ_AUTH2_READ_BANNER, MON_ONCE, mm_answer_auth2_read_banner}, + {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword}, + #ifdef USE_PAM +@@ -820,6 +822,7 @@ mm_answer_pwnamallow(struct ssh *ssh, int sock, struct sshbuf *m) + + /* Allow service/style information on the auth context */ + monitor_permit(mon_dispatch, MONITOR_REQ_AUTHSERV, 1); ++ monitor_permit(mon_dispatch, MONITOR_REQ_AUTHROLE, 1); + monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1); + + #ifdef USE_PAM +@@ -853,16 +856,42 @@ mm_answer_authserv(struct ssh *ssh, int sock, struct sshbuf *m) + monitor_permit_authentications(1); + + if ((r = sshbuf_get_cstring(m, &authctxt->service, NULL)) != 0 || +- (r = sshbuf_get_cstring(m, &authctxt->style, NULL)) != 0) ++ (r = sshbuf_get_cstring(m, &authctxt->style, NULL)) != 0 || ++ (r = sshbuf_get_cstring(m, &authctxt->role, NULL)) != 0) + fatal("%s: buffer error: %s", __func__, ssh_err(r)); +- debug3("%s: service=%s, style=%s", +- __func__, authctxt->service, authctxt->style); ++ debug3("%s: service=%s, style=%s, role=%s", ++ __func__, authctxt->service, authctxt->style, authctxt->role); + + if (strlen(authctxt->style) == 0) { + free(authctxt->style); + authctxt->style = NULL; + } + ++ if (strlen(authctxt->role) == 0) { ++ free(authctxt->role); ++ authctxt->role = NULL; ++ } ++ ++ return (0); ++} ++ ++int ++mm_answer_authrole(struct ssh *ssh, int sock, struct sshbuf *m) ++{ ++ int r; ++ ++ monitor_permit_authentications(1); ++ ++ if ((r = sshbuf_get_cstring(m, &authctxt->role, NULL)) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ debug3("%s: role=%s", ++ __func__, authctxt->role); ++ ++ if (strlen(authctxt->role) == 0) { ++ free(authctxt->role); ++ authctxt->role = NULL; ++ } ++ + return (0); + } + +@@ -1566,7 +1595,7 @@ mm_answer_pty(struct ssh *ssh, int sock, struct sshbuf *m) + res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); + if (res == 0) + goto error; +- pty_setowner(authctxt->pw, s->tty); ++ pty_setowner(authctxt->pw, s->tty, authctxt->role); + + if ((r = sshbuf_put_u32(m, 1)) != 0 || + (r = sshbuf_put_cstring(m, s->tty)) != 0) +diff --git a/monitor.h b/monitor.h +index 2b1a2d590..4d87284aa 100644 +--- a/monitor.h ++++ b/monitor.h +@@ -65,6 +65,8 @@ enum monitor_reqtype { + + MONITOR_REQ_GSSSIGN = 150, MONITOR_ANS_GSSSIGN = 151, + MONITOR_REQ_GSSUPCREDS = 152, MONITOR_ANS_GSSUPCREDS = 153, ++ ++ MONITOR_REQ_AUTHROLE = 154, + }; + + struct ssh; +diff --git a/monitor_wrap.c b/monitor_wrap.c +index 0e78cd006..d41d3949d 100644 +--- a/monitor_wrap.c ++++ b/monitor_wrap.c +@@ -364,10 +364,10 @@ mm_auth2_read_banner(void) + return (banner); + } + +-/* Inform the privileged process about service and style */ ++/* Inform the privileged process about service, style, and role */ + + void +-mm_inform_authserv(char *service, char *style) ++mm_inform_authserv(char *service, char *style, char *role) + { + struct sshbuf *m; + int r; +@@ -377,7 +377,8 @@ mm_inform_authserv(char *service, char *style) + if ((m = sshbuf_new()) == NULL) + fatal("%s: sshbuf_new failed", __func__); + if ((r = sshbuf_put_cstring(m, service)) != 0 || +- (r = sshbuf_put_cstring(m, style ? style : "")) != 0) ++ (r = sshbuf_put_cstring(m, style ? style : "")) != 0 || ++ (r = sshbuf_put_cstring(m, role ? role : "")) != 0) + fatal("%s: buffer error: %s", __func__, ssh_err(r)); + + mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, m); +@@ -385,6 +386,26 @@ mm_inform_authserv(char *service, char *style) + sshbuf_free(m); + } + ++/* Inform the privileged process about role */ ++ ++void ++mm_inform_authrole(char *role) ++{ ++ struct sshbuf *m; ++ int r; ++ ++ debug3("%s entering", __func__); ++ ++ if ((m = sshbuf_new()) == NULL) ++ fatal("%s: sshbuf_new failed", __func__); ++ if ((r = sshbuf_put_cstring(m, role ? role : "")) != 0) ++ fatal("%s: buffer error: %s", __func__, ssh_err(r)); ++ ++ mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHROLE, m); ++ ++ sshbuf_free(m); ++} ++ + /* Do the password authentication */ + int + mm_auth_password(struct ssh *ssh, char *password) +diff --git a/monitor_wrap.h b/monitor_wrap.h +index 75aef1c74..c39e5dd8b 100644 +--- a/monitor_wrap.h ++++ b/monitor_wrap.h +@@ -48,7 +48,8 @@ DH *mm_choose_dh(int, int, int); + int mm_sshkey_sign(struct ssh *, struct sshkey *, u_char **, size_t *, + const u_char *, size_t, const char *, const char *, + const char *, u_int compat); +-void mm_inform_authserv(char *, char *); ++void mm_inform_authserv(char *, char *, char *); ++void mm_inform_authrole(char *); + struct passwd *mm_getpwnamallow(struct ssh *, const char *); + char *mm_auth2_read_banner(void); + int mm_auth_password(struct ssh *, char *); +diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c +index f46094faf..56f1d2c1e 100644 +--- a/openbsd-compat/port-linux.c ++++ b/openbsd-compat/port-linux.c +@@ -56,7 +56,7 @@ ssh_selinux_enabled(void) + + /* Return the default security context for the given username */ + static security_context_t +-ssh_selinux_getctxbyname(char *pwname) ++ssh_selinux_getctxbyname(char *pwname, const char *role) + { + security_context_t sc = NULL; + char *sename = NULL, *lvl = NULL; +@@ -71,9 +71,16 @@ ssh_selinux_getctxbyname(char *pwname) + #endif + + #ifdef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL +- r = get_default_context_with_level(sename, lvl, NULL, &sc); ++ if (role != NULL && role[0]) ++ r = get_default_context_with_rolelevel(sename, role, lvl, NULL, ++ &sc); ++ else ++ r = get_default_context_with_level(sename, lvl, NULL, &sc); + #else +- r = get_default_context(sename, NULL, &sc); ++ if (role != NULL && role[0]) ++ r = get_default_context_with_role(sename, role, NULL, &sc); ++ else ++ r = get_default_context(sename, NULL, &sc); + #endif + + if (r != 0) { +@@ -103,7 +110,7 @@ ssh_selinux_getctxbyname(char *pwname) + + /* Set the execution context to the default for the specified user */ + void +-ssh_selinux_setup_exec_context(char *pwname) ++ssh_selinux_setup_exec_context(char *pwname, const char *role) + { + security_context_t user_ctx = NULL; + +@@ -112,7 +119,7 @@ ssh_selinux_setup_exec_context(char *pwname) + + debug3("%s: setting execution context", __func__); + +- user_ctx = ssh_selinux_getctxbyname(pwname); ++ user_ctx = ssh_selinux_getctxbyname(pwname, role); + if (setexeccon(user_ctx) != 0) { + switch (security_getenforce()) { + case -1: +@@ -134,7 +141,7 @@ ssh_selinux_setup_exec_context(char *pwname) + + /* Set the TTY context for the specified user */ + void +-ssh_selinux_setup_pty(char *pwname, const char *tty) ++ssh_selinux_setup_pty(char *pwname, const char *tty, const char *role) + { + security_context_t new_tty_ctx = NULL; + security_context_t user_ctx = NULL; +@@ -146,7 +153,7 @@ ssh_selinux_setup_pty(char *pwname, const char *tty) + + debug3("%s: setting TTY context on %s", __func__, tty); + +- user_ctx = ssh_selinux_getctxbyname(pwname); ++ user_ctx = ssh_selinux_getctxbyname(pwname, role); + + /* XXX: should these calls fatal() upon failure in enforcing mode? */ + +diff --git a/openbsd-compat/port-linux.h b/openbsd-compat/port-linux.h +index 3c22a854d..c88129428 100644 +--- a/openbsd-compat/port-linux.h ++++ b/openbsd-compat/port-linux.h +@@ -19,8 +19,8 @@ + + #ifdef WITH_SELINUX + int ssh_selinux_enabled(void); +-void ssh_selinux_setup_pty(char *, const char *); +-void ssh_selinux_setup_exec_context(char *); ++void ssh_selinux_setup_pty(char *, const char *, const char *); ++void ssh_selinux_setup_exec_context(char *, const char *); + void ssh_selinux_change_context(const char *); + void ssh_selinux_setfscreatecon(const char *); + #endif +diff --git a/platform.c b/platform.c +index 44ba71dc5..2defe9425 100644 +--- a/platform.c ++++ b/platform.c +@@ -143,7 +143,7 @@ platform_setusercontext(struct passwd *pw) + * called if sshd is running as root. + */ + void +-platform_setusercontext_post_groups(struct passwd *pw) ++platform_setusercontext_post_groups(struct passwd *pw, const char *role) + { + #if !defined(HAVE_LOGIN_CAP) && defined(USE_PAM) + /* +@@ -184,7 +184,7 @@ platform_setusercontext_post_groups(struct passwd *pw) + } + #endif /* HAVE_SETPCRED */ + #ifdef WITH_SELINUX +- ssh_selinux_setup_exec_context(pw->pw_name); ++ ssh_selinux_setup_exec_context(pw->pw_name, role); + #endif + } + +diff --git a/platform.h b/platform.h +index ea4f9c584..60d72ffe7 100644 +--- a/platform.h ++++ b/platform.h +@@ -25,7 +25,7 @@ void platform_post_fork_parent(pid_t child_pid); + void platform_post_fork_child(void); + int platform_privileged_uidswap(void); + void platform_setusercontext(struct passwd *); +-void platform_setusercontext_post_groups(struct passwd *); ++void platform_setusercontext_post_groups(struct passwd *, const char *); + char *platform_get_krb5_client(const char *); + char *platform_krb5_get_principal_name(const char *); + int platform_sys_dir_uid(uid_t); +diff --git a/session.c b/session.c +index 857f17b3c..b1796a803 100644 +--- a/session.c ++++ b/session.c +@@ -1364,7 +1364,7 @@ safely_chroot(const char *path, uid_t uid) + + /* Set login name, uid, gid, and groups. */ + void +-do_setusercontext(struct passwd *pw) ++do_setusercontext(struct passwd *pw, const char *role) + { + char uidstr[32], *chroot_path, *tmp; + +@@ -1392,7 +1392,7 @@ do_setusercontext(struct passwd *pw) + endgrent(); + #endif + +- platform_setusercontext_post_groups(pw); ++ platform_setusercontext_post_groups(pw, role); + + if (!in_chroot && options.chroot_directory != NULL && + strcasecmp(options.chroot_directory, "none") != 0) { +@@ -1536,7 +1536,7 @@ do_child(struct ssh *ssh, Session *s, const char *command) + + /* Force a password change */ + if (s->authctxt->force_pwchange) { +- do_setusercontext(pw); ++ do_setusercontext(pw, s->authctxt->role); + child_close_fds(ssh); + do_pwchange(s); + exit(1); +@@ -1554,7 +1554,7 @@ do_child(struct ssh *ssh, Session *s, const char *command) + /* When PAM is enabled we rely on it to do the nologin check */ + if (!options.use_pam) + do_nologin(pw); +- do_setusercontext(pw); ++ do_setusercontext(pw, s->authctxt->role); + /* + * PAM session modules in do_setusercontext may have + * generated messages, so if this in an interactive +@@ -1953,7 +1953,7 @@ session_pty_req(struct ssh *ssh, Session *s) + sshpkt_fatal(ssh, r, "%s: parse packet", __func__); + + if (!use_privsep) +- pty_setowner(s->pw, s->tty); ++ pty_setowner(s->pw, s->tty, s->authctxt->role); + + /* Set window size from the packet. */ + pty_change_window_size(s->ptyfd, s->row, s->col, s->xpixel, s->ypixel); +diff --git a/session.h b/session.h +index ce59dabd9..675c91146 100644 +--- a/session.h ++++ b/session.h +@@ -77,7 +77,7 @@ void session_pty_cleanup2(Session *); + Session *session_new(void); + Session *session_by_tty(char *); + void session_close(struct ssh *, Session *); +-void do_setusercontext(struct passwd *); ++void do_setusercontext(struct passwd *, const char *); + + const char *session_get_remote_name_or_ip(struct ssh *, u_int, int); + +diff --git a/sshd.c b/sshd.c +index a50ec3584..38d281ab4 100644 +--- a/sshd.c ++++ b/sshd.c +@@ -594,7 +594,7 @@ privsep_postauth(struct ssh *ssh, Authctxt *authctxt) + reseed_prngs(); + + /* Drop privileges */ +- do_setusercontext(authctxt->pw); ++ do_setusercontext(authctxt->pw, authctxt->role); + + skip: + /* It is safe now to apply the key state */ +diff --git a/sshpty.c b/sshpty.c +index bce09e255..308449b37 100644 +--- a/sshpty.c ++++ b/sshpty.c +@@ -162,7 +162,7 @@ pty_change_window_size(int ptyfd, u_int row, u_int col, + } + + void +-pty_setowner(struct passwd *pw, const char *tty) ++pty_setowner(struct passwd *pw, const char *tty, const char *role) + { + struct group *grp; + gid_t gid; +@@ -186,7 +186,7 @@ pty_setowner(struct passwd *pw, const char *tty) + strerror(errno)); + + #ifdef WITH_SELINUX +- ssh_selinux_setup_pty(pw->pw_name, tty); ++ ssh_selinux_setup_pty(pw->pw_name, tty, role); + #endif + + if (st.st_uid != pw->pw_uid || st.st_gid != gid) { +diff --git a/sshpty.h b/sshpty.h +index 9ec7e9a15..de7e000ae 100644 +--- a/sshpty.h ++++ b/sshpty.h +@@ -24,5 +24,5 @@ int pty_allocate(int *, int *, char *, size_t); + void pty_release(const char *); + void pty_make_controlling_tty(int *, const char *); + void pty_change_window_size(int, u_int, u_int, u_int, u_int); +-void pty_setowner(struct passwd *, const char *); ++void pty_setowner(struct passwd *, const char *, const char *); + void disconnect_controlling_tty(void); diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..d62e524 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,35 @@ +gssapi.patch +restore-tcp-wrappers.patch +selinux-role.patch +ssh-vulnkey-compat.patch +keepalive-extensions.patch +syslog-level-silent.patch +user-group-modes.patch +scp-quoting.patch +shell-path.patch +dnssec-sshfp.patch +mention-ssh-keygen-on-keychange.patch +package-versioning.patch +debian-banner.patch +authorized-keys-man-symlink.patch +openbsd-docs.patch +ssh-argv0.patch +doc-hash-tab-completion.patch +ssh-agent-setgid.patch +no-openssl-version-status.patch +gnome-ssh-askpass2-icon.patch +systemd-readiness.patch +debian-config.patch +restore-authorized_keys2.patch +conch-old-privkey-format.patch +revert-ipqos-defaults.patch +revert-x32-sandbox-breakage.patch +ssh-copy-id-heredoc-syntax.patch +ssh-agent-double-free.patch +sandbox-pselect6_time64.patch +CVE-2023-38408-1.patch +CVE-2023-38408-2.patch +CVE-2021-41617-1.patch +CVE-2021-41617-2.patch +CVE-2023-48795.patch +CVE-2023-51385.patch diff --git a/debian/patches/shell-path.patch b/debian/patches/shell-path.patch new file mode 100644 index 0000000..503b08d --- /dev/null +++ b/debian/patches/shell-path.patch @@ -0,0 +1,39 @@ +From a7d2f23b7b86f97749856482233cdc9dd970d1d3 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sun, 9 Feb 2014 16:10:00 +0000 +Subject: Look for $SHELL on the path for ProxyCommand/LocalCommand + +There's some debate on the upstream bug about whether POSIX requires this. +I (Colin Watson) agree with Vincent and think it does. + +Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1494 +Bug-Debian: http://bugs.debian.org/492728 +Last-Update: 2020-02-21 + +Patch-Name: shell-path.patch +--- + sshconnect.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sshconnect.c b/sshconnect.c +index 9ec0618a9..5f8c81b84 100644 +--- a/sshconnect.c ++++ b/sshconnect.c +@@ -263,7 +263,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, const char *host_arg, + /* Execute the proxy command. Note that we gave up any + extra privileges above. */ + ssh_signal(SIGPIPE, SIG_DFL); +- execv(argv[0], argv); ++ execvp(argv[0], argv); + perror(argv[0]); + exit(1); + } +@@ -1392,7 +1392,7 @@ ssh_local_cmd(const char *args) + if (pid == 0) { + ssh_signal(SIGPIPE, SIG_DFL); + debug3("Executing %s -c \"%s\"", shell, args); +- execl(shell, shell, "-c", args, (char *)NULL); ++ execlp(shell, shell, "-c", args, (char *)NULL); + error("Couldn't execute %s -c \"%s\": %s", + shell, args, strerror(errno)); + _exit(1); diff --git a/debian/patches/ssh-agent-double-free.patch b/debian/patches/ssh-agent-double-free.patch new file mode 100644 index 0000000..20ae613 --- /dev/null +++ b/debian/patches/ssh-agent-double-free.patch @@ -0,0 +1,26 @@ +From 421db3656dcafbe810226463bf27a18a0b1c3186 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sat, 13 Mar 2021 09:35:05 +0000 +Subject: Double free in ssh-agent(1) + +Origin: upstream, https://ftp.openbsd.org/pub/OpenBSD/patches/6.8/common/015_sshagent.patch.sig +Bug-Debian: https://bugs.debian.org/984940 +Last-Update: 2021-03-13 + +Patch-Name: ssh-agent-double-free.patch +--- + ssh-agent.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ssh-agent.c b/ssh-agent.c +index e1fd1f3f6..48155c96e 100644 +--- a/ssh-agent.c ++++ b/ssh-agent.c +@@ -581,6 +581,7 @@ process_add_identity(SocketEntry *e) + goto err; + } + free(ext_name); ++ ext_name = NULL; + break; + default: + error("%s: Unknown constraint %d", __func__, ctype); diff --git a/debian/patches/ssh-agent-setgid.patch b/debian/patches/ssh-agent-setgid.patch new file mode 100644 index 0000000..5d7a6c0 --- /dev/null +++ b/debian/patches/ssh-agent-setgid.patch @@ -0,0 +1,40 @@ +From 7a305ed4a0cba43d0d1bc6ebf5737521a0854a9d Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sun, 9 Feb 2014 16:10:13 +0000 +Subject: Document consequences of ssh-agent being setgid in ssh-agent(1) + +Bug-Debian: http://bugs.debian.org/711623 +Forwarded: no +Last-Update: 2020-02-21 + +Patch-Name: ssh-agent-setgid.patch +--- + ssh-agent.1 | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/ssh-agent.1 b/ssh-agent.1 +index 2cf46160b..272da79b3 100644 +--- a/ssh-agent.1 ++++ b/ssh-agent.1 +@@ -206,6 +206,21 @@ socket and stores its pathname in this variable. + It is accessible only to the current user, + but is easily abused by root or another instance of the same user. + .El ++.Pp ++In Debian, ++.Nm ++is installed with the set-group-id bit set, to prevent ++.Xr ptrace 2 ++attacks retrieving private key material. ++This has the side-effect of causing the run-time linker to remove certain ++environment variables which might have security implications for set-id ++programs, including ++.Ev LD_PRELOAD , ++.Ev LD_LIBRARY_PATH , ++and ++.Ev TMPDIR . ++If you need to set any of these environment variables, you will need to do ++so in the program executed by ssh-agent. + .Sh FILES + .Bl -tag -width Ds + .It Pa $TMPDIR/ssh-XXXXXXXXXX/agent. diff --git a/debian/patches/ssh-argv0.patch b/debian/patches/ssh-argv0.patch new file mode 100644 index 0000000..12f8c1b --- /dev/null +++ b/debian/patches/ssh-argv0.patch @@ -0,0 +1,31 @@ +From 0e71b467fd84b0972c6aa2762d93af1c3defc0dc Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sun, 9 Feb 2014 16:10:10 +0000 +Subject: ssh(1): Refer to ssh-argv0(1) + +Old versions of OpenSSH (up to 2.5 or thereabouts) allowed creating symlinks +to ssh with the name of the host you want to connect to. Debian ships an +ssh-argv0 script restoring this feature; this patch refers to its manual +page from ssh(1). + +Bug-Debian: http://bugs.debian.org/111341 +Forwarded: not-needed +Last-Update: 2013-09-14 + +Patch-Name: ssh-argv0.patch +--- + ssh.1 | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ssh.1 b/ssh.1 +index 1880c032d..76ddd89b5 100644 +--- a/ssh.1 ++++ b/ssh.1 +@@ -1632,6 +1632,7 @@ if an error occurred. + .Xr sftp 1 , + .Xr ssh-add 1 , + .Xr ssh-agent 1 , ++.Xr ssh-argv0 1 , + .Xr ssh-keygen 1 , + .Xr ssh-keyscan 1 , + .Xr tun 4 , diff --git a/debian/patches/ssh-copy-id-heredoc-syntax.patch b/debian/patches/ssh-copy-id-heredoc-syntax.patch new file mode 100644 index 0000000..e025967 --- /dev/null +++ b/debian/patches/ssh-copy-id-heredoc-syntax.patch @@ -0,0 +1,37 @@ +From 27cf2f667b46a99f4469f41bcb8e004834a3d34f Mon Sep 17 00:00:00 2001 +From: Oleg +Date: Thu, 1 Oct 2020 12:09:08 +0300 +Subject: Fix `EOF: command not found` error in ssh-copy-id + +Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=d9e727dcc04a52caaac87543ea1d230e9e6b5604 +Bug: https://github.com/openssh/openssh-portable/pull/206 +Bug-Debian: https://bugs.debian.org/975540 +Bug-Debian: https://bugs.debian.org/976242 +Last-Update: 2020-12-02 + +Patch-Name: ssh-copy-id-heredoc-syntax.patch +--- + contrib/ssh-copy-id | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id +index 392f64f94..a76907717 100644 +--- a/contrib/ssh-copy-id ++++ b/contrib/ssh-copy-id +@@ -247,7 +247,7 @@ installkeys_sh() { + # the -z `tail ...` checks for a trailing newline. The echo adds one if was missing + # the cat adds the keys we're getting via STDIN + # and if available restorecon is used to restore the SELinux context +- INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF) ++ INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF + cd; + umask 077; + mkdir -p $(dirname "${AUTH_KEY_FILE}") && +@@ -258,6 +258,7 @@ installkeys_sh() { + restorecon -F .ssh ${AUTH_KEY_FILE}; + fi + EOF ++ ) + + # to defend against quirky remote shells: use 'exec sh -c' to get POSIX; + printf "exec sh -c '%s'" "${INSTALLKEYS_SH}" diff --git a/debian/patches/ssh-vulnkey-compat.patch b/debian/patches/ssh-vulnkey-compat.patch new file mode 100644 index 0000000..f4bedfd --- /dev/null +++ b/debian/patches/ssh-vulnkey-compat.patch @@ -0,0 +1,42 @@ +From 61b4d4c07d19cd0816ab5d48da81a75f7adbdf24 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sun, 9 Feb 2014 16:09:50 +0000 +Subject: Accept obsolete ssh-vulnkey configuration options + +These options were used as part of Debian's response to CVE-2008-0166. +Nearly six years later, we no longer need to continue carrying the bulk +of that patch, but we do need to avoid failing when the associated +configuration options are still present. + +Last-Update: 2014-02-09 + +Patch-Name: ssh-vulnkey-compat.patch +--- + readconf.c | 1 + + servconf.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/readconf.c b/readconf.c +index 57dae55d1..b069333fa 100644 +--- a/readconf.c ++++ b/readconf.c +@@ -191,6 +191,7 @@ static struct { + { "fallbacktorsh", oDeprecated }, + { "globalknownhostsfile2", oDeprecated }, + { "rhostsauthentication", oDeprecated }, ++ { "useblacklistedkeys", oDeprecated }, + { "userknownhostsfile2", oDeprecated }, + { "useroaming", oDeprecated }, + { "usersh", oDeprecated }, +diff --git a/servconf.c b/servconf.c +index ded8f4a87..21abe41ac 100644 +--- a/servconf.c ++++ b/servconf.c +@@ -649,6 +649,7 @@ static struct { + { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL }, + { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL }, + { "strictmodes", sStrictModes, SSHCFG_GLOBAL }, ++ { "permitblacklistedkeys", sDeprecated, SSHCFG_GLOBAL }, + { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL }, + { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL }, + { "uselogin", sDeprecated, SSHCFG_GLOBAL }, diff --git a/debian/patches/syslog-level-silent.patch b/debian/patches/syslog-level-silent.patch new file mode 100644 index 0000000..d6215de --- /dev/null +++ b/debian/patches/syslog-level-silent.patch @@ -0,0 +1,47 @@ +From 33a5f7aadea15899586710c615408045eaaecebd Mon Sep 17 00:00:00 2001 +From: Natalie Amery +Date: Sun, 9 Feb 2014 16:09:54 +0000 +Subject: "LogLevel SILENT" compatibility + +"LogLevel SILENT" (-qq) was introduced in Debian openssh 1:3.0.1p1-1 to +match the behaviour of non-free SSH, in which -q does not suppress fatal +errors. However, this was unintentionally broken in 1:4.6p1-2 and nobody +complained, so we've dropped most of it. The parts that remain are basic +configuration file compatibility, and an adjustment to "Pseudo-terminal will +not be allocated ..." which should be split out into a separate patch. + +Author: Matthew Vernon +Author: Colin Watson +Last-Update: 2013-09-14 + +Patch-Name: syslog-level-silent.patch +--- + log.c | 1 + + ssh.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/log.c b/log.c +index 6b1a7a314..5ebae1480 100644 +--- a/log.c ++++ b/log.c +@@ -93,6 +93,7 @@ static struct { + LogLevel val; + } log_levels[] = + { ++ { "SILENT", SYSLOG_LEVEL_QUIET }, /* compatibility */ + { "QUIET", SYSLOG_LEVEL_QUIET }, + { "FATAL", SYSLOG_LEVEL_FATAL }, + { "ERROR", SYSLOG_LEVEL_ERROR }, +diff --git a/ssh.c b/ssh.c +index bb98a7e2d..aa15b8a1f 100644 +--- a/ssh.c ++++ b/ssh.c +@@ -1373,7 +1373,7 @@ main(int ac, char **av) + /* Do not allocate a tty if stdin is not a tty. */ + if ((!isatty(fileno(stdin)) || stdin_null_flag) && + options.request_tty != REQUEST_TTY_FORCE) { +- if (tty_flag) ++ if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) + logit("Pseudo-terminal will not be allocated because " + "stdin is not a terminal."); + tty_flag = 0; diff --git a/debian/patches/systemd-readiness.patch b/debian/patches/systemd-readiness.patch new file mode 100644 index 0000000..37e98c1 --- /dev/null +++ b/debian/patches/systemd-readiness.patch @@ -0,0 +1,84 @@ +From e8453621b2a26f8d6afec405ff60201749b01e5e Mon Sep 17 00:00:00 2001 +From: Michael Biebl +Date: Mon, 21 Dec 2015 16:08:47 +0000 +Subject: Add systemd readiness notification support + +Bug-Debian: https://bugs.debian.org/778913 +Forwarded: no +Last-Update: 2017-08-22 + +Patch-Name: systemd-readiness.patch +--- + configure.ac | 24 ++++++++++++++++++++++++ + sshd.c | 9 +++++++++ + 2 files changed, 33 insertions(+) + +diff --git a/configure.ac b/configure.ac +index bb435ec1f..5944299fa 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4785,6 +4785,29 @@ AC_ARG_WITH([kerberos5], + AC_SUBST([GSSLIBS]) + AC_SUBST([K5LIBS]) + ++# Check whether user wants systemd support ++SYSTEMD_MSG="no" ++AC_ARG_WITH(systemd, ++ [ --with-systemd Enable systemd support], ++ [ if test "x$withval" != "xno" ; then ++ AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no]) ++ if test "$PKGCONFIG" != "no"; then ++ AC_MSG_CHECKING([for libsystemd]) ++ if $PKGCONFIG --exists libsystemd; then ++ SYSTEMD_CFLAGS=`$PKGCONFIG --cflags libsystemd` ++ SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd` ++ CPPFLAGS="$CPPFLAGS $SYSTEMD_CFLAGS" ++ SSHDLIBS="$SSHDLIBS $SYSTEMD_LIBS" ++ AC_MSG_RESULT([yes]) ++ AC_DEFINE(HAVE_SYSTEMD, 1, [Define if you want systemd support.]) ++ SYSTEMD_MSG="yes" ++ else ++ AC_MSG_RESULT([no]) ++ fi ++ fi ++ fi ] ++) ++ + # Looking for programs, paths and files + + PRIVSEP_PATH=/var/empty +@@ -5599,6 +5622,7 @@ echo " libldns support: $LDNS_MSG" + echo " Solaris process contract support: $SPC_MSG" + echo " Solaris project support: $SP_MSG" + echo " Solaris privilege support: $SPP_MSG" ++echo " systemd support: $SYSTEMD_MSG" + echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" + echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" + echo " BSD Auth support: $BSD_AUTH_MSG" +diff --git a/sshd.c b/sshd.c +index 50f2726bf..fb9b7b7fb 100644 +--- a/sshd.c ++++ b/sshd.c +@@ -85,6 +85,10 @@ + #include + #endif + ++#ifdef HAVE_SYSTEMD ++#include ++#endif ++ + #include "xmalloc.h" + #include "ssh.h" + #include "ssh2.h" +@@ -2076,6 +2080,11 @@ main(int ac, char **av) + } + } + ++#ifdef HAVE_SYSTEMD ++ /* Signal systemd that we are ready to accept connections */ ++ sd_notify(0, "READY=1"); ++#endif ++ + /* Accept a connection and return in a forked child */ + server_accept_loop(&sock_in, &sock_out, + &newsock, config_s); diff --git a/debian/patches/user-group-modes.patch b/debian/patches/user-group-modes.patch new file mode 100644 index 0000000..8f5a8a3 --- /dev/null +++ b/debian/patches/user-group-modes.patch @@ -0,0 +1,210 @@ +From d08cd2b0cfbedf3ccd2ec3adaef850b8d9a87e85 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Sun, 9 Feb 2014 16:09:58 +0000 +Subject: Allow harmless group-writability + +Allow secure files (~/.ssh/config, ~/.ssh/authorized_keys, etc.) to be +group-writable, provided that the group in question contains only the file's +owner. Rejected upstream for IMO incorrect reasons (e.g. a misunderstanding +about the contents of gr->gr_mem). Given that per-user groups and umask 002 +are the default setup in Debian (for good reasons - this makes operating in +setgid directories with other groups much easier), we need to permit this by +default. + +Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1060 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314347 +Last-Update: 2019-10-09 + +Patch-Name: user-group-modes.patch +--- + auth-rhosts.c | 6 ++---- + auth.c | 3 +-- + misc.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++----- + misc.h | 2 ++ + readconf.c | 3 +-- + ssh.1 | 2 ++ + ssh_config.5 | 2 ++ + 7 files changed, 63 insertions(+), 13 deletions(-) + +diff --git a/auth-rhosts.c b/auth-rhosts.c +index e81321b49..3bcc73766 100644 +--- a/auth-rhosts.c ++++ b/auth-rhosts.c +@@ -260,8 +260,7 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, + return 0; + } + if (options.strict_modes && +- ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || +- (st.st_mode & 022) != 0)) { ++ !secure_permissions(&st, pw->pw_uid)) { + logit("Rhosts authentication refused for %.100s: " + "bad ownership or modes for home directory.", pw->pw_name); + auth_debug_add("Rhosts authentication refused for %.100s: " +@@ -287,8 +286,7 @@ auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, + * allowing access to their account by anyone. + */ + if (options.strict_modes && +- ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || +- (st.st_mode & 022) != 0)) { ++ !secure_permissions(&st, pw->pw_uid)) { + logit("Rhosts authentication refused for %.100s: bad modes for %.200s", + pw->pw_name, buf); + auth_debug_add("Bad file modes for %.200s", buf); +diff --git a/auth.c b/auth.c +index 3d31ec860..4152d9c44 100644 +--- a/auth.c ++++ b/auth.c +@@ -474,8 +474,7 @@ check_key_in_hostfiles(struct passwd *pw, struct sshkey *key, const char *host, + user_hostfile = tilde_expand_filename(userfile, pw->pw_uid); + if (options.strict_modes && + (stat(user_hostfile, &st) == 0) && +- ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || +- (st.st_mode & 022) != 0)) { ++ !secure_permissions(&st, pw->pw_uid)) { + logit("Authentication refused for %.100s: " + "bad owner or modes for %.200s", + pw->pw_name, user_hostfile); +diff --git a/misc.c b/misc.c +index 4623b5755..c75a795c2 100644 +--- a/misc.c ++++ b/misc.c +@@ -55,8 +55,9 @@ + #include + #ifdef HAVE_PATHS_H + # include +-#include + #endif ++#include ++#include + #ifdef SSH_TUN_OPENBSD + #include + #endif +@@ -1271,6 +1272,55 @@ percent_dollar_expand(const char *string, ...) + return ret; + } + ++int ++secure_permissions(struct stat *st, uid_t uid) ++{ ++ if (!platform_sys_dir_uid(st->st_uid) && st->st_uid != uid) ++ return 0; ++ if ((st->st_mode & 002) != 0) ++ return 0; ++ if ((st->st_mode & 020) != 0) { ++ /* If the file is group-writable, the group in question must ++ * have exactly one member, namely the file's owner. ++ * (Zero-member groups are typically used by setgid ++ * binaries, and are unlikely to be suitable.) ++ */ ++ struct passwd *pw; ++ struct group *gr; ++ int members = 0; ++ ++ gr = getgrgid(st->st_gid); ++ if (!gr) ++ return 0; ++ ++ /* Check primary group memberships. */ ++ while ((pw = getpwent()) != NULL) { ++ if (pw->pw_gid == gr->gr_gid) { ++ ++members; ++ if (pw->pw_uid != uid) ++ return 0; ++ } ++ } ++ endpwent(); ++ ++ pw = getpwuid(st->st_uid); ++ if (!pw) ++ return 0; ++ ++ /* Check supplementary group memberships. */ ++ if (gr->gr_mem[0]) { ++ ++members; ++ if (strcmp(pw->pw_name, gr->gr_mem[0]) || ++ gr->gr_mem[1]) ++ return 0; ++ } ++ ++ if (!members) ++ return 0; ++ } ++ return 1; ++} ++ + int + tun_open(int tun, int mode, char **ifname) + { +@@ -2056,8 +2106,7 @@ safe_path(const char *name, struct stat *stp, const char *pw_dir, + snprintf(err, errlen, "%s is not a regular file", buf); + return -1; + } +- if ((!platform_sys_dir_uid(stp->st_uid) && stp->st_uid != uid) || +- (stp->st_mode & 022) != 0) { ++ if (!secure_permissions(stp, uid)) { + snprintf(err, errlen, "bad ownership or modes for file %s", + buf); + return -1; +@@ -2072,8 +2121,7 @@ safe_path(const char *name, struct stat *stp, const char *pw_dir, + strlcpy(buf, cp, sizeof(buf)); + + if (stat(buf, &st) == -1 || +- (!platform_sys_dir_uid(st.st_uid) && st.st_uid != uid) || +- (st.st_mode & 022) != 0) { ++ !secure_permissions(&st, uid)) { + snprintf(err, errlen, + "bad ownership or modes for directory %s", buf); + return -1; +diff --git a/misc.h b/misc.h +index ab94a79c0..b34c798e7 100644 +--- a/misc.h ++++ b/misc.h +@@ -192,6 +192,8 @@ struct notifier_ctx *notify_start(int, const char *, ...) + __attribute__((format(printf, 2, 3))); + void notify_complete(struct notifier_ctx *); + ++int secure_permissions(struct stat *st, uid_t uid); ++ + #define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) + #define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) + #define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) +diff --git a/readconf.c b/readconf.c +index 3d0a812b3..f4f273c96 100644 +--- a/readconf.c ++++ b/readconf.c +@@ -1967,8 +1967,7 @@ read_config_file_depth(const char *filename, struct passwd *pw, + + if (fstat(fileno(f), &sb) == -1) + fatal("fstat %s: %s", filename, strerror(errno)); +- if (((sb.st_uid != 0 && sb.st_uid != getuid()) || +- (sb.st_mode & 022) != 0)) ++ if (!secure_permissions(&sb, getuid())) + fatal("Bad owner or permissions on %s", filename); + } + +diff --git a/ssh.1 b/ssh.1 +index be8e964f0..5d613076c 100644 +--- a/ssh.1 ++++ b/ssh.1 +@@ -1528,6 +1528,8 @@ The file format and configuration options are described in + .Xr ssh_config 5 . + Because of the potential for abuse, this file must have strict permissions: + read/write for the user, and not writable by others. ++It may be group-writable provided that the group in question contains only ++the user. + .Pp + .It Pa ~/.ssh/environment + Contains additional definitions for environment variables; see +diff --git a/ssh_config.5 b/ssh_config.5 +index 3ceb800ba..190e1d927 100644 +--- a/ssh_config.5 ++++ b/ssh_config.5 +@@ -2010,6 +2010,8 @@ The format of this file is described above. + This file is used by the SSH client. + Because of the potential for abuse, this file must have strict permissions: + read/write for the user, and not writable by others. ++It may be group-writable provided that the group in question contains only ++the user. + .It Pa /etc/ssh/ssh_config + Systemwide configuration file. + This file provides defaults for those diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 0000000..c619f34 --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] openssh-server.templates diff --git a/debian/po/cs.po b/debian/po/cs.po new file mode 100644 index 0000000..d01e0ff --- /dev/null +++ b/debian/po/cs.po @@ -0,0 +1,55 @@ +# Czech PO debconf template translation of openssh. +# Copyright (C) 2014 Michal Simunek +# This file is distributed under the same license as the openssh package. +# Michal Simunek , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openssh 1:6.6p1-1\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-06-12 12:25+0200\n" +"Last-Translator: Michal Simunek \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "Zakázat ověřování heslem pro uživatele root?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"Předchozí verze openssh-server dovolovala přihlašovat se přes SSH jako root " +"pomocí ověřování heslem. Výchozí volba pro nové instalace je nyní " +"\"PermitRootLogin prohibit-password\", která zakazuje ověřování heslem pro " +"uživatele root, aniž by to omezilo systémy, které mají explicitně nastaveno " +"ověřování veřejným SSH klíčem pro uživatele root." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Tato změna činí systémy zabezpečenějšími proti útokům hrubou silou na heslo " +"uživatele root pomocí slovníku (velmi častý cíl útoků). Nicméně, to může " +"poškodit systémy, které jsou nastaveny s předpokladem, že bude možné se " +"přihlašovat přes SSH jako root pomocí ověřování heslem. Změnu této volby " +"byste měli provést pouze pokud ověřování heslem potřebujete." diff --git a/debian/po/da.po b/debian/po/da.po new file mode 100644 index 0000000..70d576d --- /dev/null +++ b/debian/po/da.po @@ -0,0 +1,55 @@ +# Danish translation openssh. +# Copyright (C) 2014 openssh og nedenstående oversættere. +# This file is distributed under the same license as the openssh package. +# Joe Hansen , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openssh\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-03-21 23:51+0200\n" +"Last-Translator: Joe Hansen \n" +"Language-Team: Danish \n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "Deaktiver SSH-adgangskodegodkendelse for root?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"Tidligere versioner af openssh-server tillod indlogning som root over SSH " +"med brug af adgangskodegodkendelse. Standarden for nye installationer er nu " +"»PermitRootLogin prohibit-password«, som deaktiverer adgangskodegodkendelse " +"for root uden at ødelægge systemer, som eksplicit har konfigureret SSH-" +"offentlig nøglegodkendelse for root." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Denne ændring gør systemer mere sikre mod brute-force angreb vis ordlister " +"med adgangskoder på root-brugeren (et meget ofte mål for sådanne angreb). " +"Det kan dog ødelægge systemer, som er opsat med forventning om at kunne SSH " +"som root via brug af adgangskodegodkendelse. Du skal kun lave denne ændring, " +"hvis du ikke har brug for dette." diff --git a/debian/po/de.po b/debian/po/de.po new file mode 100644 index 0000000..ecba54b --- /dev/null +++ b/debian/po/de.po @@ -0,0 +1,61 @@ +# openssh. +# Copyright (C) 2014 Colin Watson +# Copyright (C) 2014 Stephan Beck +# This file is distributed under the same license as the openssh package. +# Stephan Beck , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openssh_1:6.6p1-1\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-03-24 22:21+0100\n" +"Last-Translator: Stephan Beck \n" +"Language-Team: Debian German translation team \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "SSH Passwort-Authentifizierung für »root« deaktivieren?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"Vorherige Versionen von openssh-server erlaubten das Anmelden als »root« " +"über SSH unter Verwendung von Passwort-Authentifizierung. Die " +"Standardeinstellung für Neuinstallationen lautet nun »PermitRootLogin " +"prohibit-password«, wodurch die Passwort-Authentifizierung für »root« " +"deaktiviert wird, und Systeme dennoch funktionsfähig bleiben, bei denen " +"ausdrücklich die Authentifizierung als »root« mittels öffentlichem SSH-" +"Schlüssel konfiguriert ist." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Diese Änderung sichert Systeme besser gegen jene Angriffe auf den Benutzer " +"»root« (ein verbreitetes Ziel solcher Angriffe) ab, die das Passwort durch " +"simples Ausprobieren aller Einträge von Wörterbüchern zu erraten versuchen. " +"Sie kann allerdings dazu führen, dass Systeme nicht mehr funktionieren, die " +"in der Absicht konfiguriert wurden, die Anmeldung als »root« über SSH unter " +"Verwendung von Passwort-Authentifizierung zuzulassen. Sie sollten diese " +"Änderung nur vornehmen, wenn Sie auf Letzteres verzichten können." diff --git a/debian/po/es.po b/debian/po/es.po new file mode 100644 index 0000000..de8a67a --- /dev/null +++ b/debian/po/es.po @@ -0,0 +1,80 @@ +# openssh po-debconf translation to Spanish +# Copyright (C) 2014 Software in the Public Interest +# This file is distributed under the same license as the openssh package. +# +# Changes: +# - Initial translation +# Matías A. Bellone , 2014 +# +# Traductores, si no conocen el formato PO, merece la pena leer la +# de gettext, especialmente las secciones dedicadas a este +# formato, por ejemplo ejecutando: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Equipo de traducción al español, por favor, lean antes de traducir +# los siguientes documentos: +# +# - El proyecto de traducción de Debian al español +# http://www.debian.org/intl/spanish/ +# especialmente las notas de traducción en +# http://www.debian.org/intl/spanish/notas +# +# - La guía de traducción de po's de debconf: +# /usr/share/doc/po-debconf/README-trans +# o http://www.debian.org/intl/l10n/po-debconf/README-trans +# +msgid "" +msgstr "" +"Project-Id-Version: openssh\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-03-23 20:43-0300\n" +"Last-Translator: Matías Bellone \n" +"Language-Team: Debian l10n Spanish \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "" +"¿Desea desactivar la autenticación SSH mediante contraseña para el usuario " +"root?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"Las versiones anteriores de openssh-server permitían iniciar sesión como " +"usuario root utilizando autenticación con contraseña. La configuración " +"predeterminada para las nuevas instalaciones ahora incluye «PermitRootLogin " +"prohibit-password», lo que desactiva la autenticación con contraseña para el " +"usuario root sin romper los sistemas que tienen configurado explícitamente " +"la autenticación SSH utilizando claves públicas para el usuario root." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Este cambio hace que los sistemas sean más resistentes contra ataques de " +"fuerza bruta basados en diccionarios sobre el usuario root (un objetivo muy " +"común para este tipo de ataques). Sin embargo, podría romper sistemas cuya " +"configuración permite que el usuario root inicie sesión a través de SSH " +"utilizando una contraseña. Sólo debería realizar este cambio si no necesita " +"este comportamiento." diff --git a/debian/po/fr.po b/debian/po/fr.po new file mode 100644 index 0000000..f7125e9 --- /dev/null +++ b/debian/po/fr.po @@ -0,0 +1,59 @@ +# Translation of openssh debconf template to French +# Copyright (C) 2014 +# This file is distributed under the same license as the openssh package. +# Étienne Gilli , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openssh_1:6.5p1-6\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-03-22 08:26+0100\n" +"Last-Translator: Étienne Gilli \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "" +"Désactiver l’authentification SSH par mot de passe pour le superutilisateur ?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"Les versions précédentes du paquet openssh-server autorisaient la connexion " +"par SSH du superutilisateur (root) en utilisant l’authentification par mot " +"de passe. Par défaut, les nouvelles installations ont maintenant l’option " +"« PermitRootLogin prohibit-password », qui désactive l’authentification par " +"mot de passe pour le compte « root », sans casser les systèmes qui ont " +"configuré explicitement l’authentification SSH par clé publique pour ce " +"compte." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Cette modification rend les systèmes plus robustes face aux attaques par " +"force brute et par dictionnaire contre le superutilisateur (très souvent " +"pris pour cible par ce type d’attaque). Cependant, cela peut rendre " +"inutilisables les systèmes reposant sur la possibilité de se connecter au " +"compte « root » par SSH avec authentification par mot de passe. Vous ne " +"devriez appliquer cette modification que si ce n’est pas votre cas." diff --git a/debian/po/it.po b/debian/po/it.po new file mode 100644 index 0000000..dd71060 --- /dev/null +++ b/debian/po/it.po @@ -0,0 +1,58 @@ +# Italian translation of openssh debconf messages. +# Copyright (C) 2014, openssh package copyright holder +# This file is distributed under the same license as the openssh package. +# Beatrice Torracca , 2014. +msgid "" +msgstr "" +"Project-Id-Version: openssh\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-03-28 11:12+0200\n" +"Last-Translator: Beatrice Torracca \n" +"Language-Team: Italian \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.7.1\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "Disabilitare l'autenticazione SSH con password per root?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"Le versioni precedenti di openssh-server permettevano il login come root via " +"SSH, usando l'autenticazione con password. Il comportamento predefinito " +"delle nuove installazioni è «PermitRootLogin prohibit-password» che " +"disabilita l'autenticazione con password per root, senza rendere non " +"funzionanti sistemi che hanno esplicitamente configurato l'autenticazione " +"SSH con chiave pubblica per root." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Questo cambiamento rende i sistemi più al sicuro da attacchi di forza bruta " +"a dizionario sulle password per l'utente root (un obiettivo molto comune per " +"tali attacchi). Tuttavia, può rendere non funzionanti sistemi che sono " +"impostati facendo affidamento sulla possibilità di autenticazione SSH come " +"root usando la password. Si dovrebbe fare questo cambiamento solo se non si " +"ha bisogno di tale comportamento." diff --git a/debian/po/ja.po b/debian/po/ja.po new file mode 100644 index 0000000..db382f1 --- /dev/null +++ b/debian/po/ja.po @@ -0,0 +1,55 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the openssh package. +# victory , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openssh\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-03-20 11:06+0900\n" +"Last-Translator: victory \n" +"Language-Team: Japanese \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "root での SSH パスワード認証を無効にしますか?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"openssh-server の以前のバージョンではパスワード認証を利用した SSH 経由の " +"root のログインを許可していました。新しくインストールした場合のデフォルト値が" +"現在は「PermitRootLogin prohibit-password」になり、root のパスワード認証を無" +"効化しますが SSH の公開鍵認証を root 用に明示的に設定しているシステムでは特に" +"問題はありません。" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"この変更によりシステムは root ユーザ (こういった攻撃ではとても一般的な攻撃対" +"象です) へのブルートフォースによるパスワード辞書攻撃に対してはより安全になり" +"ます。しかしパスワード認証により root で SSH 接続できることを前提として構成し" +"たシステムでは問題が発生する可能性があります。そういった必要のない場合にのみ" +"この変更を行うようにしてください。" diff --git a/debian/po/nl.po b/debian/po/nl.po new file mode 100644 index 0000000..3afd617 --- /dev/null +++ b/debian/po/nl.po @@ -0,0 +1,60 @@ +# Dutch translation of openssh debconf templates. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the openssh package. +# Frans Spiesschaert , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openssh\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-10-03 23:54+0200\n" +"Last-Translator: Frans Spiesschaert \n" +"Language-Team: Debian Dutch l10n Team \n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "" +"Wachtwoordauthenticatie over SSH voor de systeembeheerder uitschakelen?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"Eerdere versies van de openssh-server lieten de systeembeheerder toe om zich " +"over SSH te authenticeren met een wachtwoord. Voor nieuwe installaties is de " +"standaard nu \"PermitRootLogin prohibit-password\". Deze standaardinstelling " +"maakt het voor de systeembeheerder onmogelijk om zich via een wachtwoord te " +"authenticeren. Deze instelling heeft geen impact op systemen waarbij de SSH-" +"configuratie expliciet vereist dat de systeembeheerder zich authenticeert " +"via een publieke sleutel." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Deze wijziging maakt systemen veiliger tegenover aanvallen met brute kracht " +"(met een wachtwoordenwoordenboek) op de systeembeheerder, een zeer courant " +"doelwit voor zulke aanvallen. Maar het kan systemen onbruikbaar maken die " +"ingesteld werden vanuit de verwachting dat de systeembeheerder SSH kan " +"gebruiken met authenticatie via wachtwoord. Enkel wanneer u dit laatste niet " +"nodig heeft, zou u deze wijziging kunnen doorvoeren." diff --git a/debian/po/pt.po b/debian/po/pt.po new file mode 100644 index 0000000..2dab84c --- /dev/null +++ b/debian/po/pt.po @@ -0,0 +1,59 @@ +# Translation of openssh's debconf messages to European Portuguese +# Copyright (C) 2014 YEAR THE openssh'S COPYRIGHT HOLDER +# This file is distributed under the same license as the openssh package. +# +# Américo Monteiro , 2014. +msgid "" +msgstr "" +"Project-Id-Version: openssh 1:6.6p1-1\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-03-21 21:13+0000\n" +"Last-Translator: Américo Monteiro \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 1.4\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "Desactivar a autenticação SSH por palavra passe para o root?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"As versões anteriores do servidor openssh permitiam iniciar sessão como root " +"sobre SSH usando autenticação por palavra-passe. A predefinição para novas " +"instalações é agora \"PermitRootLogin prohibit-password\", a qual desactiva " +"a autenticação por palavra-passe para o root sem danificar os sistemas que " +"têm configurados explicitamente autenticação SSH por chave pública para o " +"root." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Esta alteração torna os sistemas mais seguros contra ataques em que se " +"forçam dicionários de palavras-passe no utilizador root (um alvo muito comum " +"para tais ataques). No entanto, pode danificar sistemas que estão " +"configurados com a expectativa de serem capazes de SSH como root usando " +"autenticação por palavra-passe. Apenas deverá fazer esta alteração se não " +"precisa de tal método de autenticação." diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po new file mode 100644 index 0000000..99b1182 --- /dev/null +++ b/debian/po/pt_BR.po @@ -0,0 +1,57 @@ +# Debconf translations for openssh. +# Copyright (C) 2014 THE openssh'S COPYRIGHT HOLDER +# This file is distributed under the same license as the openssh package. +# José de Figueiredo , 2014. +# +# +msgid "" +msgstr "" +"Project-Id-Version: openssh\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-11-23 23:49-0200\n" +"Last-Translator: José de Figueiredo \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "Desabilitar autenticação por senha do SSH para root?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"Versões anteriores do openssh-server permitiam login como root sobre SSH " +"usando autenticação por senha. O padrão para as novas instalações agora é " +"\"PermitRootLogin prohibit-password\", que desabilita a autenticação por " +"senha para root sem quebrar sistemas que tenham configurado explicitamente o " +"SSH para autenticação por chave pública para root." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Esta alteração torna sistemas mais seguros contra ataques de força bruta por " +"dicionário de senhas no usuário root (um alvo muito comum destes ataques). " +"Entretanto, ela pode quebrar sistemas que foram configurados com a " +"expectativa de acesso SSH com root usando autenticação por senha. Você deve " +"fazer esta mudança somente se você não precisa fazer isso." diff --git a/debian/po/ru.po b/debian/po/ru.po new file mode 100644 index 0000000..f2e1daf --- /dev/null +++ b/debian/po/ru.po @@ -0,0 +1,57 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the openssh package. +# +# Yuri Kozlov , 2014. +msgid "" +msgstr "" +"Project-Id-Version: openssh 1:6.6p1-1\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-03-22 10:04+0400\n" +"Last-Translator: Yuri Kozlov \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"X-Generator: Lokalize 1.4\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "Выключить в SSH аутентификацию по паролю для root?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"В предыдущих версиях openssh-server разрешён вход с правами пользователя " +"root через SSH с помощью аутентификации по паролю. При новых установках по " +"умолчанию теперь используется настройка «PermitRootLogin prohibit-password», " +"которая отключает аутентификацию по паролю для root, что не вредит системам, " +"у которых в SSH для root настроена аутентификация по открытому ключу." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Это изменение делает системы более стойкими к атакам методом перебора " +"словарных паролей для пользователя root (самая распространённая цель таких " +"атак). Однако, это вредит системам, в которых специально настроен вход для " +"root по SSH с парольной аутентификацией. Если это не ваш случай, то ответьте " +"утвердительно." diff --git a/debian/po/sv.po b/debian/po/sv.po new file mode 100644 index 0000000..278b0cc --- /dev/null +++ b/debian/po/sv.po @@ -0,0 +1,58 @@ +# Swedish translations for openssh package +# Svenska översättningar för paket openssh. +# Copyright (C) 2014 THE openssh'S COPYRIGHT HOLDER +# This file is distributed under the same license as the openssh package. +# Andreas Rönnquist , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openssh\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-03-21 21:36+0100\n" +"Last-Translator: Andreas Rönnquist \n" +"Language-Team: Swedish\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "Inaktivera SSH-lösenordsautentisering för root?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"Tidigare versioner av openssh-server tillät inloggning som root över SSH med " +"hjälp av lösenordsautentisering. Standardinställningen för nya " +"installationer är nu \"PermitRootLogin prohibit-password\", vilket " +"inaktiverar lösenordsautentisering för root utan att förstöra system som " +"explicit har konfigurerat nyckelautentisering med hjälp av publika nycklar " +"för root." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Denna förändring gör system säkrare mot brute-force-angrepp med hjälp av " +"ordlistor med lösenord på root-användaren (ett väldigt vanligt mål för " +"sådana angrepp). Dock så kan detta förstöra system som förväntas kunna " +"använda SSH som root med hjälp av lösenordsautentisering. Du skall endast " +"göra denna förändring om du inte har ett behov av att kunna göra detta." diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 0000000..47c9e36 --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: openssh\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" diff --git a/debian/po/tr.po b/debian/po/tr.po new file mode 100644 index 0000000..1ada041 --- /dev/null +++ b/debian/po/tr.po @@ -0,0 +1,58 @@ +# Turkish translation of openssh package +# Copyright (C) 2014 Mert Dirik +# This file is distributed under the same license as the openssh package. +# Mert Dirik , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openssh-server\n" +"Report-Msgid-Bugs-To: openssh@packages.debian.org\n" +"POT-Creation-Date: 2014-03-20 02:06+0000\n" +"PO-Revision-Date: 2014-08-01 14:44+0200\n" +"Last-Translator: Mert Dirik \n" +"Language-Team: Debian L10n Turkish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.4\n" +"Language: tr\n" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "Disable SSH password authentication for root?" +msgstr "root kullanıcısının parola ile kimlik doğrulaması engellensin mi?" + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"Previous versions of openssh-server permitted logging in as root over SSH " +"using password authentication. The default for new installations is now " +"\"PermitRootLogin prohibit-password\", which disables password " +"authentication for root without breaking systems that have explicitly " +"configured SSH public key authentication for root." +msgstr "" +"openssh-server'ın önceki sürümleri parola ile kimlik doğrulama kullanılarak " +"root kullanıcısının SSH üzerinden oturum açmasına izin veriyordu. Artık yeni " +"kurulumların öntanımlı ayarı \"PermitRootLogin prohibit-password\" " +"şeklindedir. Bu ayar root kullanıcısının parola kullanarak oturum açmasını " +"yasaklar. SSH genel anahtar doğrulama yöntemine ayrıca izin veren mevcut " +"sistemler bu ayardan etkilenmez." + +#. Type: boolean +#. Description +#: ../openssh-server.templates:1001 +msgid "" +"This change makes systems more secure against brute-force password " +"dictionary attacks on the root user (a very common target for such attacks). " +"However, it may break systems that are set up with the expectation of being " +"able to SSH as root using password authentication. You should only make this " +"change if you do not need to do that." +msgstr "" +"Bu ayar sistemleri kaba kuvvet sözlükten parola saldırılarına karşı güvenli " +"hale getirir (root kullanıcısı bu tarz saldırıların en büyük " +"hedeflerindendir). Fakat bu ayarın etkinleştirilmesi, root kullanıcısına " +"parola doğrulama yöntemiyle oturum açılabileceği varsayımıyla hareket eden " +"sistemlerde eskiden çalışan düzenin bozulmasına sebep olacaktır. Bu " +"değişikliği yalnızca sorun çıkarmayacağından eminseniz yapın." diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..44bac00 --- /dev/null +++ b/debian/rules @@ -0,0 +1,233 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS := hardening=+all + +include /usr/share/dpkg/default.mk + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + RUN_TESTS := yes +else + RUN_TESTS := +endif + +ifeq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + PARALLEL := +else + PARALLEL := \ + -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +endif + +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + CC := gcc + PKG_CONFIG = pkg-config +else + CC := $(DEB_HOST_GNU_TYPE)-gcc + PKG_CONFIG = $(DEB_HOST_GNU_TYPE)-pkg-config + RUN_TESTS := +endif + +# Change the version string to reflect distribution +SSH_EXTRAVERSION := $(DEB_VENDOR)-$(shell echo '$(DEB_VERSION)' | sed -e 's/.*-//') + +UBUNTU := $(shell $(call dpkg_vendor_derives_from,Ubuntu)) +ifeq ($(UBUNTU),yes) +DEFAULT_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games +else +DEFAULT_PATH := /usr/local/bin:/usr/bin:/bin:/usr/games +endif +SUPERUSER_PATH := /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +ifeq ($(UBUNTU),yes) +server_recommends := ssh-import-id +else +server_recommends := +endif + +# Common path configuration. +confflags += --sysconfdir=/etc/ssh +confflags += --libexecdir=\$${prefix}/lib/openssh + +# Common build options. +confflags += --disable-strip +confflags += --with-mantype=doc +confflags += --with-4in6 +confflags += --with-privsep-path=/run/sshd +confflags += --with-pid-dir=/run + +# The Hurd needs libcrypt for res_query et al. +ifeq ($(DEB_HOST_ARCH_OS),hurd) +confflags += --with-libs=-lcrypt +endif + +# Avoid using libmd even if it's installed; see +# https://bugs.debian.org/982705. +confflags += ac_cv_header_sha2_h=false + +# Everything above here is common to the deb and udeb builds. +confflags_udeb := $(confflags) + +# Options specific to the deb build. +confflags += --with-tcp-wrappers +confflags += --with-pam +confflags += --with-libedit +confflags += --with-kerberos5=/usr +confflags += --with-ssl-engine +ifeq ($(DEB_HOST_ARCH_OS),linux) +confflags += --with-selinux +confflags += --with-audit=linux +confflags += --with-systemd +confflags += --with-security-key-builtin +endif + +# The deb build wants xauth; the udeb build doesn't. +confflags += --with-xauth=/usr/bin/xauth +confflags_udeb += --without-xauth + +# Default paths. The udeb build has /usr/games removed. +confflags += --with-default-path=$(DEFAULT_PATH) --with-superuser-path=$(SUPERUSER_PATH) +confflags_udeb += --with-default-path=/usr/local/bin:/usr/bin:/bin --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +# Compiler flags. +cflags := $(CPPFLAGS) $(CFLAGS) +cflags += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\" +cflags_udeb := -Os +cflags_udeb += -DSSH_EXTRAVERSION=\"$(SSH_EXTRAVERSION)\" +confflags += --with-cflags='$(cflags)' +confflags_udeb += --with-cflags='$(cflags_udeb)' + +# Linker flags. +confflags += --with-ldflags='$(strip -Wl,--as-needed $(LDFLAGS))' +confflags_udeb += --with-ldflags='-Wl,--as-needed' + +ifeq ($(shell dpkg-vendor --is Ubuntu && echo yes) $(DEB_HOST_ARCH), yes i386) + BUILD_PACKAGES += -Nopenssh-tests +endif + +%: + dh $@ --with=autoreconf,systemd,runit $(BUILD_PACKAGES) + +autoreconf: + autoreconf -f -i + cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub ./ + +override_dh_autoreconf-arch: + dh_autoreconf debian/rules -- autoreconf + +override_dh_autoreconf-indep: + +override_dh_auto_configure-arch: + dh_auto_configure -Bdebian/build-deb -- $(confflags) +ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),) + dh_auto_configure -Bdebian/build-udeb -- $(confflags_udeb) + # Avoid libnsl linkage. Ugh. + perl -pi -e 's/ +-lnsl//' debian/build-udeb/config.status + cd debian/build-udeb && ./config.status +endif + +override_dh_auto_configure-indep: + +override_dh_auto_build-arch: + $(MAKE) -C debian/build-deb $(PARALLEL) ASKPASS_PROGRAM='/usr/bin/ssh-askpass' + $(MAKE) -C debian/build-deb regress-prep + $(MAKE) -C debian/build-deb $(PARALLEL) regress-binaries +ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),) + $(MAKE) -C debian/build-udeb $(PARALLEL) ASKPASS_PROGRAM='/usr/bin/ssh-askpass' ssh scp sftp sshd ssh-keygen +endif + +ifeq ($(filter pkg.openssh.nognome,$(DEB_BUILD_PROFILES)),) + $(MAKE) -C contrib gnome-ssh-askpass3 CC='$(CC) $(CPPFLAGS) $(CFLAGS) -Wall -Wl,--as-needed $(LDFLAGS)' PKG_CONFIG=$(PKG_CONFIG) +endif + +override_dh_auto_build-indep: + +override_dh_auto_test-arch: +ifeq ($(RUN_TESTS),yes) + $(MAKE) -C debian/build-deb unit compat-tests + $(MAKE) -C debian/keygen-test +endif + +override_dh_auto_test-indep: + +override_dh_auto_clean: + rm -rf debian/build-deb debian/build-udeb +ifeq ($(RUN_TESTS),yes) + $(MAKE) -C debian/keygen-test clean +endif + $(MAKE) -C contrib clean + +override_dh_auto_install-arch: + $(MAKE) -C debian/build-deb DESTDIR=`pwd`/debian/tmp install-nokeys + +override_dh_auto_install-indep: + +override_dh_install-arch: + rm -f debian/tmp/etc/ssh/sshd_config + + dh_install -Nopenssh-client-udeb -Nopenssh-server-udeb --fail-missing +ifeq ($(filter noudeb,$(DEB_BUILD_PROFILES)),) + dh_install -popenssh-client-udeb -popenssh-server-udeb \ + --sourcedir=debian/build-udeb +endif + + # Remove version control tags to avoid unnecessary conffile + # resolution steps for administrators. + sed -i '/\$$OpenBSD:/d' \ + debian/openssh-server/etc/ssh/moduli \ + debian/openssh-client/etc/ssh/ssh_config + +# We'd like to use dh_install --fail-missing here, but that doesn't work +# well in combination with dh-exec: it complains that files generated by +# dh-exec for architecture-dependent packages aren't installed. +override_dh_install-indep: + rm -f debian/tmp/etc/ssh/sshd_config + dh_install + +override_dh_installdocs: + dh_installdocs -Nopenssh-server -Nopenssh-sftp-server + dh_installdocs -popenssh-server -popenssh-sftp-server \ + --link-doc=openssh-client + # Avoid breaking dh_installexamples later. + mkdir -p debian/openssh-server/usr/share/doc/openssh-client + +override_dh_systemd_enable: + dh_systemd_enable -popenssh-server --name ssh ssh.service + dh_systemd_enable -popenssh-server --name ssh --no-enable ssh.socket + +override_dh_installinit: + dh_installinit -R --name ssh + +debian/openssh-server.sshd.pam: debian/openssh-server.sshd.pam.in +ifeq ($(DEB_HOST_ARCH_OS),linux) + sed 's/^@IF_KEYINIT@//' $< > $@ +else + sed '/^@IF_KEYINIT@/d' $< > $@ +endif + +override_dh_installpam: debian/openssh-server.sshd.pam + dh_installpam --name sshd + +override_dh_runit: + dh_runit -popenssh-server + +override_dh_fixperms-arch: + dh_fixperms + chmod u+s debian/openssh-client/usr/lib/openssh/ssh-keysign + +# Tighten libssl dependencies to match the check in entropy.c. +override_dh_shlibdeps: + dh_shlibdeps + debian/adjust-openssl-dependencies + +override_dh_gencontrol: + dh_gencontrol -- -V'openssh-server:Recommends=$(server_recommends)' + +debian/faq.html: + wget -O - http://www.openssh.com/faq.html | \ + sed 's,\(href="\)\(txt/\|[^":]*\.html\),\1http://www.openssh.com/\2,g' \ + > debian/faq.html diff --git a/debian/run-tests b/debian/run-tests new file mode 100755 index 0000000..2b787ef --- /dev/null +++ b/debian/run-tests @@ -0,0 +1,39 @@ +#! /bin/sh +# Run installed OpenSSH regression tests. + +tmp="$1" +if [ -z "$tmp" ]; then + tmp="$(mktemp -d)" + cleanup () { + rm -rf "$tmp" + } + trap cleanup EXIT +fi + +# Copy the regression tests to a fresh directory; this is easier than trying +# to pick apart which ones need write access. +cp -a /usr/lib/openssh/regress "$tmp/regress" + +ret=0 +make -C "$tmp/regress" \ + .OBJDIR="$tmp/regress" \ + .CURDIR="$tmp/regress" \ + BUILDDIR="$tmp/regress" \ + OBJ="$tmp/regress" \ + SUDO=sudo \ + TEST_SHELL=sh \ + TEST_SSH_SFTPSERVER=/usr/lib/openssh/sftp-server \ + TEST_SSH_PLINK=plink \ + TEST_SSH_PUTTYGEN=puttygen \ + TEST_SSH_CONCH=conch3 \ + TEST_SSH_IPV6=yes \ + TEST_SSH_ECC=yes \ + tests interop-tests &2 + exit 1 +fi +exec ssh "${0##*/}" "$@" diff --git a/debian/ssh-argv0.1 b/debian/ssh-argv0.1 new file mode 100644 index 0000000..fec9ff3 --- /dev/null +++ b/debian/ssh-argv0.1 @@ -0,0 +1,64 @@ +.Dd September 7, 2001 +.Dt SSH-ARGV0 1 +.Os Debian Project +.Sh NAME +.Nm ssh-argv0 +.Nd replaces the old ssh command-name as hostname handling +.Sh SYNOPSIS +.Ar hostname | user@hostname +.Op Fl l Ar login_name +.Op Ar command +.Pp +.Ar hostname | user@hostname +.Op Fl afgknqstvxACNTX1246 +.Op Fl b Ar bind_address +.Op Fl c Ar cipher_spec +.Op Fl e Ar escape_char +.Op Fl i Ar identity_file +.Op Fl l Ar login_name +.Op Fl m Ar mac_spec +.Op Fl o Ar option +.Op Fl p Ar port +.Op Fl F Ar configfile +.Oo Fl L Xo +.Sm off +.Ar port : +.Ar host : +.Ar hostport +.Sm on +.Xc +.Oc +.Oo Fl R Xo +.Sm off +.Ar port : +.Ar host : +.Ar hostport +.Sm on +.Xc +.Oc +.Op Fl D Ar port +.Op Ar command +.Sh DESCRIPTION +.Nm +replaces the old ssh command-name as hostname handling. +If you link to this script with a hostname then executing the link is +equivalent to having executed ssh with that hostname as an argument. +All other arguments are passed to ssh and will be processed normally. +.Sh OPTIONS +See +.Xr ssh 1 . +.Sh FILES +See +.Xr ssh 1 . +.Sh AUTHORS +OpenSSH is a derivative of the original and free +ssh 1.2.12 release by Tatu Ylonen. +Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, +Theo de Raadt and Dug Song +removed many bugs, re-added newer features and +created OpenSSH. +Markus Friedl contributed the support for SSH +protocol versions 1.5 and 2.0. +Natalie Amery wrote this ssh-argv0 script and the associated documentation. +.Sh SEE ALSO +.Xr ssh 1 diff --git a/debian/ssh-askpass-gnome.desktop b/debian/ssh-askpass-gnome.desktop new file mode 100644 index 0000000..eba7a67 --- /dev/null +++ b/debian/ssh-askpass-gnome.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Name=SSH AskPass +GenericName=ssh-add +Comment=Enter passphrase to authenticate to the ssh agent +Exec=/usr/bin/ssh-add +TryExec=ssh-add +Terminal=false +Type=Application +Icon=ssh-askpass-gnome +Categories=Network;Security; diff --git a/debian/ssh-askpass-gnome.examples b/debian/ssh-askpass-gnome.examples new file mode 100644 index 0000000..66fd8c0 --- /dev/null +++ b/debian/ssh-askpass-gnome.examples @@ -0,0 +1 @@ +debian/ssh-askpass-gnome.desktop diff --git a/debian/ssh-askpass-gnome.install b/debian/ssh-askpass-gnome.install new file mode 100755 index 0000000..8715aaf --- /dev/null +++ b/debian/ssh-askpass-gnome.install @@ -0,0 +1,3 @@ +#! /usr/bin/dh-exec +contrib/gnome-ssh-askpass3 => usr/lib/openssh/gnome-ssh-askpass +debian/ssh-askpass-gnome.png usr/share/pixmaps diff --git a/debian/ssh-askpass-gnome.manpages b/debian/ssh-askpass-gnome.manpages new file mode 100644 index 0000000..7749f13 --- /dev/null +++ b/debian/ssh-askpass-gnome.manpages @@ -0,0 +1 @@ +debian/gnome-ssh-askpass.1 diff --git a/debian/ssh-askpass-gnome.png b/debian/ssh-askpass-gnome.png new file mode 100644 index 0000000..06f7576 Binary files /dev/null and b/debian/ssh-askpass-gnome.png differ diff --git a/debian/ssh-askpass-gnome.postinst b/debian/ssh-askpass-gnome.postinst new file mode 100644 index 0000000..8a454e5 --- /dev/null +++ b/debian/ssh-askpass-gnome.postinst @@ -0,0 +1,48 @@ +#! /bin/sh +# postinst script for ssh-askpass-gnome +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/share/doc/packaging-manual/ +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure) + update-alternatives --quiet \ + --install /usr/bin/ssh-askpass ssh-askpass \ + /usr/lib/openssh/gnome-ssh-askpass 30 \ + --slave /usr/share/man/man1/ssh-askpass.1.gz \ + ssh-askpass.1.gz /usr/share/man/man1/gnome-ssh-askpass.1.gz + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/ssh-askpass-gnome.prerm b/debian/ssh-askpass-gnome.prerm new file mode 100644 index 0000000..0adcfc7 --- /dev/null +++ b/debian/ssh-askpass-gnome.prerm @@ -0,0 +1,39 @@ +#! /bin/sh +# prerm script for ssh-askpass-gnome +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + remove|deconfigure) + update-alternatives --quiet --remove ssh-askpass /usr/lib/openssh/gnome-ssh-askpass + ;; + upgrade) + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/ssh.maintscript b/debian/ssh.maintscript new file mode 100644 index 0000000..efd370e --- /dev/null +++ b/debian/ssh.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/doc/ssh /usr/share/doc/openssh-client 1:6.6p1-8~ diff --git a/debian/systemd/rescue-ssh.target b/debian/systemd/rescue-ssh.target new file mode 100644 index 0000000..9501b7f --- /dev/null +++ b/debian/systemd/rescue-ssh.target @@ -0,0 +1,6 @@ +[Unit] +Description=Rescue with network and ssh +Documentation=man:systemd.special(7) +Requires=network-online.target ssh.service +After=network-online.target ssh.service +AllowIsolate=yes diff --git a/debian/systemd/ssh-agent.override b/debian/systemd/ssh-agent.override new file mode 100644 index 0000000..2905494 --- /dev/null +++ b/debian/systemd/ssh-agent.override @@ -0,0 +1 @@ +manual diff --git a/debian/systemd/ssh-agent.service b/debian/systemd/ssh-agent.service new file mode 100644 index 0000000..cdc10bb --- /dev/null +++ b/debian/systemd/ssh-agent.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenSSH Agent +Documentation=man:ssh-agent(1) +Before=graphical-session-pre.target +ConditionPathExists=/etc/X11/Xsession.options +Wants=dbus.socket +After=dbus.socket + +[Service] +ExecStart=/usr/lib/openssh/agent-launch start +ExecStopPost=/usr/lib/openssh/agent-launch stop diff --git a/debian/systemd/ssh-session-cleanup b/debian/systemd/ssh-session-cleanup new file mode 100755 index 0000000..f283cc9 --- /dev/null +++ b/debian/systemd/ssh-session-cleanup @@ -0,0 +1,11 @@ +#! /bin/sh + +ssh_session_pattern='sshd: \S.*@pts/[0-9]+' + +IFS="$IFS@" +pgrep -a -f "$ssh_session_pattern" | while read pid daemon user pty; do + echo "Found ${daemon%:} session $pid on $pty; sending SIGTERM" + kill "$pid" || true +done + +exit 0 diff --git a/debian/systemd/ssh-session-cleanup.service b/debian/systemd/ssh-session-cleanup.service new file mode 100644 index 0000000..b867272 --- /dev/null +++ b/debian/systemd/ssh-session-cleanup.service @@ -0,0 +1,13 @@ +[Unit] +Description=OpenBSD Secure Shell session cleanup +Wants=network.target +After=network.target + +[Service] +ExecStart=/bin/true +ExecStop=/usr/lib/openssh/ssh-session-cleanup +RemainAfterExit=yes +Type=oneshot + +[Install] +WantedBy=multi-user.target diff --git a/debian/systemd/ssh.service b/debian/systemd/ssh.service new file mode 100644 index 0000000..7495d9a --- /dev/null +++ b/debian/systemd/ssh.service @@ -0,0 +1,22 @@ +[Unit] +Description=OpenBSD Secure Shell server +Documentation=man:sshd(8) man:sshd_config(5) +After=network.target auditd.service +ConditionPathExists=!/etc/ssh/sshd_not_to_be_run + +[Service] +EnvironmentFile=-/etc/default/ssh +ExecStartPre=/usr/sbin/sshd -t +ExecStart=/usr/sbin/sshd -D $SSHD_OPTS +ExecReload=/usr/sbin/sshd -t +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=on-failure +RestartPreventExitStatus=255 +Type=notify +RuntimeDirectory=sshd +RuntimeDirectoryMode=0755 + +[Install] +WantedBy=multi-user.target +Alias=sshd.service diff --git a/debian/systemd/ssh.socket b/debian/systemd/ssh.socket new file mode 100644 index 0000000..5a766dc --- /dev/null +++ b/debian/systemd/ssh.socket @@ -0,0 +1,12 @@ +[Unit] +Description=OpenBSD Secure Shell server socket +Before=ssh.service +Conflicts=ssh.service +ConditionPathExists=!/etc/ssh/sshd_not_to_be_run + +[Socket] +ListenStream=22 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/debian/systemd/ssh@.service b/debian/systemd/ssh@.service new file mode 100644 index 0000000..f7fec1f --- /dev/null +++ b/debian/systemd/ssh@.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenBSD Secure Shell server per-connection daemon +Documentation=man:sshd(8) man:sshd_config(5) +After=auditd.service + +[Service] +EnvironmentFile=-/etc/default/ssh +ExecStart=-/usr/sbin/sshd -i $SSHD_OPTS +StandardInput=socket +RuntimeDirectory=sshd +RuntimeDirectoryMode=0755 diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..8bc480a --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,10 @@ +Tests: regress +Restrictions: needs-root allow-stderr +Depends: devscripts, + haveged, + openssh-tests, + openssl, + putty-tools, + python3-twisted, + sudo, + sysvinit-utils, diff --git a/debian/tests/regress b/debian/tests/regress new file mode 100755 index 0000000..418bf55 --- /dev/null +++ b/debian/tests/regress @@ -0,0 +1,67 @@ +#! /bin/sh +set -e + +if [ "$(id -un)" != openssh-tests ]; then + TMP="$AUTOPKGTEST_TMP/user" + CREATED_RUN_SSHD=false + STARTED_HAVEGED=false + + cleanup () { + if $STARTED_HAVEGED; then + if [ -d /run/systemd/system ] && \ + which systemctl >/dev/null 2>&1; then + systemctl disable haveged || true + systemctl stop haveged || true + else + start-stop-daemon --stop --quiet \ + --retry=TERM/30/KILL/5 \ + --pidfile "$AUTOPKGTEST_TMP/haveged.pid" \ + --name haveged + fi + fi + rm -f /etc/sudoers.d/openssh-tests + if id openssh-tests >/dev/null 2>&1; then + deluser --remove-home openssh-tests + fi + + if $CREATED_RUN_SSHD; then + rm -rf /run/sshd + fi + } + trap cleanup EXIT + + adduser --disabled-password --gecos 'OpenSSH tests' openssh-tests + cat >/etc/sudoers.d/openssh-tests </dev/null 2>&1; then + systemctl enable haveged || true + systemctl start haveged || true + STARTED_HAVEGED=: + elif ! pidof haveged >/dev/null; then + start-stop-daemon --start --quiet \ + --pidfile "$AUTOPKGTEST_TMP/haveged.pid" \ + --exec /usr/sbin/haveged -- \ + -p "$AUTOPKGTEST_TMP/haveged.pid" + STARTED_HAVEGED=: + fi + + sudo -u openssh-tests env TMP="$TMP" "$0" "$@" + exit "$?" +fi + +annotate-output +%H:%M:%S.%N /usr/lib/openssh/regress/run-tests "$TMP" diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc new file mode 100644 index 0000000..974ad55 --- /dev/null +++ b/debian/upstream/signing-key.asc @@ -0,0 +1,41 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGdBFKmggUBDICUNqm4cNh7tdEbwaNhbnwqLiHpILeXT6sddGI0Stz5ofB1uvIH +m9kXYG5XUUwlc5ywjIZm2JeuKqrd/6wAz5laLagFA6k86EZzzuBE3b5FxSQ4EN4K +5XZEJo61xASEF7z1mQCiqoA6/F407ht7nNoiVE95kOmqJlv4cqbpCw3n8f2VW+mV +UH6MYRZVrYAC9NnJWv24rem2fjgFhNT1/bx44G7H9bVJqL7hMEGa+xYQBI3YT/ul +Eu9HYmLFVeiZm1gB1eKXW7jS4ctLl5uPrxayA5DX/qNB2yqgVVlIKFwUm8gGPGPO +nsNKo0xBseE7E0F/KeGpaT5aS9yFgPm9A652Jx9felYgb0e9Ipt3lxriPQwgF/cx +LGuP/WEbN5fpWFnuV0ViklusuVI2e8GHJGU5bQD5AlzvWu4Sv6oBOcDCabScydY7 +IxPBk/XBWCF9QDIa2qa32Mc9dYc8EnJszPeVCHX5hG23omDRmdLGLwH7F+CuBvCx +AKCymZtJl5DhRmnhdzRg9d+0VG4hLF7O06ANABEBAAG0H0RhbWllbiBNaWxsZXIg +PGRqbUBtaW5kcm90Lm9yZz6JAc0EEwECACcCGwMFCQ1H67ECHgECF4AFAlKmjJwE +CwkIBwYVCgkICwIFFgIDAQAACgkQ0+X1a22SDTB2TAx9E1ozPJKUGWJPZefqsSr8 +KsO6Dp3QuPrw2Zwgo2QfeCT+uzNA5AKCDIAaYEpVbQsvu4sDy8dAW1+HENCxVrMX +WG+SH41lcdAdI4io0PGHVQDl42R5jX3e9pfjYCQALVv5BDXddK6054nyxEmudQ3I +CFCYXIcqQbA1nfj3Uk06jGhuM99B2/akbxCoFSiUX9uHDZKNYAGpU7/FCF9xCZF4 +Kd9Twvyy17jDIg7km3/Q4Jy++VP8FyvE5JjBdLRQSBzSG9GCjv9fyKWW7S0bMY4D +3SKKt/Jm1XchEMgpRr4eBpgCs3rxO1hXjzqm3te97uy6/q8CuJUtupJsPKc9Wh4+ +ogUZifC0ta7UrxZp8yZTRvPSUxYrlvDzM32VDLQ3FX6Y2i4VNo48PSJMA+BPUx7D +TcZKIXt457zsLD4jF4sRdwOk/QF/GXCkH2GAyKHWCPXIOe+jIXgiuajcqZm9cAWj +L3hidSohKfefvKkzsg75mDmjhvAtDncIbmImJNjXIe2PQU4iY9Vq5i0vlaVKgBgK +SrkBnQRSpoIFAQyA1OdwfpwXKch+O00W1FsQSMcEjahGmo84WTroM/qjTd7Ysld3 +00PMv3wkQn2WdhyTca/EmkW0fVTGSYs7Z3v5SpPf0prYSjmfu8WlXoz64ApdXqGH +jj9KAeq2OuUtWrwobgiQEzU4Hxlz94X/65BgG5k7OTyE3J6bgRcMwJCgCkwjK85w +bbBkGH+Jo9o/Zw9TPczQcE7BmGYkkLNAXbw7omKBOL4Z6w9sXToz9UnQ0EB9s4Tv +AbHGKX9y2PEQjZN+wkzR3DavWB7ql8vHZIRmspAsDAJvDT1ofsNtu8MB8wJcxvZa +oZ7j9wULYpnaNYx9xxEhgbB9o1mBcYsdDj3xz5jrgtq/cpdgGC6bg+awDc/ylQ1m +NglKfY8P9hFIhIANZilnmAlk5GSoWclP/69m+u34KKoHU4Yc3I1pPNcL6Nyi0bh8 +mHqe9WedKfod7Y4yM1S20fXaS4vrLIlKgxbsDpWiWrk0ltV03uyC7eqDe3nzzGW/ +2GLTHj5xsA2+HwGtPom5mmzjvV5PFNpS7a90JQARAQABiQG1BBgBAgAPBQJSpoIF +AhsMBQkNR+uxAAoJENPl9Wttkg0wEScMf2QjDWm3XawJxNA8pqqxrFeTEo+GESzn +VRTUeprrUFd1GHw33qaAvqLixZ+x8cr+1Gj/fJd5eiIVJfRLYbXlC8su8JZXngfX +0VhuMcUob/FTikfpcoYkRzriUsJEB3/OmjlLjGgnQm5Gz9TV1ityF3bzoHkR8svW +EKKKzNoIEPHLU3y7bqSkOrjnY3bZfdVRh618XbjV28NMuoZsV8E4pOuQoy+3s5Ij +mIf/mkSiFE3VJwdaPem23UsXatFb/eoC/Ahi0iCd/8ioFwi+oHT2Pnt9HrzVF6E8 +gBVO3vKo6UJgDTr9Qt27Nc6eHL0O5j50ins9ob/3DoOC3P5A08zhl+w466yGEv5+ +Es/usUAs/4ng4ksI3DTLK9Ygj70l5oBuMFYd3b5KGVfAIlGc5mwIOIG41YLIzZTr +GuOuTymjwCdC9cUZJ6R2Cv/Vx0htZ0hqDdyaDO0Io9OG/W2s2T7160tY9ic4MwBC +FemzwFELIBIIHNY/n/wsmxQGkI3Oj86JpOVVgR5lXWR+BrGcBjkSEyg= +=1M/J +-----END PGP PUBLIC KEY BLOCK----- diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..9e2a44e --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=pgpsigurlmangle=s/$/.asc/ \ +https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-(.*)\.tar\.gz -- cgit v1.2.3