git.iko.soy/typeable/nixpkgs
on master help sign in
openssh: Disable roaming (security fix)

Fixes CVE-2016-0777 and CVE-0216-0778. Closes #12385.

commit2d657729502336bf5c9dc29e123e2d6802f7a6e9 authorFranz Pletz <fpletz@fnordicwalking.de> dateThu 14 Jan 2016, 16:28 (11 years ago) parent0fa58f4
2 files changed+52−1
pkgs/tools/networking/openssh/default.nix+1−1 pkgs/tools/networking/openssh/disable-roaming.patch+51
pkgs/tools/networking/openssh/default.nix+1−1
@@ -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 ]
39+ patches = [ ./locale_archive.patch ./openssh-6.9p1-security-7.0.patch ./disable-roaming.patch ]
4040 ++ optional withGssapiPatches gssapiSrc;
4141
4242 buildInputs = [ zlib openssl libedit pkgconfig pam ]
pkgs/tools/networking/openssh/disable-roaming.patchnew file+51
@@ -0,0 +1,51 @@
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+