Compare commits

..
21 Commits
Author SHA1 Message Date
Damien Miller c88ac102f0 bump version numbers 2016-01-14 12:10:45 +11:00
Damien Miller 302bc21e6f openssh-7.1p2 2016-01-14 12:10:44 +11:00
Damien Miller 6b33763242 forcibly disable roaming support in the client 2016-01-14 12:10:43 +11:00
[email protected] 34d364f0d2 upstream commit
some more bzero->explicit_bzero, from Michael McConville

Upstream-ID: 17f19545685c33327db2efdc357c1c9225ff00d0
2016-01-14 12:10:42 +11:00
[email protected] 8f5b930267 upstream commit
Use explicit_bzero() when zeroing before free()

from Michael McConville (mmcconv1 (at) sccs.swarthmore.edu)
ok millert@ djm@

Upstream-ID: 2e3337db046c3fe70c7369ee31515ac73ec00f50
2016-01-14 12:10:41 +11:00
[email protected] d77148e3a3 upstream commit
fix OOB read in packet code caused by missing return
 statement found by Ben Hawkes; ok markus@ deraadt@

Upstream-ID: a3e3a85434ebfa0690d4879091959591f30efc62
2016-01-14 12:10:40 +11:00
Damien Miller 076d849e17 read back from libcrypto RAND when privdropping
makes certain libcrypto implementations cache a /dev/urandom fd
in preparation of sandboxing. Based on patch by Greg Hartman.
2016-01-14 12:10:39 +11:00
[email protected] f72adc0150 upstream commit
unbreak connections with peers that set
 first_kex_follows; fix from Matt Johnston va bz#2515

Upstream-ID: decc88ec4fc7515594fdb42b04aa03189a44184b
2016-01-14 12:10:38 +11:00
[email protected] 04bd8d019c upstream commit
use explicit_bzero() more liberally in the buffer code; ok
 deraadt

Upstream-ID: 0ece37069fd66bc6e4f55eb1321f93df372b65bf
2016-01-14 10:19:54 +11:00
Damien Miller e91346dc2b we don't use Github for issues/pull-requests 2015-08-21 14:49:03 +10:00
Damien Miller a4f5b507c7 fix URL for connect.c 2015-08-21 14:43:55 +10:00
Damien Miller d026a8d3da update version numbers for 7.1 2015-08-21 13:47:10 +10:00
[email protected] 78f8f589f0 upstream commit
openssh-7.1

Upstream-ID: ff7b1ef4b06caddfb45e08ba998128c88be3d73f
2015-08-21 13:47:08 +10:00
[email protected] 32a181980c upstream commit
fix inverted logic that broke PermitRootLogin; reported
 by Mantas Mikulenas; ok markus@

Upstream-ID: 260dd6a904c1bb7e43267e394b1c9cf70bdd5ea5
2015-08-21 13:43:25 +10:00
[email protected] ce445b0ed9 upstream commit
Do not cast result of malloc/calloc/realloc* if stdlib.h
 is in scope ok krw millert

Upstream-ID: 5e50ded78cadf3841556649a16cc4b1cb6c58667
2015-08-21 13:43:25 +10:00
[email protected] 05291e5288 upstream commit
In the certificates section, be consistent about using
 "host_key" and "user_key" for the respective key types.  ok sthen@ deraadt@

Upstream-ID: 9e037ea3b15577b238604c5533e082a3947f13cb
2015-08-21 13:43:24 +10:00
[email protected] 8543d4ef6f upstream commit
Better compat matching for WinSCP, add compat matching
 for FuTTY (fork of PuTTY); ok markus@ deraadt@

Upstream-ID: 24001d1ac115fa3260fbdc329a4b9aeb283c5389
2015-08-20 13:07:42 +10:00
[email protected] ec6eda16eb upstream commit
fix double-free() in error path of DSA key generation
 reported by Mateusz Kocielski; ok markus@

