From bea68371f7acc28958347cc0c11d52e0f3744d69 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Sat, 14 Apr 2018 10:35:18 +0200 Subject: ssh: Fix server crashes for exit-normal signals --- lib/ssh/src/ssh_connection_handler.erl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index fc75945a5b..60008b6301 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -1280,8 +1280,21 @@ handle_event(info, {'DOWN', _Ref, process, ChannelPid, _Reason}, _, D0) -> {keep_state, D, Repls}; %%% So that terminate will be run when supervisor is shutdown -handle_event(info, {'EXIT', _Sup, Reason}, _, _) -> - {stop, {shutdown, Reason}}; +handle_event(info, {'EXIT', _Sup, Reason}, StateName, _) -> + Role = role(StateName), + if + Role == client -> + %% OTP-8111 tells this function clause fixes a problem in + %% clients, but there were no check for that role. + {stop, {shutdown, Reason}}; + + Reason == normal -> + %% An exit normal should not cause a server to crash. This has happend... + keep_state_and_data; + + true -> + {stop, {shutdown, Reason}} + end; handle_event(info, check_cache, _, D) -> {keep_state, cache_check_set_idle_timer(D)}; -- cgit v1.2.3 From e0e2286660cfb644e04f223090b8e2d78d76845d Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 2 May 2018 15:27:54 +0200 Subject: ssh: Fix DH group exchange server bug for PuTTY and others following draft-draft-00 from 2001 and not the rfc4419 --- lib/ssh/src/ssh_transport.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl index 61a1a57063..a160309b95 100644 --- a/lib/ssh/src/ssh_transport.erl +++ b/lib/ssh/src/ssh_transport.erl @@ -1663,13 +1663,13 @@ kex_h(SSH, Curve, Key, Q_c, Q_s, K) -> kex_h(SSH, Key, Min, NBits, Max, Prime, Gen, E, F, K) -> KeyBin = public_key:ssh_encode(Key, ssh2_pubkey), L = if Min==-1; Max==-1 -> - %% flag from 'ssh_msg_kex_dh_gex_request_old' - %% It was like this before that message was supported, - %% why? + %% ssh_msg_kex_dh_gex_request_old <>; + ?Euint32(NBits), + ?Empint(Prime), ?Empint(Gen), ?Empint(E), ?Empint(F), ?Empint(K)>>; true -> + %% ssh_msg_kex_dh_gex_request < Date: Wed, 2 May 2018 15:38:04 +0200 Subject: ssh: Renegotiation -> renegotiate --- lib/ssh/src/ssh_connection_handler.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl index fc75945a5b..c146619a06 100644 --- a/lib/ssh/src/ssh_connection_handler.erl +++ b/lib/ssh/src/ssh_connection_handler.erl @@ -1475,7 +1475,7 @@ role({_,Role,_}) -> Role. %%-------------------------------------------------------------------- %% Check the StateName to see if we are in the renegotiation phase -renegotiation({_,_,ReNeg}) -> ReNeg == renegotiation; +renegotiation({_,_,ReNeg}) -> ReNeg == renegotiate; renegotiation(_) -> false. %%-------------------------------------------------------------------- -- cgit v1.2.3 From ce92d1b910996cf151d37277ccedcead3229efb6 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 8 May 2018 12:10:45 +0200 Subject: Prepare release --- lib/ssh/doc/src/notes.xml | 29 +++++++++++++++++++++++++++++ lib/ssh/vsn.mk | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml index b80ddb1621..6e98cab129 100644 --- a/lib/ssh/doc/src/notes.xml +++ b/lib/ssh/doc/src/notes.xml @@ -30,6 +30,35 @@ notes.xml +
Ssh 4.4.2.4 + +
Fixed Bugs and Malfunctions + + +

+ Fix rare spurios shutdowns of ssh servers when receiveing + {'EXIT',_,normal} messages.

+

+ Own Id: OTP-15018

+
+ +

+ Host key hash erroneously calculated for clients + following draft-00 of RFC 4419, for example PuTTY

+

+ Own Id: OTP-15064

+
+ +

+ Renegotiation could fail in some states

+

+ Own Id: OTP-15066

+
+
+
+ +
+
Ssh 4.4.2.3
Fixed Bugs and Malfunctions diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk index fbf689690b..9135d8f954 100644 --- a/lib/ssh/vsn.mk +++ b/lib/ssh/vsn.mk @@ -1,5 +1,5 @@ #-*-makefile-*- ; force emacs to enter makefile-mode -SSH_VSN = 4.4.2.3 +SSH_VSN = 4.4.2.4 APP_VSN = "ssh-$(SSH_VSN)" -- cgit v1.2.3