Skip to content

Commit 661b5a9

Browse files
committedDec 25, 2016
Revert "openssh: security 7.3p1 -> 7.4p1"
This reverts commit 277080f. I had tested the server on my physical machine before pushing, but the openssh test got broken so something is clearly wrong. http://hydra.nixos.org/build/45500080
1 parent f49a23c commit 661b5a9

File tree

3 files changed

+52
-2
lines changed

3 files changed

+52
-2
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
diff --git a/kex.c b/kex.c
2+
index 50c7a0f..823668b 100644
3+
--- a/kex.c
4+
+++ b/kex.c
5+
@@ -419,6 +419,8 @@ kex_input_newkeys(int type, u_int32_t seq, void *ctxt)
6+
ssh_dispatch_set(ssh, SSH2_MSG_NEWKEYS, &kex_protocol_error);
7+
if ((r = sshpkt_get_end(ssh)) != 0)
8+
return r;
9+
+ if ((r = ssh_set_newkeys(ssh, MODE_IN)) != 0)
10+
+ return r;
11+
kex->done = 1;
12+
sshbuf_reset(kex->peer);
13+
/* sshbuf_reset(kex->my); */
14+
diff --git a/packet.c b/packet.c
15+
index d6dad2d..f96566b 100644
16+
--- a/packet.c
17+
+++ b/packet.c
18+
@@ -38,7 +38,7 @@
19+
*/
20+
21+
#include "includes.h"
22+
-
23+
+
24+
#include <sys/param.h> /* MIN roundup */
25+
#include <sys/types.h>
26+
#include "openbsd-compat/sys-queue.h"
27+
@@ -1907,9 +1907,7 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
28+
return r;
29+
return SSH_ERR_PROTOCOL_ERROR;
30+
}
31+
- if (*typep == SSH2_MSG_NEWKEYS)
32+
- r = ssh_set_newkeys(ssh, MODE_IN);
33+
- else if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side)
34+
+ if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side)
35+
r = ssh_packet_enable_delayed_compress(ssh);
36+
else
37+
r = 0;

‎pkgs/tools/networking/openssh/default.nix

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ stdenv.mkDerivation rec {
2929
# Please ensure that openssh_with_kerberos still builds when
3030
# bumping the version here!
3131
name = "openssh-${version}";
32-
version = "7.4p1";
32+
version = "7.3p1";
3333

3434
src = fetchurl {
3535
url = "mirror://openbsd/OpenSSH/portable/${name}.tar.gz";
36-
sha256 = "1l8r3x4fr2kb6xm95s7kjdif1wp6f94d4kljh4qjj9109shw87qv";
36+
sha256 = "1k5y1wi29d47cgizbryxrhc1fbjsba2x8l5mqfa9b9nadnd9iyrz";
3737
};
3838

3939
prePatch = optionalString hpnSupport
@@ -44,11 +44,13 @@ stdenv.mkDerivation rec {
4444

4545
patches =
4646
[
47+
./RH-1380296-NEWKEYS-null-pointer-deref.patch
4748
./locale_archive.patch
4849
./fix-host-key-algorithms-plus.patch
4950

5051
# See discussion in https://github.com/NixOS/nixpkgs/pull/16966
5152
./dont_create_privsep_path.patch
53+
./fix-CVE-2016-8858.patch
5254
]
5355
++ optional withGssapiPatches gssapiSrc;
5456

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff -u -r1.126 -r1.127
2+
--- ssh/kex.c 2016/09/28 21:44:52 1.126
3+
+++ ssh/kex.c 2016/10/10 19:28:48 1.127
4+
@@ -461,6 +461,7 @@
5+
if (kex == NULL)
6+
return SSH_ERR_INVALID_ARGUMENT;
7+
8+
+ ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL);
9+
ptr = sshpkt_ptr(ssh, &dlen);
10+
if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0)
11+
return r;

0 commit comments

Comments
 (0)
Please sign in to comment.