Upstream-ID: 4735d8f888b10599a935fa1b374787089116713c
2015-08-20 13:07:41 +10:00
[email protected] 45b0eb752c upstream commit
fix free() of uninitialised pointer reported by Mateusz
 Kocielski; ok markus@

Upstream-ID: 519552b050618501a06b7b023de5cb104e2c5663
2015-08-20 13:07:41 +10:00
[email protected] c837643b93 upstream commit
fixed unlink([uninitialised memory]) reported by Mateusz
 Kocielski; ok markus@

Upstream-ID: 14a0c4e7d891f5a8dabc4b89d4f6b7c0d5a20109
2015-08-20 13:07:40 +10:00
[email protected] 1f8d3d629c upstream commit
match myproposal.h order; from brian conway (i snuck in a
 tweak while here)

ok dtucker

Upstream-ID: 35174a19b5237ea36aa3798f042bf5933b772c67
2015-08-19 10:47:16 +10:00
27 changed files with 97 additions and 75 deletions
+5 -1
View File
@@ -1,4 +1,8 @@
See http://www.openssh.com/txt/release-7.0 for the release notes.
See http://www.openssh.com/txt/release-7.1p2 for the release notes.
Please read http://www.openssh.com/report.html for bug reporting
instructions and note that we do not use Github for bug reporting or
patch/pull-request management.
- A Japanese translation of this document and of the OpenSSH FAQ is
- available at http://www.unixuser.org/~haruyama/security/openssh/index.html
+2 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: auth.c,v 1.112 2015/08/06 14:53:21 deraadt Exp $ */
/* $OpenBSD: auth.c,v 1.113 2015/08/21 03:42:19 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -354,7 +354,7 @@ auth_root_allowed(const char *method)
case PERMIT_NO_PASSWD:
if (strcmp(method, "publickey") == 0 ||
strcmp(method, "hostbased") == 0 ||
strcmp(method, "gssapi-with-mic"))
strcmp(method, "gssapi-with-mic") == 0)
return 1;
break;
case PERMIT_FORCED_ONLY:
+1 -1
View File
@@ -53,7 +53,7 @@ void
bitmap_free(struct bitmap *b)
{
if (b != NULL && b->d != NULL) {
memset(b->d, 0, b->len);
explicit_bzero(b->d, b->len);
free(b->d);
}
free(b);
+13 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: compat.c,v 1.96 2015/07/28 23:20:42 djm Exp $ */
/* $OpenBSD: compat.c,v 1.97 2015/08/19 23:21:42 djm Exp $ */
/*
* Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved.
*
@@ -176,6 +176,7 @@ compat_datafellows(const char *version)
"PuTTY_Release_0.63*,"
"PuTTY_Release_0.64*",
SSH_OLD_DHGEX },
{ "FuTTY*", SSH_OLD_DHGEX }, /* Putty Fork */
{ "Probe-*",
SSH_BUG_PROBE },
{ "TeraTerm SSH*,"
@@ -189,7 +190,17 @@ compat_datafellows(const char *version)
"TTSSH/2.70*,"
"TTSSH/2.71*,"
"TTSSH/2.72*", SSH_BUG_HOSTKEYS },
{ "WinSCP*", SSH_OLD_DHGEX },
{ "WinSCP_release_4*,"
"WinSCP_release_5.0*,"
"WinSCP_release_5.1*,"
"WinSCP_release_5.5*,"
"WinSCP_release_5.6*,"
"WinSCP_release_5.7,"
"WinSCP_release_5.7.1,"
"WinSCP_release_5.7.2,"
"WinSCP_release_5.7.3,"
"WinSCP_release_5.7.4",
SSH_OLD_DHGEX },
{ NULL, 0 }
};
+1 -1
View File
@@ -11,7 +11,7 @@ which allows the use of outbound SSH from behind a SOCKS4, SOCKS5 or
https CONNECT style proxy server. His page for connect.c has extensive
documentation on its use as well as compiled versions for Win32.
http://www.taiyo.co.jp/~gotoh/ssh/connect.html
https://bitbucket.org/gotoh/connect/wiki/Home
X11 SSH Askpass:
+1 -1
View File
@@ -1,4 +1,4 @@
%define ver 7.0p1
%define ver 7.1p2
%define rel 1
# OpenSSH privilege separation requires a user & group ID
+1 -1
View File
@@ -13,7 +13,7 @@
Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
Name: openssh
Version: 7.0p1
Version: 7.1p2
URL: http://www.openssh.com/
Release: 1
Source0: openssh-%{version}.tar.gz
+2 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: dns.c,v 1.34 2015/01/28 22:36:00 djm Exp $ */
/* $OpenBSD: dns.c,v 1.35 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Copyright (c) 2003 Wesley Griffin. All rights reserved.
@@ -154,7 +154,7 @@ dns_read_rdata(u_int8_t *algorithm, u_int8_t *digest_type,
*digest_len = rdata_len - 2;
if (*digest_len > 0) {
*digest = (u_char *) xmalloc(*digest_len);
*digest = xmalloc(*digest_len);
memcpy(*digest, rdata + 2, *digest_len);
} else {
*digest = (u_char *)xstrdup("");
+5 -5
View File
@@ -270,13 +270,13 @@ kex_buf2prop(struct sshbuf *raw, int *first_kex_follows, char ***propp)
debug2("kex_parse_kexinit: %s", proposal[i]);
}
/* first kex follows / reserved */
if ((r = sshbuf_get_u8(b, &v)) != 0 ||
(r = sshbuf_get_u32(b, &i)) != 0)
if ((r = sshbuf_get_u8(b, &v)) != 0 || /* first_kex_follows */
(r = sshbuf_get_u32(b, &i)) != 0) /* reserved */
goto out;
if (first_kex_follows != NULL)
*first_kex_follows = i;
debug2("kex_parse_kexinit: first_kex_follows %d ", v);
debug2("kex_parse_kexinit: reserved %u ", i);
*first_kex_follows = v;
debug2("first_kex_follows %d ", v);
debug2("reserved %u ", i);
r = 0;
*propp = proposal;
out:
+5 -1
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: mux.c,v 1.53 2015/05/01 04:03:20 djm Exp $ */
/* $OpenBSD: mux.c,v 1.54 2015/08/19 23:18:26 djm Exp $ */
/*
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
*
@@ -665,6 +665,8 @@ process_mux_open_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
u_int lport, cport;
int i, ret = 0, freefwd = 1;
memset(&fwd, 0, sizeof(fwd));
/* XXX - lport/cport check redundant */
if (buffer_get_int_ret(&ftype, m) != 0 ||
(listen_addr = buffer_get_string_ret(m, NULL)) == NULL ||
@@ -832,6 +834,8 @@ process_mux_close_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
int i, ret = 0;
u_int lport, cport;
memset(&fwd, 0, sizeof(fwd));
if (buffer_get_int_ret(&ftype, m) != 0 ||
(listen_addr = buffer_get_string_ret(m, NULL)) == NULL ||
buffer_get_int_ret(&lport, m) != 0 ||
+4 -3
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: packet.c,v 1.213 2015/07/29 04:43:06 djm Exp $ */
/* $OpenBSD: packet.c,v 1.214 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1272,7 +1272,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
DBG(debug("packet_read()"));
setp = (fd_set *)calloc(howmany(state->connection_in + 1,
setp = calloc(howmany(state->connection_in + 1,
NFDBITS), sizeof(fd_mask));
if (setp == NULL)
return SSH_ERR_ALLOC_FAIL;
@@ -1581,6 +1581,7 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
logit("Bad packet length %u.", state->packlen);
if ((r = sshpkt_disconnect(ssh, "Packet corrupt")) != 0)
return r;
return SSH_ERR_CONN_CORRUPT;
}
sshbuf_reset(state->incoming_packet);
} else if (state->packlen == 0) {
@@ -2036,7 +2037,7 @@ ssh_packet_write_wait(struct ssh *ssh)
struct timeval start, timeout, *timeoutp = NULL;
struct session_state *state = ssh->state;
setp = (fd_set *)calloc(howmany(state->connection_out + 1,
setp = calloc(howmany(state->connection_out + 1,
NFDBITS), sizeof(fd_mask));
if (setp == NULL)
return SSH_ERR_ALLOC_FAIL;
+2 -3
View File
@@ -1660,7 +1660,7 @@ initialize_options(Options * options)
options->tun_remote = -1;
options->local_command = NULL;
options->permit_local_command = -1;
options->use_roaming = -1;
options->use_roaming = 0;
options->visual_host_key = -1;
options->ip_qos_interactive = -1;
options->ip_qos_bulk = -1;
@@ -1833,8 +1833,7 @@ fill_default_options(Options * options)
options->tun_remote = SSH_TUNID_ANY;
if (options->permit_local_command == -1)
options->permit_local_command = 0;
if (options->use_roaming == -1)
options->use_roaming = 1;
options->use_roaming = 0;
if (options->visual_host_key == -1)
options->visual_host_key = 0;
if (options->ip_qos_interactive == -1)
+3 -3
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sftp-server.c,v 1.106 2015/04/24 01:36:01 deraadt Exp $ */
/* $OpenBSD: sftp-server.c,v 1.107 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
*
@@ -1632,8 +1632,8 @@ sftp_server_main(int argc, char **argv, struct passwd *user_pw)
fatal("%s: sshbuf_new failed", __func__);
set_size = howmany(max + 1, NFDBITS) * sizeof(fd_mask);
rset = (fd_set *)xmalloc(set_size);
wset = (fd_set *)xmalloc(set_size);
rset = xmalloc(set_size);
wset = xmalloc(set_size);
if (homedir != NULL) {
if (chdir(homedir) != 0) {
+3 -3
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sftp.c,v 1.170 2015/01/20 23:14:00 deraadt Exp $ */
/* $OpenBSD: sftp.c,v 1.171 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -1958,7 +1958,7 @@ complete(EditLine *el, int ch)
/* Figure out which argument the cursor points to */
cursor = lf->cursor - lf->buffer;
line = (char *)xmalloc(cursor + 1);
line = xmalloc(cursor + 1);
memcpy(line, lf->buffer, cursor);
line[cursor] = '\0';
argv = makeargv(line, &carg, 1, &quote, &terminated);
@@ -1966,7 +1966,7 @@ complete(EditLine *el, int ch)
/* Get all the arguments on the line */
len = lf->lastchar - lf->buffer;
line = (char *)xmalloc(len + 1);
line = xmalloc(len + 1);
memcpy(line, lf->buffer, len);
line[len] = '\0';
argv = makeargv(line, &argc, 1, NULL, NULL);
+4 -4
View File
@@ -1,4 +1,4 @@
.\" $OpenBSD: ssh-keygen.1,v 1.126 2015/07/03 03:49:45 djm Exp $
.\" $OpenBSD: ssh-keygen.1,v 1.127 2015/08/20 19:20:06 naddy Exp $
.\"
.\" Author: Tatu Ylonen <[email protected]>
.\" Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland
@@ -35,7 +35,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: July 3 2015 $
.Dd $Mdocdate: August 20 2015 $
.Dt SSH-KEYGEN 1
.Os
.Sh NAME
@@ -680,7 +680,7 @@ and identifying the CA key by providing its public half as an argument
to
.Fl s :
.Pp
.Dl $ ssh-keygen -s ca_key.pub -D libpkcs11.so -I key_id host_key.pub
.Dl $ ssh-keygen -s ca_key.pub -D libpkcs11.so -I key_id user_key.pub
.Pp
In all cases,
.Ar key_id
@@ -693,7 +693,7 @@ By default, generated certificates are valid for all users or hosts.
To generate a certificate for a specified set of principals:
.Pp
.Dl $ ssh-keygen -s ca_key -I key_id -n user1,user2 user_key.pub
.Dl "$ ssh-keygen -s ca_key -I key_id -h -n host.domain user_key.pub"
.Dl "$ ssh-keygen -s ca_key -I key_id -h -n host.domain host_key.pub"
.Pp
Additional limitations on the validity and use of user certificates may
be specified through certificate options.
+3 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: ssh-keygen.c,v 1.276 2015/07/03 03:49:45 djm Exp $ */
/* $OpenBSD: ssh-keygen.c,v 1.277 2015/08/19 23:17:51 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1201,7 +1201,8 @@ do_known_hosts(struct passwd *pw, const char *name)
exit(1);
} else if (delete_host && !ctx.found_key) {
logit("Host %s not found in %s", name, identity_file);
unlink(tmp);
if (inplace)
unlink(tmp);
} else if (inplace) {
/* Backup existing file */
if (unlink(old) == -1 && errno != ENOENT)
+3 -3
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: ssh-pkcs11-helper.c,v 1.10 2015/01/20 23:14:00 deraadt Exp $ */
/* $OpenBSD: ssh-pkcs11-helper.c,v 1.11 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Copyright (c) 2010 Markus Friedl. All rights reserved.
*
@@ -301,8 +301,8 @@ main(int argc, char **argv)
buffer_init(&oqueue);
set_size = howmany(max + 1, NFDBITS) * sizeof(fd_mask);
rset = (fd_set *)xmalloc(set_size);
wset = (fd_set *)xmalloc(set_size);
rset = xmalloc(set_size);
wset = xmalloc(set_size);
for (;;) {
memset(rset, 0, set_size);
-3
View File
@@ -1932,9 +1932,6 @@ ssh_session2(void)
fork_postauth();
}
if (options.use_roaming)
request_roaming();
return client_loop(tty_flag, tty_flag ?
options.escape_char : SSH_ESCAPECHAR_NONE, id);
}
+3 -3
View File
@@ -33,8 +33,8 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $OpenBSD: ssh_config.5,v 1.214 2015/07/30 00:01:34 djm Exp $
.Dd $Mdocdate: July 30 2015 $
.\" $OpenBSD: ssh_config.5,v 1.215 2015/08/14 15:32:41 jmc Exp $
.Dd $Mdocdate: August 14 2015 $
.Dt SSH_CONFIG 5
.Os
.Sh NAME
@@ -415,9 +415,9 @@ [email protected]
.Pp
The default is:
.Bd -literal -offset indent
[email protected],
aes128-ctr,aes192-ctr,aes256-ctr,
[email protected],[email protected],
[email protected],
arcfour256,arcfour128,
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,
aes192-cbc,aes256-cbc,arcfour
+6 -6
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sshbuf-getput-crypto.c,v 1.4 2015/01/14 15:02:39 djm Exp $ */
/* $OpenBSD: sshbuf-getput-crypto.c,v 1.5 2016/01/12 23:42:54 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
@@ -158,10 +158,10 @@ sshbuf_put_bignum2(struct sshbuf *buf, const BIGNUM *v)
if (len > 0 && (d[1] & 0x80) != 0)
prepend = 1;
if ((r = sshbuf_put_string(buf, d + 1 - prepend, len + prepend)) < 0) {
bzero(d, sizeof(d));
explicit_bzero(d, sizeof(d));
return r;
}
bzero(d, sizeof(d));
explicit_bzero(d, sizeof(d));
return 0;
}
@@ -177,13 +177,13 @@ sshbuf_put_bignum1(struct sshbuf *buf, const BIGNUM *v)
if (BN_bn2bin(v, d) != (int)len_bytes)
return SSH_ERR_INTERNAL_ERROR; /* Shouldn't happen */
if ((r = sshbuf_reserve(buf, len_bytes + 2, &dp)) < 0) {
bzero(d, sizeof(d));
explicit_bzero(d, sizeof(d));
return r;
}
POKE_U16(dp, len_bits);
if (len_bytes != 0)
memcpy(dp + 2, d, len_bytes);
bzero(d, sizeof(d));
explicit_bzero(d, sizeof(d));
return 0;
}
@@ -210,7 +210,7 @@ sshbuf_put_ec(struct sshbuf *buf, const EC_POINT *v, const EC_GROUP *g)
}
BN_CTX_free(bn_ctx);
ret = sshbuf_put_string(buf, d, len);
bzero(d, len);
explicit_bzero(d, len);
return ret;
}
+5 -5
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sshbuf-misc.c,v 1.4 2015/03/24 20:03:44 markus Exp $ */
/* $OpenBSD: sshbuf-misc.c,v 1.5 2015/10/05 17:11:21 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
@@ -103,7 +103,7 @@ sshbuf_dtob64(struct sshbuf *buf)
if (SIZE_MAX / 2 <= len || (ret = malloc(plen)) == NULL)
return NULL;
if ((r = b64_ntop(p, len, ret, plen)) == -1) {
bzero(ret, plen);
explicit_bzero(ret, plen);
free(ret);
return NULL;
}
@@ -122,16 +122,16 @@ sshbuf_b64tod(struct sshbuf *buf, const char *b64)
if ((p = malloc(plen)) == NULL)
return SSH_ERR_ALLOC_FAIL;
if ((nlen = b64_pton(b64, p, plen)) < 0) {
bzero(p, plen);
explicit_bzero(p, plen);
free(p);
return SSH_ERR_INVALID_FORMAT;
}
if ((r = sshbuf_put(buf, p, nlen)) < 0) {
bzero(p, plen);
explicit_bzero(p, plen);
free(p);
return r;
}
bzero(p, plen);
explicit_bzero(p, plen);
free(p);
return 0;
}
+6 -6
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sshbuf.c,v 1.3 2015/01/20 23:14:00 deraadt Exp $ */
/* $OpenBSD: sshbuf.c,v 1.4 2015/10/05 17:11:21 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
@@ -134,7 +134,7 @@ sshbuf_fromb(struct sshbuf *buf)
void
sshbuf_init(struct sshbuf *ret)
{
bzero(ret, sizeof(*ret));
explicit_bzero(ret, sizeof(*ret));
ret->alloc = SSHBUF_SIZE_INIT;
ret->max_size = SSHBUF_SIZE_MAX;
ret->readonly = 0;
@@ -177,10 +177,10 @@ sshbuf_free(struct sshbuf *buf)
return;
dont_free = buf->dont_free;
if (!buf->readonly) {
bzero(buf->d, buf->alloc);
explicit_bzero(buf->d, buf->alloc);
free(buf->d);
}
bzero(buf, sizeof(*buf));
explicit_bzero(buf, sizeof(*buf));
if (!dont_free)
free(buf);
}
@@ -196,7 +196,7 @@ sshbuf_reset(struct sshbuf *buf)
return;
}
if (sshbuf_check_sanity(buf) == 0)
bzero(buf->d, buf->alloc);
explicit_bzero(buf->d, buf->alloc);
buf->off = buf->size = 0;
if (buf->alloc != SSHBUF_SIZE_INIT) {
if ((d = realloc(buf->d, SSHBUF_SIZE_INIT)) != NULL) {
@@ -255,7 +255,7 @@ sshbuf_set_max_size(struct sshbuf *buf, size_t max_size)
rlen = roundup(buf->size, SSHBUF_SIZE_INC);
if (rlen > max_size)
rlen = max_size;
bzero(buf->d + buf->size, buf->alloc - buf->size);
explicit_bzero(buf->d + buf->size, buf->alloc - buf->size);
SSHBUF_DBG(("new alloc = %zu", rlen));
if ((dp = realloc(buf->d, rlen)) == NULL)
return SSH_ERR_ALLOC_FAIL;
+2 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sshconnect.c,v 1.262 2015/05/28 05:41:29 dtucker Exp $ */
/* $OpenBSD: sshconnect.c,v 1.263 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -356,7 +356,7 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr,
goto done;
}
fdset = (fd_set *)xcalloc(howmany(sockfd + 1, NFDBITS),
fdset = xcalloc(howmany(sockfd + 1, NFDBITS),
sizeof(fd_mask));
FD_SET(sockfd, fdset);
ms_to_timeval(&tv, *timeoutp);
+8 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sshd.c,v 1.457 2015/07/30 00:01:34 djm Exp $ */
/* $OpenBSD: sshd.c,v 1.458 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -624,6 +624,8 @@ privsep_preauth_child(void)
arc4random_buf(rnd, sizeof(rnd));
#ifdef WITH_OPENSSL
RAND_seed(rnd, sizeof(rnd));
if ((RAND_bytes((u_char *)rnd, 1)) != 1)
fatal("%s: RAND_bytes failed", __func__);
#endif
explicit_bzero(rnd, sizeof(rnd));
@@ -767,6 +769,8 @@ privsep_postauth(Authctxt *authctxt)
arc4random_buf(rnd, sizeof(rnd));
#ifdef WITH_OPENSSL
RAND_seed(rnd, sizeof(rnd));
if ((RAND_bytes((u_char *)rnd, 1)) != 1)
fatal("%s: RAND_bytes failed", __func__);
#endif
explicit_bzero(rnd, sizeof(rnd));
@@ -1253,7 +1257,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
sighup_restart();
if (fdset != NULL)
free(fdset);
fdset = (fd_set *)xcalloc(howmany(maxfd + 1, NFDBITS),
fdset = xcalloc(howmany(maxfd + 1, NFDBITS),
sizeof(fd_mask));
for (i = 0; i < num_listen_socks; i++)
@@ -1436,6 +1440,8 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
arc4random_buf(rnd, sizeof(rnd));
#ifdef WITH_OPENSSL
RAND_seed(rnd, sizeof(rnd));
if ((RAND_bytes((u_char *)rnd, 1)) != 1)
fatal("%s: RAND_bytes failed", __func__);
#endif
explicit_bzero(rnd, sizeof(rnd));
}
+5 -5
View File
@@ -33,8 +33,8 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $OpenBSD: sshd_config.5,v 1.210 2015/08/06 14:53:21 deraadt Exp $
.Dd $Mdocdate: August 6 2015 $
.\" $OpenBSD: sshd_config.5,v 1.211 2015/08/14 15:32:41 jmc Exp $
.Dd $Mdocdate: August 14 2015 $
.Dt SSHD_CONFIG 5
.Os
.Sh NAME
@@ -476,9 +476,9 @@ [email protected]
.Pp
The default is:
.Bd -literal -offset indent
[email protected],
aes128-ctr,aes192-ctr,aes256-ctr,
[email protected],[email protected],
[email protected]
[email protected],[email protected]
.Ed
.Pp
The list of available ciphers may also be obtained using the
@@ -1528,7 +1528,7 @@ If this option is set to
.Pa ~/.ssh/known_hosts
.Cm from
and
.Xr sshd_config 5
.Nm
.Cm Match
.Cm Host
directives.
+1 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sshkey.c,v 1.20 2015/07/03 03:43:18 djm Exp $ */
/* $OpenBSD: sshkey.c,v 1.21 2015/08/19 23:19:01 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -1556,7 +1556,6 @@ dsa_generate_private_key(u_int bits, DSA **dsap)
*dsap = NULL;
if (!DSA_generate_parameters_ex(private, bits, NULL, 0, NULL,
NULL, NULL) || !DSA_generate_key(private)) {
DSA_free(private);
ret = SSH_ERR_LIBCRYPTO_ERROR;
goto out;
}
+3 -3
View File
@@ -1,6 +1,6 @@
/* $OpenBSD: version.h,v 1.74 2015/08/02 09:56:42 djm Exp $ */
/* $OpenBSD: version.h,v 1.75 2015/08/21 03:45:26 djm Exp $ */
#define SSH_VERSION "OpenSSH_7.0"
#define SSH_VERSION "OpenSSH_7.1"
#define SSH_PORTABLE "p1"
#define SSH_PORTABLE "p2"
#define SSH_RELEASE SSH_VERSION SSH_PORTABLE