Module Name: src
Committed By: christos
Date: Thu Jan 14 22:30:05 UTC 2016
Modified Files:
src/crypto/external/bsd/openssh/bin/ssh: Makefile
src/crypto/external/bsd/openssh/bin/sshd: Makefile
src/crypto/external/bsd/openssh/dist: clientloop.c kex.c kex.h
monitor.c monitor_wrap.c opacket.c opacket.h packet.c readconf.c
readconf.h serverloop.c ssh.c ssh2.h sshconnect.c sshconnect2.c
sshd.c version.h
src/crypto/external/bsd/openssh/lib: Makefile shlib_version
Removed Files:
src/crypto/external/bsd/openssh/dist: roaming.h roaming_client.c
roaming_common.c roaming_dummy.c roaming_serv.c
Log Message:
get rid of roaming (CVE-2016-0777)
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/openssh/bin/ssh/Makefile
cvs rdiff -u -r1.12 -r1.13 src/crypto/external/bsd/openssh/bin/sshd/Makefile
cvs rdiff -u -r1.15 -r1.16 src/crypto/external/bsd/openssh/dist/clientloop.c
cvs rdiff -u -r1.12 -r1.13 src/crypto/external/bsd/openssh/dist/kex.c \
src/crypto/external/bsd/openssh/dist/monitor_wrap.c \
src/crypto/external/bsd/openssh/dist/serverloop.c
cvs rdiff -u -r1.10 -r1.11 src/crypto/external/bsd/openssh/dist/kex.h
cvs rdiff -u -r1.16 -r1.17 src/crypto/external/bsd/openssh/dist/monitor.c \
src/crypto/external/bsd/openssh/dist/readconf.c
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssh/dist/opacket.c
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssh/dist/opacket.h
cvs rdiff -u -r1.21 -r1.22 src/crypto/external/bsd/openssh/dist/packet.c
cvs rdiff -u -r1.13 -r1.14 src/crypto/external/bsd/openssh/dist/readconf.h \
src/crypto/external/bsd/openssh/dist/sshconnect.c
cvs rdiff -u -r1.6 -r0 src/crypto/external/bsd/openssh/dist/roaming.h
cvs rdiff -u -r1.7 -r0 src/crypto/external/bsd/openssh/dist/roaming_client.c
cvs rdiff -u -r1.9 -r0 src/crypto/external/bsd/openssh/dist/roaming_common.c
cvs rdiff -u -r1.4 -r0 src/crypto/external/bsd/openssh/dist/roaming_dummy.c \
src/crypto/external/bsd/openssh/dist/roaming_serv.c
cvs rdiff -u -r1.19 -r1.20 src/crypto/external/bsd/openssh/dist/ssh.c
cvs rdiff -u -r1.6 -r1.7 src/crypto/external/bsd/openssh/dist/ssh2.h
cvs rdiff -u -r1.22 -r1.23 src/crypto/external/bsd/openssh/dist/sshconnect2.c \
src/crypto/external/bsd/openssh/dist/sshd.c
cvs rdiff -u -r1.17 -r1.18 src/crypto/external/bsd/openssh/dist/version.h
cvs rdiff -u -r1.17 -r1.18 src/crypto/external/bsd/openssh/lib/Makefile
cvs rdiff -u -r1.15 -r1.16 src/crypto/external/bsd/openssh/lib/shlib_version
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/openssh/bin/ssh/Makefile
diff -u src/crypto/external/bsd/openssh/bin/ssh/Makefile:1.8 src/crypto/external/bsd/openssh/bin/ssh/Makefile:1.9
--- src/crypto/external/bsd/openssh/bin/ssh/Makefile:1.8 Fri Aug 10 08:20:12 2012
+++ src/crypto/external/bsd/openssh/bin/ssh/Makefile Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2012/08/10 12:20:12 joerg Exp $
+# $NetBSD: Makefile,v 1.9 2016/01/14 22:30:04 christos Exp $
.include <bsd.own.mk>
@@ -6,8 +6,7 @@ BINDIR = /usr/bin
PROG= ssh
SRCS= ssh.c readconf.c clientloop.c sshtty.c \
- sshconnect.c sshconnect1.c sshconnect2.c mux.c \
- roaming_common.c roaming_client.c
+ sshconnect.c sshconnect1.c sshconnect2.c mux.c
COPTS.sshconnect1.c= -fno-strict-aliasing
COPTS.mux.c= -Wno-pointer-sign
Index: src/crypto/external/bsd/openssh/bin/sshd/Makefile
diff -u src/crypto/external/bsd/openssh/bin/sshd/Makefile:1.12 src/crypto/external/bsd/openssh/bin/sshd/Makefile:1.13
--- src/crypto/external/bsd/openssh/bin/sshd/Makefile:1.12 Sun Jan 25 22:57:17 2015
+++ src/crypto/external/bsd/openssh/bin/sshd/Makefile Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2015/01/26 03:57:17 christos Exp $
+# $NetBSD: Makefile,v 1.13 2016/01/14 22:30:04 christos Exp $
.include <bsd.own.mk>
@@ -15,7 +15,7 @@ SRCS= sshd.c auth-rhosts.c auth-passwd.c
auth2-none.c auth2-passwd.c auth2-pubkey.c \
monitor_mm.c monitor.c monitor_wrap.c \
kexdhs.c kexgexs.c kexecdhs.c sftp-server.c sftp-common.c \
- roaming_common.c roaming_serv.c sandbox-rlimit.c pfilter.c
+ sandbox-rlimit.c pfilter.c
COPTS.auth-options.c= -Wno-pointer-sign
COPTS.ldapauth.c= -Wno-format-nonliteral # XXX: should fix
Index: src/crypto/external/bsd/openssh/dist/clientloop.c
diff -u src/crypto/external/bsd/openssh/dist/clientloop.c:1.15 src/crypto/external/bsd/openssh/dist/clientloop.c:1.16
--- src/crypto/external/bsd/openssh/dist/clientloop.c:1.15 Thu Aug 13 06:33:21 2015
+++ src/crypto/external/bsd/openssh/dist/clientloop.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: clientloop.c,v 1.15 2015/08/13 10:33:21 christos Exp $ */
+/* $NetBSD: clientloop.c,v 1.16 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: clientloop.c,v 1.275 2015/07/10 06:21:53 markus Exp $ */
/*
* Author: Tatu Ylonen <[email protected]>
@@ -61,7 +61,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: clientloop.c,v 1.15 2015/08/13 10:33:21 christos Exp $");
+__RCSID("$NetBSD: clientloop.c,v 1.16 2016/01/14 22:30:04 christos Exp $");
#include <sys/param.h> /* MIN MAX */
#include <sys/types.h>
@@ -106,7 +106,6 @@ __RCSID("$NetBSD: clientloop.c,v 1.15 20
#include "sshpty.h"
#include "match.h"
#include "msg.h"
-#include "roaming.h"
#include "getpeereid.h"
#include "ssherr.h"
#include "hostfile.h"
@@ -734,7 +733,7 @@ client_suspend_self(Buffer *bin, Buffer
static void
client_process_net_input(fd_set *readset)
{
- int len, cont = 0;
+ int len;
char buf[8192];
/*
@@ -743,8 +742,8 @@ client_process_net_input(fd_set *readset
*/
if (FD_ISSET(connection_in, readset)) {
/* Read as much as possible. */
- len = roaming_read(connection_in, buf, sizeof(buf), &cont);
- if (len == 0 && cont == 0) {
+ len = read(connection_in, buf, sizeof(buf));
+ if (len == 0) {
/*
* Received EOF. The remote host has closed the
* connection.
Index: src/crypto/external/bsd/openssh/dist/kex.c
diff -u src/crypto/external/bsd/openssh/dist/kex.c:1.12 src/crypto/external/bsd/openssh/dist/kex.c:1.13
--- src/crypto/external/bsd/openssh/dist/kex.c:1.12 Thu Aug 13 06:33:21 2015
+++ src/crypto/external/bsd/openssh/dist/kex.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: kex.c,v 1.12 2015/08/13 10:33:21 christos Exp $ */
+/* $NetBSD: kex.c,v 1.13 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: kex.c,v 1.109 2015/07/30 00:01:34 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: kex.c,v 1.12 2015/08/13 10:33:21 christos Exp $");
+__RCSID("$NetBSD: kex.c,v 1.13 2016/01/14 22:30:04 christos Exp $");
#include <sys/param.h> /* MAX roundup */
#include <signal.h>
@@ -50,7 +50,6 @@ __RCSID("$NetBSD: kex.c,v 1.12 2015/08/1
#include "dispatch.h"
#include "monitor.h"
#include "canohost.h"
-#include "roaming.h"
#include "ssherr.h"
#include "sshbuf.h"
@@ -650,17 +649,6 @@ kex_choose_conf(struct ssh *ssh)
sprop=peer;
}
- /* Check whether server offers roaming */
- if (!kex->server) {
- char *roaming = match_list(KEX_RESUME,
- peer[PROPOSAL_KEX_ALGS], NULL);
-
- if (roaming) {
- kex->roaming = 1;
- free(roaming);
- }
- }
-
/* Algorithm Negotiation */
for (mode = 0; mode < MODE_MAX; mode++) {
if ((newkeys = calloc(1, sizeof(*newkeys))) == NULL) {
Index: src/crypto/external/bsd/openssh/dist/monitor_wrap.c
diff -u src/crypto/external/bsd/openssh/dist/monitor_wrap.c:1.12 src/crypto/external/bsd/openssh/dist/monitor_wrap.c:1.13
--- src/crypto/external/bsd/openssh/dist/monitor_wrap.c:1.12 Thu Jul 2 21:00:00 2015
+++ src/crypto/external/bsd/openssh/dist/monitor_wrap.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: monitor_wrap.c,v 1.12 2015/07/03 01:00:00 christos Exp $ */
+/* $NetBSD: monitor_wrap.c,v 1.13 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: monitor_wrap.c,v 1.85 2015/05/01 03:23:51 djm Exp $ */
/*
* Copyright 2002 Niels Provos <[email protected]>
@@ -27,7 +27,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: monitor_wrap.c,v 1.12 2015/07/03 01:00:00 christos Exp $");
+__RCSID("$NetBSD: monitor_wrap.c,v 1.13 2016/01/14 22:30:04 christos Exp $");
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/queue.h>
@@ -78,7 +78,6 @@ __RCSID("$NetBSD: monitor_wrap.c,v 1.12
#include "channels.h"
#include "session.h"
#include "servconf.h"
-#include "roaming.h"
#include "ssherr.h"
Index: src/crypto/external/bsd/openssh/dist/serverloop.c
diff -u src/crypto/external/bsd/openssh/dist/serverloop.c:1.12 src/crypto/external/bsd/openssh/dist/serverloop.c:1.13
--- src/crypto/external/bsd/openssh/dist/serverloop.c:1.12 Mon Apr 13 14:00:47 2015
+++ src/crypto/external/bsd/openssh/dist/serverloop.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: serverloop.c,v 1.12 2015/04/13 18:00:47 christos Exp $ */
+/* $NetBSD: serverloop.c,v 1.13 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: serverloop.c,v 1.178 2015/02/20 22:17:21 djm Exp $ */
/*
* Author: Tatu Ylonen <[email protected]>
@@ -37,7 +37,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: serverloop.c,v 1.12 2015/04/13 18:00:47 christos Exp $");
+__RCSID("$NetBSD: serverloop.c,v 1.13 2016/01/14 22:30:04 christos Exp $");
#include <sys/param.h> /* MIN MAX */
#include <sys/types.h>
#include <sys/wait.h>
@@ -77,7 +77,6 @@ __RCSID("$NetBSD: serverloop.c,v 1.12 20
#include "dispatch.h"
#include "auth-options.h"
#include "serverloop.h"
-#include "roaming.h"
#include "ssherr.h"
extern ServerOptions options;
@@ -399,11 +398,8 @@ process_input(fd_set *readset)
/* Read and buffer any input data from the client. */
if (FD_ISSET(connection_in, readset)) {
- int cont = 0;
- len = roaming_read(connection_in, buf, sizeof(buf), &cont);
+ len = read(connection_in, buf, sizeof(buf));
if (len == 0) {
- if (cont)
- return;
verbose("Connection closed by %.100s",
get_remote_ipaddr());
connection_closed = 1;
Index: src/crypto/external/bsd/openssh/dist/kex.h
diff -u src/crypto/external/bsd/openssh/dist/kex.h:1.10 src/crypto/external/bsd/openssh/dist/kex.h:1.11
--- src/crypto/external/bsd/openssh/dist/kex.h:1.10 Thu Aug 13 06:33:21 2015
+++ src/crypto/external/bsd/openssh/dist/kex.h Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: kex.h,v 1.10 2015/08/13 10:33:21 christos Exp $ */
+/* $NetBSD: kex.h,v 1.11 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: kex.h,v 1.73 2015/07/30 00:01:34 djm Exp $ */
/*
@@ -41,7 +41,6 @@
#define KEX_DH14 "diffie-hellman-group14-sha1"
#define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1"
#define KEX_DHGEX_SHA256 "diffie-hellman-group-exchange-sha256"
-#define KEX_RESUME "[email protected]"
#define KEX_ECDH_SHA2_NISTP256 "ecdh-sha2-nistp256"
#define KEX_ECDH_SHA2_NISTP384 "ecdh-sha2-nistp384"
#define KEX_ECDH_SHA2_NISTP521 "ecdh-sha2-nistp521"
@@ -119,7 +118,6 @@ struct kex {
int hostkey_type;
int hostkey_nid;
u_int kex_type;
- int roaming;
struct sshbuf *my;
struct sshbuf *peer;
sig_atomic_t done;
Index: src/crypto/external/bsd/openssh/dist/monitor.c
diff -u src/crypto/external/bsd/openssh/dist/monitor.c:1.16 src/crypto/external/bsd/openssh/dist/monitor.c:1.17
--- src/crypto/external/bsd/openssh/dist/monitor.c:1.16 Thu Aug 13 06:33:21 2015
+++ src/crypto/external/bsd/openssh/dist/monitor.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: monitor.c,v 1.16 2015/08/13 10:33:21 christos Exp $ */
+/* $NetBSD: monitor.c,v 1.17 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: monitor.c,v 1.150 2015/06/22 23:42:16 djm Exp $ */
/*
* Copyright 2002 Niels Provos <[email protected]>
@@ -27,7 +27,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: monitor.c,v 1.16 2015/08/13 10:33:21 christos Exp $");
+__RCSID("$NetBSD: monitor.c,v 1.17 2016/01/14 22:30:04 christos Exp $");
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/socket.h>
@@ -84,7 +84,6 @@ __RCSID("$NetBSD: monitor.c,v 1.16 2015/
#include "monitor_fdpass.h"
#include "compat.h"
#include "ssh2.h"
-#include "roaming.h"
#include "authfd.h"
#include "match.h"
#include "ssherr.h"
Index: src/crypto/external/bsd/openssh/dist/readconf.c
diff -u src/crypto/external/bsd/openssh/dist/readconf.c:1.16 src/crypto/external/bsd/openssh/dist/readconf.c:1.17
--- src/crypto/external/bsd/openssh/dist/readconf.c:1.16 Thu Aug 13 06:33:21 2015
+++ src/crypto/external/bsd/openssh/dist/readconf.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: readconf.c,v 1.16 2015/08/13 10:33:21 christos Exp $ */
+/* $NetBSD: readconf.c,v 1.17 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: readconf.c,v 1.239 2015/07/30 00:01:34 djm Exp $ */
/*
* Author: Tatu Ylonen <[email protected]>
@@ -14,7 +14,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: readconf.c,v 1.16 2015/08/13 10:33:21 christos Exp $");
+__RCSID("$NetBSD: readconf.c,v 1.17 2016/01/14 22:30:04 christos Exp $");
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
@@ -153,7 +153,7 @@ typedef enum {
oSendEnv, oControlPath, oControlMaster, oControlPersist,
oHashKnownHosts,
oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
- oVisualHostKey, oUseRoaming,
+ oVisualHostKey,
oKexAlgorithms, oIPQoS, oRequestTTY, oIgnoreUnknown, oProxyUseFdpass,
oCanonicalDomains, oCanonicalizeHostname, oCanonicalizeMaxDots,
oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs,
@@ -273,7 +273,6 @@ static struct {
{ "localcommand", oLocalCommand },
{ "permitlocalcommand", oPermitLocalCommand },
{ "visualhostkey", oVisualHostKey },
- { "useroaming", oUseRoaming },
{ "kexalgorithms", oKexAlgorithms },
{ "ipqos", oIPQoS },
{ "requesttty", oRequestTTY },
@@ -1451,10 +1450,6 @@ parse_keytypes:
}
break;
- case oUseRoaming:
- intptr = &options->use_roaming;
- goto parse_flag;
-
case oRequestTTY:
intptr = &options->request_tty;
multistate_ptr = multistate_requesttty;
@@ -1746,7 +1741,6 @@ initialize_options(Options * options)
options->tun_remote = -1;
options->local_command = NULL;
options->permit_local_command = -1;
- options->use_roaming = -1;
options->visual_host_key = -1;
options->ip_qos_interactive = -1;
options->ip_qos_bulk = -1;
@@ -1959,8 +1953,6 @@ 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;
if (options->visual_host_key == -1)
options->visual_host_key = 0;
if (options->ip_qos_interactive == -1)
Index: src/crypto/external/bsd/openssh/dist/opacket.c
diff -u src/crypto/external/bsd/openssh/dist/opacket.c:1.3 src/crypto/external/bsd/openssh/dist/opacket.c:1.4
--- src/crypto/external/bsd/openssh/dist/opacket.c:1.3 Thu Jul 2 21:00:00 2015
+++ src/crypto/external/bsd/openssh/dist/opacket.c Thu Jan 14 17:30:04 2016
@@ -1,8 +1,8 @@
-/* $NetBSD: opacket.c,v 1.3 2015/07/03 01:00:00 christos Exp $ */
+/* $NetBSD: opacket.c,v 1.4 2016/01/14 22:30:04 christos Exp $ */
/* Written by Markus Friedl. Placed in the public domain. */
#include "includes.h"
-__RCSID("$NetBSD: opacket.c,v 1.3 2015/07/03 01:00:00 christos Exp $");
+__RCSID("$NetBSD: opacket.c,v 1.4 2016/01/14 22:30:04 christos Exp $");
#include "ssherr.h"
#include "packet.h"
@@ -243,18 +243,6 @@ packet_set_connection(int fd_in, int fd_
fatal("%s: ssh_packet_set_connection failed", __func__);
}
-void
-packet_backup_state(void)
-{
- ssh_packet_backup_state(active_state, backup_state);
-}
-
-void
-packet_restore_state(void)
-{
- ssh_packet_restore_state(active_state, backup_state);
-}
-
u_int
packet_get_char(void)
{
Index: src/crypto/external/bsd/openssh/dist/opacket.h
diff -u src/crypto/external/bsd/openssh/dist/opacket.h:1.2 src/crypto/external/bsd/openssh/dist/opacket.h:1.3
--- src/crypto/external/bsd/openssh/dist/opacket.h:1.2 Fri Apr 3 19:58:19 2015
+++ src/crypto/external/bsd/openssh/dist/opacket.h Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: opacket.h,v 1.2 2015/04/03 23:58:19 christos Exp $ */
+/* $NetBSD: opacket.h,v 1.3 2016/01/14 22:30:04 christos Exp $ */
#ifndef _OPACKET_H
/* Written by Markus Friedl. Placed in the public domain. */
@@ -41,8 +41,6 @@ do { \
void packet_close(void);
u_int packet_get_char(void);
u_int packet_get_int(void);
-void packet_backup_state(void);
-void packet_restore_state(void);
void packet_set_connection(int, int);
int packet_read_seqnr(u_int32_t *);
int packet_read_poll_seqnr(u_int32_t *);
Index: src/crypto/external/bsd/openssh/dist/packet.c
diff -u src/crypto/external/bsd/openssh/dist/packet.c:1.21 src/crypto/external/bsd/openssh/dist/packet.c:1.22
--- src/crypto/external/bsd/openssh/dist/packet.c:1.21 Fri Aug 21 04:20:59 2015
+++ src/crypto/external/bsd/openssh/dist/packet.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: packet.c,v 1.21 2015/08/21 08:20:59 christos Exp $ */
+/* $NetBSD: packet.c,v 1.22 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: packet.c,v 1.214 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Author: Tatu Ylonen <[email protected]>
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: packet.c,v 1.21 2015/08/21 08:20:59 christos Exp $");
+__RCSID("$NetBSD: packet.c,v 1.22 2016/01/14 22:30:04 christos Exp $");
#include <sys/param.h> /* MIN roundup */
#include <sys/types.h>
#include <sys/queue.h>
@@ -80,7 +80,6 @@ __RCSID("$NetBSD: packet.c,v 1.21 2015/0
#include "channels.h"
#include "ssh.h"
#include "packet.h"
-#include "roaming.h"
#include "ssherr.h"
#include "sshbuf.h"
@@ -1265,7 +1264,7 @@ int
ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
{
struct session_state *state = ssh->state;
- int len, r, ms_remain = 0, cont;
+ int len, r, ms_remain = 0;
fd_set *setp;
char buf[8192];
struct timeval timeout, start, *timeoutp = NULL;
@@ -1334,11 +1333,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u
if (r == 0)
return SSH_ERR_CONN_TIMEOUT;
/* Read data from the socket. */
- do {
- cont = 0;
- len = roaming_read(state->connection_in, buf,
- sizeof(buf), &cont);
- } while (len == 0 && cont);
+ len = read(state->connection_in, buf, sizeof(buf));
if (len == 0) {
r = SSH_ERR_CONN_CLOSED;
goto out;
@@ -2003,18 +1998,17 @@ ssh_packet_write_poll(struct ssh *ssh)
{
struct session_state *state = ssh->state;
int len = sshbuf_len(state->output);
- int cont, r;
+ int r;
if (len > 0) {
- cont = 0;
- len = roaming_write(state->connection_out,
- sshbuf_ptr(state->output), len, &cont);
+ len = write(state->connection_out,
+ sshbuf_ptr(state->output), len);
if (len == -1) {
if (errno == EINTR || errno == EAGAIN)
return 0;
return SSH_ERR_SYSTEM_ERROR;
}
- if (len == 0 && !cont)
+ if (len == 0)
return SSH_ERR_CONN_CLOSED;
if ((r = sshbuf_consume(state->output, len)) < 0)
return r;
@@ -2295,58 +2289,6 @@ ssh_packet_get_output(struct ssh *ssh)
return (void *)ssh->state->output;
}
-/* XXX TODO update roaming to new API (does not work anyway) */
-/*
- * Save the state for the real connection, and use a separate state when
- * resuming a suspended connection.
- */
-void
-ssh_packet_backup_state(struct ssh *ssh,
- struct ssh *backup_state)
-{
- struct ssh *tmp;
-
- close(ssh->state->connection_in);
- ssh->state->connection_in = -1;
- close(ssh->state->connection_out);
- ssh->state->connection_out = -1;
- if (backup_state)
- tmp = backup_state;
- else
- tmp = ssh_alloc_session_state();
- backup_state = ssh;
- ssh = tmp;
-}
-
-/* XXX FIXME FIXME FIXME */
-/*
- * Swap in the old state when resuming a connecion.
- */
-void
-ssh_packet_restore_state(struct ssh *ssh,
- struct ssh *backup_state)
-{
- struct ssh *tmp;
- u_int len;
- int r;
-
- tmp = backup_state;
- backup_state = ssh;
- ssh = tmp;
- ssh->state->connection_in = backup_state->state->connection_in;
- backup_state->state->connection_in = -1;
- ssh->state->connection_out = backup_state->state->connection_out;
- backup_state->state->connection_out = -1;
- len = sshbuf_len(backup_state->state->input);
- if (len > 0) {
- if ((r = sshbuf_putb(ssh->state->input,
- backup_state->state->input)) != 0)
- fatal("%s: %s", __func__, ssh_err(r));
- sshbuf_reset(backup_state->state->input);
- add_recv_bytes(len);
- }
-}
-
/* Reset after_authentication and reset compression in post-auth privsep */
static int
ssh_packet_set_postauth(struct ssh *ssh)
@@ -2497,11 +2439,6 @@ ssh_packet_get_state(struct ssh *ssh, st
(r = sshbuf_put_stringb(m, state->output)) != 0)
return r;
- if (compat20) {
- if ((r = sshbuf_put_u64(m, get_sent_bytes())) != 0 ||
- (r = sshbuf_put_u64(m, get_recv_bytes())) != 0)
- return r;
- }
return 0;
}
@@ -2632,7 +2569,6 @@ ssh_packet_set_state(struct ssh *ssh, st
size_t ssh1keylen, rlen, slen, ilen, olen;
int r;
u_int ssh1cipher = 0;
- u_int64_t sent_bytes = 0, recv_bytes = 0;
if (!compat20) {
if ((r = sshbuf_get_u32(m, &state->remote_protocol_flags)) != 0 ||
@@ -2697,12 +2633,6 @@ ssh_packet_set_state(struct ssh *ssh, st
(r = sshbuf_put(state->output, output, olen)) != 0)
return r;
- if (compat20) {
- if ((r = sshbuf_get_u64(m, &sent_bytes)) != 0 ||
- (r = sshbuf_get_u64(m, &recv_bytes)) != 0)
- return r;
- roam_set_bytes(sent_bytes, recv_bytes);
- }
if (sshbuf_len(m))
return SSH_ERR_INVALID_FORMAT;
debug3("%s: done", __func__);
Index: src/crypto/external/bsd/openssh/dist/readconf.h
diff -u src/crypto/external/bsd/openssh/dist/readconf.h:1.13 src/crypto/external/bsd/openssh/dist/readconf.h:1.14
--- src/crypto/external/bsd/openssh/dist/readconf.h:1.13 Thu Aug 13 06:33:21 2015
+++ src/crypto/external/bsd/openssh/dist/readconf.h Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: readconf.h,v 1.13 2015/08/13 10:33:21 christos Exp $ */
+/* $NetBSD: readconf.h,v 1.14 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: readconf.h,v 1.110 2015/07/10 06:21:53 markus Exp $ */
/*
@@ -147,8 +147,6 @@ typedef struct {
int permit_local_command;
int visual_host_key;
- int use_roaming;
-
int request_tty;
int send_version_first;
Index: src/crypto/external/bsd/openssh/dist/sshconnect.c
diff -u src/crypto/external/bsd/openssh/dist/sshconnect.c:1.13 src/crypto/external/bsd/openssh/dist/sshconnect.c:1.14
--- src/crypto/external/bsd/openssh/dist/sshconnect.c:1.13 Fri Aug 21 04:20:59 2015
+++ src/crypto/external/bsd/openssh/dist/sshconnect.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sshconnect.c,v 1.13 2015/08/21 08:20:59 christos Exp $ */
+/* $NetBSD: sshconnect.c,v 1.14 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: sshconnect.c,v 1.263 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Author: Tatu Ylonen <[email protected]>
@@ -15,7 +15,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: sshconnect.c,v 1.13 2015/08/21 08:20:59 christos Exp $");
+__RCSID("$NetBSD: sshconnect.c,v 1.14 2016/01/14 22:30:04 christos Exp $");
#include <sys/param.h> /* roundup */
#include <sys/types.h>
#include <sys/param.h>
@@ -54,7 +54,6 @@ __RCSID("$NetBSD: sshconnect.c,v 1.13 20
#include "readconf.h"
#include "atomicio.h"
#include "dns.h"
-#include "roaming.h"
#include "monitor_fdpass.h"
#include "ssh2.h"
#include "version.h"
@@ -554,7 +553,7 @@ send_client_banner(int connection_out, i
xasprintf(&client_version_string, "SSH-%d.%d-%.100s\n",
PROTOCOL_MAJOR_1, minor1, SSH_VERSION);
}
- if (roaming_atomicio(vwrite, connection_out, client_version_string,
+ if (atomicio(vwrite, connection_out, client_version_string,
strlen(client_version_string)) != strlen(client_version_string))
fatal("write: %.100s", strerror(errno));
chop(client_version_string);
@@ -614,7 +613,7 @@ ssh_exchange_identification(int timeout_
}
}
- len = roaming_atomicio(read, connection_in, &buf[i], 1);
+ len = atomicio(read, connection_in, &buf[i], 1);
if (len != 1 && errno == EPIPE)
fatal("ssh_exchange_identification: "
Index: src/crypto/external/bsd/openssh/dist/ssh.c
diff -u src/crypto/external/bsd/openssh/dist/ssh.c:1.19 src/crypto/external/bsd/openssh/dist/ssh.c:1.20
--- src/crypto/external/bsd/openssh/dist/ssh.c:1.19 Thu Aug 13 06:33:21 2015
+++ src/crypto/external/bsd/openssh/dist/ssh.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ssh.c,v 1.19 2015/08/13 10:33:21 christos Exp $ */
+/* $NetBSD: ssh.c,v 1.20 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: ssh.c,v 1.420 2015/07/30 00:01:34 djm Exp $ */
/*
* Author: Tatu Ylonen <[email protected]>
@@ -42,7 +42,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: ssh.c,v 1.19 2015/08/13 10:33:21 christos Exp $");
+__RCSID("$NetBSD: ssh.c,v 1.20 2016/01/14 22:30:04 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -101,7 +101,6 @@ __RCSID("$NetBSD: ssh.c,v 1.19 2015/08/1
#include "match.h"
#include "msg.h"
#include "uidswap.h"
-#include "roaming.h"
#include "version.h"
#include "ssherr.h"
#include "myproposal.h"
@@ -1966,9 +1965,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);
}
Index: src/crypto/external/bsd/openssh/dist/ssh2.h
diff -u src/crypto/external/bsd/openssh/dist/ssh2.h:1.6 src/crypto/external/bsd/openssh/dist/ssh2.h:1.7
--- src/crypto/external/bsd/openssh/dist/ssh2.h:1.6 Fri Apr 3 19:58:19 2015
+++ src/crypto/external/bsd/openssh/dist/ssh2.h Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ssh2.h,v 1.6 2015/04/03 23:58:19 christos Exp $ */
+/* $NetBSD: ssh2.h,v 1.7 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: ssh2.h,v 1.15 2014/01/29 06:18:35 djm Exp $ */
/*
@@ -165,13 +165,6 @@
#define SSH2_EXTENDED_DATA_STDERR 1
-/* kex messages for [email protected] */
-#define SSH2_MSG_KEX_ROAMING_RESUME 30
-#define SSH2_MSG_KEX_ROAMING_AUTH_REQUIRED 31
-#define SSH2_MSG_KEX_ROAMING_AUTH 32
-#define SSH2_MSG_KEX_ROAMING_AUTH_OK 33
-#define SSH2_MSG_KEX_ROAMING_AUTH_FAIL 34
-
/* Certificate types for OpenSSH certificate keys extension */
#define SSH2_CERT_TYPE_USER 1
#define SSH2_CERT_TYPE_HOST 2
Index: src/crypto/external/bsd/openssh/dist/sshconnect2.c
diff -u src/crypto/external/bsd/openssh/dist/sshconnect2.c:1.22 src/crypto/external/bsd/openssh/dist/sshconnect2.c:1.23
--- src/crypto/external/bsd/openssh/dist/sshconnect2.c:1.22 Thu Aug 13 06:33:21 2015
+++ src/crypto/external/bsd/openssh/dist/sshconnect2.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sshconnect2.c,v 1.22 2015/08/13 10:33:21 christos Exp $ */
+/* $NetBSD: sshconnect2.c,v 1.23 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: sshconnect2.c,v 1.226 2015/07/30 00:01:34 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -26,7 +26,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: sshconnect2.c,v 1.22 2015/08/13 10:33:21 christos Exp $");
+__RCSID("$NetBSD: sshconnect2.c,v 1.23 2016/01/14 22:30:04 christos Exp $");
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
@@ -221,11 +221,6 @@ ssh_kex2(char *host, struct sockaddr *ho
dispatch_run(DISPATCH_BLOCK, &kex->done, active_state);
- if (options.use_roaming && !kex->roaming) {
- debug("Roaming not allowed by server");
- options.use_roaming = 0;
- }
-
session_id2 = kex->session_id;
session_id2_len = kex->session_id_len;
Index: src/crypto/external/bsd/openssh/dist/sshd.c
diff -u src/crypto/external/bsd/openssh/dist/sshd.c:1.22 src/crypto/external/bsd/openssh/dist/sshd.c:1.23
--- src/crypto/external/bsd/openssh/dist/sshd.c:1.22 Fri Aug 21 04:20:59 2015
+++ src/crypto/external/bsd/openssh/dist/sshd.c Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sshd.c,v 1.22 2015/08/21 08:20:59 christos Exp $ */
+/* $NetBSD: sshd.c,v 1.23 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: sshd.c,v 1.458 2015/08/20 22:32:42 deraadt Exp $ */
/*
* Author: Tatu Ylonen <[email protected]>
@@ -44,7 +44,7 @@
*/
#include "includes.h"
-__RCSID("$NetBSD: sshd.c,v 1.22 2015/08/21 08:20:59 christos Exp $");
+__RCSID("$NetBSD: sshd.c,v 1.23 2016/01/14 22:30:04 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -108,7 +108,6 @@ __RCSID("$NetBSD: sshd.c,v 1.22 2015/08/
#include "ssh-gss.h"
#endif
#include "monitor_wrap.h"
-#include "roaming.h"
#include "ssh-sandbox.h"
#include "version.h"
#include "ssherr.h"
@@ -438,7 +437,7 @@ sshd_exchange_identification(int sock_in
options.version_addendum, newline);
/* Send our protocol version identification. */
- if (roaming_atomicio(vwrite, sock_out, server_version_string,
+ if (atomicio(vwrite, sock_out, server_version_string,
strlen(server_version_string))
!= strlen(server_version_string)) {
logit("Could not write ident string to %s", get_remote_ipaddr());
@@ -448,7 +447,7 @@ sshd_exchange_identification(int sock_in
/* Read other sides version identification. */
memset(buf, 0, sizeof(buf));
for (i = 0; i < sizeof(buf) - 1; i++) {
- if (roaming_atomicio(read, sock_in, &buf[i], 1) != 1) {
+ if (atomicio(read, sock_in, &buf[i], 1) != 1) {
logit("Did not receive identification string from %s",
get_remote_ipaddr());
cleanup_exit(255);
Index: src/crypto/external/bsd/openssh/dist/version.h
diff -u src/crypto/external/bsd/openssh/dist/version.h:1.17 src/crypto/external/bsd/openssh/dist/version.h:1.18
--- src/crypto/external/bsd/openssh/dist/version.h:1.17 Fri Aug 21 04:20:59 2015
+++ src/crypto/external/bsd/openssh/dist/version.h Thu Jan 14 17:30:04 2016
@@ -1,8 +1,8 @@
-/* $NetBSD: version.h,v 1.17 2015/08/21 08:20:59 christos Exp $ */
+/* $NetBSD: version.h,v 1.18 2016/01/14 22:30:04 christos Exp $ */
/* $OpenBSD: version.h,v 1.75 2015/08/21 03:45:26 djm Exp $ */
#define __OPENSSH_VERSION "OpenSSH_7.1"
-#define __NETBSDSSH_VERSION "NetBSD_Secure_Shell-20150821"
+#define __NETBSDSSH_VERSION "NetBSD_Secure_Shell-20160114"
#define SSH_HPN "-hpn13v14"
#define SSH_LPK "-lpk"
/*
Index: src/crypto/external/bsd/openssh/lib/Makefile
diff -u src/crypto/external/bsd/openssh/lib/Makefile:1.17 src/crypto/external/bsd/openssh/lib/Makefile:1.18
--- src/crypto/external/bsd/openssh/lib/Makefile:1.17 Fri Apr 3 19:58:19 2015
+++ src/crypto/external/bsd/openssh/lib/Makefile Thu Jan 14 17:30:04 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2015/04/03 23:58:19 christos Exp $
+# $NetBSD: Makefile,v 1.18 2016/01/14 22:30:04 christos Exp $
.include <bsd.own.mk>
@@ -60,7 +60,6 @@ packet.c \
poly1305.c \
progressmeter.c \
readpass.c \
-roaming_dummy.c \
rsa.c \
sc25519.c \
smult_curve25519_ref.c \
Index: src/crypto/external/bsd/openssh/lib/shlib_version
diff -u src/crypto/external/bsd/openssh/lib/shlib_version:1.15 src/crypto/external/bsd/openssh/lib/shlib_version:1.16
--- src/crypto/external/bsd/openssh/lib/shlib_version:1.15 Thu Aug 13 06:32:36 2015
+++ src/crypto/external/bsd/openssh/lib/shlib_version Thu Jan 14 17:30:04 2016
@@ -1,5 +1,5 @@
-# $NetBSD: shlib_version,v 1.15 2015/08/13 10:32:36 christos Exp $
+# $NetBSD: shlib_version,v 1.16 2016/01/14 22:30:04 christos Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
-major=26
+major=27
minor=0