From owner-svn-ports-all@freebsd.org Mon May 15 10:16:27 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 369E1D6D32D; Mon, 15 May 2017 10:16:27 +0000 (UTC) (envelope-from martymac@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 mx1.freebsd.org (Postfix) with ESMTPS id E25FEF8C; Mon, 15 May 2017 10:16:26 +0000 (UTC) (envelope-from martymac@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FAGPuk049452; Mon, 15 May 2017 10:16:25 GMT (envelope-from martymac@FreeBSD.org) Received: (from martymac@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FAGPVl049450; Mon, 15 May 2017 10:16:25 GMT (envelope-from martymac@FreeBSD.org) Message-Id: <201705151016.v4FAGPVl049450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: martymac set sender to martymac@FreeBSD.org using -f From: Ganael LAPLANCHE Date: Mon, 15 May 2017 10:16:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r440915 - in head/games/flightgear: . files X-SVN-Group: ports-head 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.23 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: Mon, 15 May 2017 10:16:27 -0000 Author: martymac Date: Mon May 15 10:16:25 2017 New Revision: 440915 URL: https://svnweb.freebsd.org/changeset/ports/440915 Log: Backport security fix faf872e7 (CVE-2017-8921) Reported by: Florent Rougon Security: https://sourceforge.net/p/flightgear/flightgear/ci/faf872e7 Added: head/games/flightgear/files/patch-src-Autopilot-route_mgr.cxx (contents, props changed) Modified: head/games/flightgear/Makefile Modified: head/games/flightgear/Makefile ============================================================================== --- head/games/flightgear/Makefile Mon May 15 10:01:40 2017 (r440914) +++ head/games/flightgear/Makefile Mon May 15 10:16:25 2017 (r440915) @@ -3,7 +3,7 @@ PORTNAME= flightgear PORTVERSION= 2017.1.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= games MASTER_SITES= SF/flightgear/release-${PORTVERSION:R} Added: head/games/flightgear/files/patch-src-Autopilot-route_mgr.cxx ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/flightgear/files/patch-src-Autopilot-route_mgr.cxx Mon May 15 10:16:25 2017 (r440915) @@ -0,0 +1,28 @@ +Fix for CVE-2017-8921 (backport of commit faf872e7) + +--- src/Autopilot/route_mgr.cxx.orig ++++ src/Autopilot/route_mgr.cxx +@@ -74,7 +74,22 @@ static bool commandSaveFlightPlan(const SGPropertyNode* arg) + { + FGRouteMgr* self = (FGRouteMgr*) globals->get_subsystem("route-manager"); + SGPath path = SGPath::fromUtf8(arg->getStringValue("path")); +- return self->saveRoute(path); ++ SGPath authorizedPath = fgValidatePath(path, true /* write */); ++ ++ if (!authorizedPath.isNull()) { ++ return self->saveRoute(authorizedPath); ++ } else { ++ std::string msg = ++ "The route manager was asked to write the flightplan to '" + ++ path.utf8Str() + "', but this path is not authorized for writing. " + ++ "Please choose another location, for instance in the $FG_HOME/Export " ++ "folder (" + (globals->get_fg_home() / "Export").utf8Str() + ")."; ++ ++ SG_LOG(SG_AUTOPILOT, SG_ALERT, msg); ++ modalMessageBox("FlightGear", "Unable to write to the specified file", ++ msg); ++ return false; ++ } + } + + static bool commandActivateFlightPlan(const SGPropertyNode* arg)