git.iko.soy/typeable/nixpkgs
on master help sign in
openssh: 6.9p1 -> 7.1p2
commita7f09e97734792b7d3d68b13825ced07f737a006 authorkoral <koral@mailoo.org> dateFri 15 Jan 2016, 23:57 (11 years ago) parent4d0e732
3 files changed+3−119
pkgs/tools/networking/openssh/default.nix+3−3 pkgs/tools/networking/openssh/disable-roaming.patch−51 pkgs/tools/networking/openssh/openssh-6.9p1-security-7.0.patch−65
pkgs/tools/networking/openssh/default.nix+3−3
@@ -23,11 +23,11 @@ let
2323in
2424with stdenv.lib;
2525stdenv.mkDerivation rec {
26− name = "openssh-6.9p1";
26+ name = "openssh-7.1p2";
2727
2828 src = fetchurl {
2929 url = "mirror://openbsd/OpenSSH/portable/${name}.tar.gz";
30− sha256 = "1zkci5nbpb4frmzj2vr3kv9j47x2h72kvybcpr0d8mzk73sls1vf";
30+ sha256 = "1gbbvszz74lkc7b2mqr3ccgpm65zj0k5h7a2ssh0c7pjvhjg0xfx";
3131 };
3232
3333 prePatch = optionalString hpnSupport
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
3636 export NIX_LDFLAGS="$NIX_LDFLAGS -lgcc_s"
3737 '';
3838
39− patches = [ ./locale_archive.patch ./openssh-6.9p1-security-7.0.patch ./disable-roaming.patch ]
39+ patches = [ ./locale_archive.patch ]
4040 ++ optional withGssapiPatches gssapiSrc;
4141
4242 buildInputs = [ zlib openssl libedit pkgconfig pam ]
pkgs/tools/networking/openssh/disable-roaming.patchdeleted−51
@@ -1,51 +0,0 @@
1−From b842c1891b9979e30a6b53292a236ceb9231be79 Mon Sep 17 00:00:00 2001
2−From: Franz Pletz <fpletz@fnordicwalking.de>
3−Date: Thu, 14 Jan 2016 16:25:50 +0100
4−Subject: [PATCH] Disable roaming, fixes CVE-2016-0777 and CVE-0216-0778
5−
6−Based on http://ftp.openbsd.org/pub/OpenBSD/patches/5.8/common/010_ssh.patch.sig
7−---
8− readconf.c | 5 ++---
9− ssh.c | 3 ---
10− 2 files changed, 2 insertions(+), 6 deletions(-)
11−
12−diff --git a/readconf.c b/readconf.c
13−index db7d0bb..5b03f97 100644
14−--- a/readconf.c
15−+++ b/readconf.c
16−@@ -1660,7 +1660,7 @@ initialize_options(Options * options)
17− options->tun_remote = -1;
18− options->local_command = NULL;
19− options->permit_local_command = -1;
20−- options->use_roaming = -1;
21−+ options->use_roaming = 0;
22− options->visual_host_key = -1;
23− options->ip_qos_interactive = -1;
24− options->ip_qos_bulk = -1;
25−@@ -1835,8 +1835,7 @@ fill_default_options(Options * options)
26− options->tun_remote = SSH_TUNID_ANY;
27− if (options->permit_local_command == -1)
28− options->permit_local_command = 0;
29−- if (options->use_roaming == -1)
30−- options->use_roaming = 1;
31−+ options->use_roaming = 0;
32− if (options->visual_host_key == -1)
33− options->visual_host_key = 0;
34− if (options->ip_qos_interactive == -1)
35−diff --git a/ssh.c b/ssh.c
36−index 3fd5a94..e8428b5 100644
37−--- a/ssh.c
38−+++ b/ssh.c
39−@@ -1931,9 +1931,6 @@ ssh_session2(void)
40− fork_postauth();
41− }
42−
43−- if (options.use_roaming)
44−- request_roaming();
45−-
46− return client_loop(tty_flag, tty_flag ?
47− options.escape_char : SSH_ESCAPECHAR_NONE, id);
48− }
49−--
50−2.7.0
51−
pkgs/tools/networking/openssh/openssh-6.9p1-security-7.0.patchdeleted−65
@@ -1,65 +0,0 @@
1−http://pkgs.fedoraproject.org/cgit/openssh.git/commit/openssh-6.9p1-security-7.0.patch?h=f22&id=4776fad91e7e1f626f33e8c240d0ccecd663554d
2−
3−diff --git a/sshpty.c b/sshpty.c
4−index 7bb7641..15da8c6 100644
5−--- a/sshpty.c
6−+++ b/sshpty.c
7−@@ -1,4 +1,4 @@
8−-/* $OpenBSD: sshpty.c,v 1.29 2014/09/03 18:55:07 djm Exp $ */
9−+/* $OpenBSD: sshpty.c,v 1.30 2015/07/30 23:09:15 djm Exp $ */
10− /*
11− * Author: Tatu Ylonen <ylo@cs.hut.fi>
12− * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
13−@@ -197,7 +197,7 @@ pty_setowner(struct passwd *pw, const char *tty)
14− /* Determine the group to make the owner of the tty. */
15− grp = getgrnam("tty");
16− gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid;
17−- mode = (grp != NULL) ? 0622 : 0600;
18−+ mode = (grp != NULL) ? 0620 : 0600;
19−
20− /*
21− * Change owner and mode of the tty as required.
22−diff --git a/monitor.c b/monitor.c
23−index b410965..f1b873d 100644
24−--- a/monitor.c
25−+++ b/monitor.c
26−@@ -1084,9 +1084,7 @@ extern KbdintDevice sshpam_device;
27− int
28− mm_answer_pam_init_ctx(int sock, Buffer *m)
29− {
30−-
31− debug3("%s", __func__);
32−- authctxt->user = buffer_get_string(m, NULL);
33− sshpam_ctxt = (sshpam_device.init_ctx)(authctxt);
34− sshpam_authok = NULL;
35− buffer_clear(m);
36−@@ -1166,14 +1166,16 @@ mm_answer_pam_respond(int sock, Buffer *m)
37− int
38− mm_answer_pam_free_ctx(int sock, Buffer *m)
39− {
40−+ int r = sshpam_authok != NULL && sshpam_authok == sshpam_ctxt;
41−
42− debug3("%s", __func__);
43− (sshpam_device.free_ctx)(sshpam_ctxt);
44−+ sshpam_ctxt = sshpam_authok = NULL;
45− buffer_clear(m);
46− mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m);
47− auth_method = "keyboard-interactive";
48− auth_submethod = "pam";
49−- return (sshpam_authok == sshpam_ctxt);
50−+ return r;
51− }
52− #endif
53−
54−diff --git a/monitor_wrap.c b/monitor_wrap.c
55−index e6217b3..eac421b 100644
56−--- a/monitor_wrap.c
57−+++ b/monitor_wrap.c
58−@@ -614,7 +614,6 @@ mm_sshpam_init_ctx(Authctxt *authctxt)
59−
60− debug3("%s", __func__);
61− buffer_init(&m);
62−- buffer_put_cstring(&m, authctxt->user);
63− mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_INIT_CTX, &m);
64− debug3("%s: waiting for MONITOR_ANS_PAM_INIT_CTX", __func__);
65− mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_INIT_CTX, &m);