Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssh/dist Changes since OpenSSH 6.7
details: https://anonhg.NetBSD.org/src/rev/14197ef28e35
branches: trunk
changeset: 337134:14197ef28e35
user: christos <christos%NetBSD.org@localhost>
date: Fri Apr 03 23:49:21 2015 +0000
description:
Changes since OpenSSH 6.7
=========================
This is a major release, containing a number of new features as
well as a large internal re-factoring.
Potentially-incompatible changes
--------------------------------
* 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.
New Features
------------
* Much of OpenSSH's internal code has been re-factored to be more
library-like. These changes are mostly not user-visible, but
have greatly improved OpenSSH's testability and internal layout.
* 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 avoiding needless DNS
lookups in some cases.
* ssh-keygen(1), sshd(8): Key Revocation Lists (KRLs) no longer
require OpenSSH to be compiled with OpenSSL support.
* 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. 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".
* The regression test suite has been extended to cover more OpenSSH
features. The unit tests have been expanded and now cover key
exchange.
Bugfixes
* ssh-keyscan(1): ssh-keyscan has been made much more robust again
servers that hang or violate the SSH protocol.
* ssh(1), ssh-keygen(1): Fix regression bz#2306: Key path names were
being lost as comment fields.
* ssh(1): Allow ssh_config Port options set in the second config
parse phase to be applied (they were being ignored). bz#2286
* 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) bz#2267
* ssh(1): Fix passing of wildcard forward bind addresses when
connection multiplexing is in use; bz#2324;
* ssh-keygen(1): Fix broken private key conversion from non-OpenSSH
formats; bz#2345.
* ssh-keygen(1): Fix KRL generation bug when multiple CAs are in
use.
* Various fixes to manual pages: bz#2288, bz#2316, bz#2273
Portable OpenSSH
* Support --without-openssl at configure time
Disables and removes dependency on OpenSSL. Many features,
including SSH protocol 1 are not supported and the set of crypto
options is greatly restricted. This will only work on systems
with native arc4random or /dev/urandom.
Considered highly experimental for now.
* Support --without-ssh1 option at configure time
Allows disabling support for SSH protocol 1.
* sshd(8): Fix compilation on systems with IPv6 support in utmpx; bz#2296
* Allow custom service name for sshd on Cygwin. Permits the use of
multiple sshd running with different service names.
Checksums:
==========
- SHA1 (openssh-6.8.tar.gz) = 99903c6ca76e0a2c044711017f81127e12459d37
- SHA256 (openssh-6.8.tar.gz) = N1uzVarFbrm2CzAwuDu3sRoszmqpK+5phAChP/QNyuw=
- SHA1 (openssh-6.8p1.tar.gz) = cdbc51e46a902b30d263b05fdc71340920e91c92
- SHA256 (openssh-6.8p1.tar.gz) = P/ZM5z7hJEgLW/dnuYMNfTwDu8tqvnFrePAZLDfOFg4=
Please note that the PGP key used to sign releases was recently rotated.
The new key has been signed by the old key to provide continuity. It is
available from the mirror sites as RELEASE_KEY.asc.
Reporting Bugs:
===============
- Please read http://www.openssh.com/report.html
Security bugs should be reported directly to openssh%openssh.com@localhost
OpenSSH is brought to you by Markus Friedl, Niels Provos, Theo de Raadt,
Kevin Steves, Damien Miller, Darren Tucker, Jason McIntyre, Tim Rice and
Ben Lindstrom.
diffstat:
crypto/external/bsd/openssh/dist/PROTOCOL.krl | 9 +-
crypto/external/bsd/openssh/dist/bitmap.c | 210 +++++++
crypto/external/bsd/openssh/dist/bitmap.h | 56 ++
crypto/external/bsd/openssh/dist/cipher-aesctr.c | 4 +-
crypto/external/bsd/openssh/dist/digest.h | 8 +-
crypto/external/bsd/openssh/dist/ge25519.h | 4 +-
crypto/external/bsd/openssh/dist/krl.h | 38 +-
crypto/external/bsd/openssh/dist/opacket.c | 315 +++++++++++
crypto/external/bsd/openssh/dist/opacket.h | 167 ++++++
crypto/external/bsd/openssh/dist/rijndael.c | 299 +++-------
crypto/external/bsd/openssh/dist/sandbox-systrace.c | 4 +-
crypto/external/bsd/openssh/dist/ssh_api.c | 529 ++++++++++++++++++++
crypto/external/bsd/openssh/dist/ssh_api.h | 136 +++++
crypto/external/bsd/openssh/dist/ssherr.h | 6 +-
crypto/external/bsd/openssh/dist/sshkey.h | 27 +-
15 files changed, 1572 insertions(+), 240 deletions(-)
diffs (truncated from 2099 to 300 lines):
diff -r f7017e8a9e40 -r 14197ef28e35 crypto/external/bsd/openssh/dist/PROTOCOL.krl
--- a/crypto/external/bsd/openssh/dist/PROTOCOL.krl Fri Apr 03 23:25:07 2015 +0000
+++ b/crypto/external/bsd/openssh/dist/PROTOCOL.krl Fri Apr 03 23:49:21 2015 +0000
@@ -37,7 +37,7 @@
#define KRL_SECTION_FINGERPRINT_SHA1 3
#define KRL_SECTION_SIGNATURE 4
-3. Certificate serial section
+2. Certificate section
These sections use type KRL_SECTION_CERTIFICATES to revoke certificates by
serial number or key ID. The consist of the CA key that issued the
@@ -47,6 +47,11 @@
string ca_key
string reserved
+Where "ca_key" is the standard SSH wire serialisation of the CA's
+public key. Alternately, "ca_key" may be an empty string to indicate
+the certificate section applies to all CAs (this is most useful when
+revoking key IDs).
+
Followed by one or more sections:
byte cert_section_type
@@ -161,4 +166,4 @@
signatures. Signature sections are optional for KRLs distributed by
trusted means.
-$OpenBSD: PROTOCOL.krl,v 1.2 2013/01/18 00:24:58 djm Exp $
+$OpenBSD: PROTOCOL.krl,v 1.3 2015/01/30 01:10:33 djm Exp $
diff -r f7017e8a9e40 -r 14197ef28e35 crypto/external/bsd/openssh/dist/bitmap.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssh/dist/bitmap.c Fri Apr 03 23:49:21 2015 +0000
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 2015 Damien Miller <djm%mindrot.org@localhost>
+ *
+ * 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 THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+#include <sys/types.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "bitmap.h"
+
+#define BITMAP_WTYPE u_int
+#define BITMAP_MAX (1<<24)
+#define BITMAP_BYTES (sizeof(BITMAP_WTYPE))
+#define BITMAP_BITS (sizeof(BITMAP_WTYPE) * 8)
+#define BITMAP_WMASK ((BITMAP_WTYPE)BITMAP_BITS - 1)
+struct bitmap {
+ BITMAP_WTYPE *d;
+ size_t len; /* number of words allocated */
+ size_t top; /* index of top word allocated */
+};
+
+struct bitmap *
+bitmap_new(void)
+{
+ struct bitmap *ret;
+
+ if ((ret = calloc(1, sizeof(*ret))) == NULL)
+ return NULL;
+ if ((ret->d = calloc(1, BITMAP_BYTES)) == NULL) {
+ free(ret);
+ return NULL;
+ }
+ ret->len = 1;
+ ret->top = 0;
+ return ret;
+}
+
+void
+bitmap_free(struct bitmap *b)
+{
+ if (b != NULL && b->d != NULL) {
+ memset(b->d, 0, b->len);
+ free(b->d);
+ }
+ free(b);
+}
+
+void
+bitmap_zero(struct bitmap *b)
+{
+ memset(b->d, 0, b->len * BITMAP_BYTES);
+ b->top = 0;
+}
+
+int
+bitmap_test_bit(struct bitmap *b, u_int n)
+{
+ if (b->top >= b->len)
+ return 0; /* invalid */
+ if (b->len == 0 || (n / BITMAP_BITS) > b->top)
+ return 0;
+ return (b->d[n / BITMAP_BITS] >> (n & BITMAP_WMASK)) & 1;
+}
+
+static int
+reserve(struct bitmap *b, u_int n)
+{
+ BITMAP_WTYPE *tmp;
+ size_t nlen;
+
+ if (b->top >= b->len || n > BITMAP_MAX)
+ return -1; /* invalid */
+ nlen = (n / BITMAP_BITS) + 1;
+ if (b->len < nlen) {
+ if ((tmp = reallocarray(b->d, nlen, BITMAP_BYTES)) == NULL)
+ return -1;
+ b->d = tmp;
+ memset(b->d + b->len, 0, (nlen - b->len) * BITMAP_BYTES);
+ b->len = nlen;
+ }
+ return 0;
+}
+
+int
+bitmap_set_bit(struct bitmap *b, u_int n)
+{
+ int r;
+ size_t offset;
+
+ if ((r = reserve(b, n)) != 0)
+ return r;
+ offset = n / BITMAP_BITS;
+ if (offset > b->top)
+ b->top = offset;
+ b->d[offset] |= (BITMAP_WTYPE)1 << (n & BITMAP_WMASK);
+ return 0;
+}
+
+/* Resets b->top to point to the most significant bit set in b->d */
+static void
+retop(struct bitmap *b)
+{
+ if (b->top >= b->len)
+ return;
+ while (b->top > 0 && b->d[b->top] == 0)
+ b->top--;
+}
+
+void
+bitmap_clear_bit(struct bitmap *b, u_int n)
+{
+ size_t offset;
+
+ if (b->top >= b->len || n > BITMAP_MAX)
+ return; /* invalid */
+ offset = n / BITMAP_BITS;
+ if (offset > b->top)
+ return;
+ b->d[offset] &= ~((BITMAP_WTYPE)1 << (n & BITMAP_WMASK));
+ /* The top may have changed as a result of the clear */
+ retop(b);
+}
+
+size_t
+bitmap_nbits(struct bitmap *b)
+{
+ size_t bits;
+ BITMAP_WTYPE w;
+
+ retop(b);
+ if (b->top >= b->len)
+ return 0; /* invalid */
+ if (b->len == 0 || (b->top == 0 && b->d[0] == 0))
+ return 0;
+ /* Find MSB set */
+ w = b->d[b->top];
+ bits = (b->top + 1) * BITMAP_BITS;
+ while (!(w & ((BITMAP_WTYPE)1 << (BITMAP_BITS - 1)))) {
+ w <<= 1;
+ bits--;
+ }
+ return bits;
+}
+
+size_t
+bitmap_nbytes(struct bitmap *b)
+{
+ return (bitmap_nbits(b) + 7) / 8;
+}
+
+int
+bitmap_to_string(struct bitmap *b, void *p, size_t l)
+{
+ u_char *s = (u_char *)p;
+ size_t i, j, k, need = bitmap_nbytes(b);
+
+ if (l < need || b->top >= b->len)
+ return -1;
+ if (l > need)
+ l = need;
+ /* Put the bytes from LSB backwards */
+ for (i = k = 0; i < b->top + 1; i++) {
+ for (j = 0; j < BITMAP_BYTES; j++) {
+ if (k >= l)
+ break;
+ s[need - 1 - k++] = (b->d[i] >> (j * 8)) & 0xff;
+ }
+ }
+ return 0;
+}
+
+int
+bitmap_from_string(struct bitmap *b, const void *p, size_t l)
+{
+ int r;
+ size_t i, offset, shift;
+ u_char *s = (u_char *)p;
+
+ if (l > BITMAP_MAX / 8)
+ return -1;
+ if ((r = reserve(b, l * 8)) != 0)
+ return r;
+ bitmap_zero(b);
+ if (l == 0)
+ return 0;
+ b->top = offset = ((l + (BITMAP_BYTES - 1)) / BITMAP_BYTES) - 1;
+ shift = ((l + (BITMAP_BYTES - 1)) % BITMAP_BYTES) * 8;
+ for (i = 0; i < l; i++) {
+ b->d[offset] |= (BITMAP_WTYPE)s[i] << shift;
+ if (shift == 0) {
+ offset--;
+ shift = BITMAP_BITS - 8;
+ } else
+ shift -= 8;
+ }
+ retop(b);
+ return 0;
+}
diff -r f7017e8a9e40 -r 14197ef28e35 crypto/external/bsd/openssh/dist/bitmap.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssh/dist/bitmap.h Fri Apr 03 23:49:21 2015 +0000
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2015 Damien Miller <djm%mindrot.org@localhost>
+ *
+ * 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 THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 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.
+ */
+
+#ifndef _BITMAP_H
+#define _BITMAP_H
+
+#include <sys/types.h>
+
+/* Simple bit vector routines */
+
+struct bitmap;
+
+/* Allocate a new bitmap. Returns NULL on allocation failure. */
+struct bitmap *bitmap_new(void);
+
+/* Free a bitmap */
+void bitmap_free(struct bitmap *b);
+
+/* Zero an existing bitmap */
+void bitmap_zero(struct bitmap *b);
+
+/* Test whether a bit is set in a bitmap. */
+int bitmap_test_bit(struct bitmap *b, u_int n);
+
+/* Set a bit in a bitmap. Returns 0 on success or -1 on error */
+int bitmap_set_bit(struct bitmap *b, u_int n);
+
+/* Clear a bit in a bitmap */
+void bitmap_clear_bit(struct bitmap *b, u_int n);
+
+/* Return the number of bits in a bitmap (i.e. the position of the MSB) */
+size_t bitmap_nbits(struct bitmap *b);
+
+/* Return the number of bytes needed to represent a bitmap */
+size_t bitmap_nbytes(struct bitmap *b);
+
+/* Convert a bitmap to a big endian byte string */
+int bitmap_to_string(struct bitmap *b, void *p, size_t l);
+
Home |
Main Index |
Thread Index |
Old Index