From owner-svn-ports-branches@freebsd.org Thu Jun 30 22:36:54 2016 Return-Path: Delivered-To: svn-ports-branches@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 A3834B87FAD; Thu, 30 Jun 2016 22:36:54 +0000 (UTC) (envelope-from feld@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 5BCD32AC6; Thu, 30 Jun 2016 22:36:54 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5UMarrd062906; Thu, 30 Jun 2016 22:36:53 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5UMarQL062904; Thu, 30 Jun 2016 22:36:53 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201606302236.u5UMarQL062904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Thu, 30 Jun 2016 22:36:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r417848 - in branches/2016Q2/textproc/expat2: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jun 2016 22:36:54 -0000 Author: feld Date: Thu Jun 30 22:36:53 2016 New Revision: 417848 URL: https://svnweb.freebsd.org/changeset/ports/417848 Log: MFH: r417847 textproc/expat2: Patch vulnerability This patch resolves a vulnerability that may still exist due to compiler optimizations. The previous patches for CVE-2015-1283 and CVE-2015-2716 may not work as intended in some situations. Security: CVE-2016-4472 Approved by: ports-secteam (with hat) Added: branches/2016Q2/textproc/expat2/files/patch-CVE-2016-4472 - copied unchanged from r417847, head/textproc/expat2/files/patch-CVE-2016-4472 Modified: branches/2016Q2/textproc/expat2/Makefile Directory Properties: branches/2016Q2/ (props changed) Modified: branches/2016Q2/textproc/expat2/Makefile ============================================================================== --- branches/2016Q2/textproc/expat2/Makefile Thu Jun 30 22:36:05 2016 (r417847) +++ branches/2016Q2/textproc/expat2/Makefile Thu Jun 30 22:36:53 2016 (r417848) @@ -3,7 +3,7 @@ PORTNAME= expat PORTVERSION= 2.1.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= textproc MASTER_SITES= SF Copied: branches/2016Q2/textproc/expat2/files/patch-CVE-2016-4472 (from r417847, head/textproc/expat2/files/patch-CVE-2016-4472) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q2/textproc/expat2/files/patch-CVE-2016-4472 Thu Jun 30 22:36:53 2016 (r417848, copy of r417847, head/textproc/expat2/files/patch-CVE-2016-4472) @@ -0,0 +1,26 @@ + expat/CMakeLists.txt | 3 +++ + expat/lib/xmlparse.c | 48 +++++++++++++++++++++++++++++++++++++++++------- + 2 files changed, 44 insertions(+), 7 deletions(-) + +--- lib/xmlparse.c.orig 2016-06-30 22:23:11 UTC ++++ lib/xmlparse.c +@@ -1693,7 +1693,8 @@ XML_GetBuffer(XML_Parser parser, int len + } + + if (len > bufferLim - bufferEnd) { +- int neededSize = len + (int)(bufferEnd - bufferPtr); ++ /* Do not invoke signed arithmetic overflow: */ ++ int neededSize = (int) ((unsigned)len + (unsigned)(bufferEnd - bufferPtr)); + if (neededSize < 0) { + errorCode = XML_ERROR_NO_MEMORY; + return NULL; +@@ -1725,7 +1726,8 @@ XML_GetBuffer(XML_Parser parser, int len + if (bufferSize == 0) + bufferSize = INIT_BUFFER_SIZE; + do { +- bufferSize *= 2; ++ /* Do not invoke signed arithmetic overflow: */ ++ bufferSize = (int) (2U * (unsigned) bufferSize); + } while (bufferSize < neededSize && bufferSize > 0); + if (bufferSize <= 0) { + errorCode = XML_ERROR_NO_MEMORY;