From owner-svn-ports-all@freebsd.org Sat Feb 24 08:54:58 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F407AF244C1; Sat, 24 Feb 2018 08:54:57 +0000 (UTC) (envelope-from riggs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AE76760EE; Sat, 24 Feb 2018 08:54:57 +0000 (UTC) (envelope-from riggs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 95ED723505; Sat, 24 Feb 2018 08:54:57 +0000 (UTC) (envelope-from riggs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1O8svFq027353; Sat, 24 Feb 2018 08:54:57 GMT (envelope-from riggs@FreeBSD.org) Received: (from riggs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1O8sv0B027351; Sat, 24 Feb 2018 08:54:57 GMT (envelope-from riggs@FreeBSD.org) Message-Id: <201802240854.w1O8sv0B027351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: riggs set sender to riggs@FreeBSD.org using -f From: Thomas Zander Date: Sat, 24 Feb 2018 08:54:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r462776 - in head/devel/cvs: . files X-SVN-Group: ports-head X-SVN-Commit-Author: riggs X-SVN-Commit-Paths: in head/devel/cvs: . files X-SVN-Commit-Revision: 462776 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2018 08:54:58 -0000 Author: riggs Date: Sat Feb 24 08:54:57 2018 New Revision: 462776 URL: https://svnweb.freebsd.org/changeset/ports/462776 Log: Fix ssh injection vulnerability from CVE-2017-12836 Details: - Adopt patch from debian, documented in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871810#10 PR: 226088 Submitted by: fk@fabiankeil.de MFH: 2018Q1 Security: CVE-2017-12836 Added: head/devel/cvs/files/patch-src-client.c (contents, props changed) Modified: head/devel/cvs/Makefile Modified: head/devel/cvs/Makefile ============================================================================== --- head/devel/cvs/Makefile Sat Feb 24 08:52:27 2018 (r462775) +++ head/devel/cvs/Makefile Sat Feb 24 08:54:57 2018 (r462776) @@ -2,7 +2,7 @@ PORTNAME= cvs PORTVERSION= 1.20120905 -PORTREVISION?= 4 +PORTREVISION?= 5 CATEGORIES= devel MASTER_SITES= LOCAL/eadler Added: head/devel/cvs/files/patch-src-client.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/cvs/files/patch-src-client.c Sat Feb 24 08:54:57 2018 (r462776) @@ -0,0 +1,55 @@ +From 9c448da8bb5f592ddcd2d980d01d81305f920f78 Mon Sep 17 00:00:00 2001 +From: Fabian Keil +Date: Mon, 21 Aug 2017 10:49:05 +0200 +Subject: [PATCH] Add fix for CVE-2017-12836 + +Based on a patch by Thorsten Glaser: +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871810#10 + +The patched file had to be changed and in the first +chunk the size of rsh_argv has been extended to 16 +to match Debian's upstream version. +--- + cvs/src/client.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git cvs/src/client.c cvs/src/client.c +index c9fe170..09771ce 100644 +--- src/client.c ++++ src/client.c +@@ -4736,9 +4736,10 @@ start_rsh_server (root, to_server, from_server) + char *cvs_rsh; + char *cvs_server = getenv ("CVS_SERVER"); + int i = 0; +- /* This needs to fit "rsh", "-b", "-l", "USER", "host", +- "cmd (w/ args)", and NULL. We leave some room to grow. */ +- char *rsh_argv[10]; ++ /* This needs to fit "rsh", "-b", "-l", "USER", "-p", port, ++ "--", "host", "cvs", "-R", "server", and NULL. ++ We leave some room to grow. */ ++ char *rsh_argv[16]; + + if (root->method == extssh_method) + cvs_rsh = env_cvs_ssh ? env_cvs_ssh : SSH_DFLT; +@@ -4763,6 +4764,9 @@ start_rsh_server (root, to_server, from_server) + rsh_argv[i++] = root->username; + } + ++ /* Only non-option arguments from here. (CVE-2017-12836) */ ++ rsh_argv[i++] = "--"; ++ + rsh_argv[i++] = root->hostname; + rsh_argv[i++] = cvs_server; + rsh_argv[i++] = "server"; +@@ -4841,6 +4845,8 @@ start_rsh_server (root, to_server, from_server) + *p++ = root->username; + } + ++ *p++ = "--"; ++ + *p++ = root->hostname; + *p++ = command; + *p++ = NULL; +-- +2.14.1 +