From owner-svn-ports-all@freebsd.org Sun Mar 10 17:50:41 2019 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 04827153B347; Sun, 10 Mar 2019 17:50:41 +0000 (UTC) (envelope-from girgen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9870D86B53; Sun, 10 Mar 2019 17:50:40 +0000 (UTC) (envelope-from girgen@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 8E27626879; Sun, 10 Mar 2019 17:50:40 +0000 (UTC) (envelope-from girgen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2AHoe5N051438; Sun, 10 Mar 2019 17:50:40 GMT (envelope-from girgen@FreeBSD.org) Received: (from girgen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2AHoeEg051436; Sun, 10 Mar 2019 17:50:40 GMT (envelope-from girgen@FreeBSD.org) Message-Id: <201903101750.x2AHoeEg051436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: girgen set sender to girgen@FreeBSD.org using -f From: Palle Girgensohn Date: Sun, 10 Mar 2019 17:50:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r495308 - in head/devel/xmltooling: . files X-SVN-Group: ports-head X-SVN-Commit-Author: girgen X-SVN-Commit-Paths: in head/devel/xmltooling: . files X-SVN-Commit-Revision: 495308 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9870D86B53 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 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: Sun, 10 Mar 2019 17:50:41 -0000 Author: girgen Date: Sun Mar 10 17:50:39 2019 New Revision: 495308 URL: https://svnweb.freebsd.org/changeset/ports/495308 Log: Pull upstreams fix from upcoming release This fixes a DoS scenario. The commit message from the original commit is CPPXT - Crash due to uncaught DOMException Added: head/devel/xmltooling/files/patch-xmltooling_util_ParserPool.cpp (contents, props changed) Modified: head/devel/xmltooling/Makefile Modified: head/devel/xmltooling/Makefile ============================================================================== --- head/devel/xmltooling/Makefile Sun Mar 10 17:43:52 2019 (r495307) +++ head/devel/xmltooling/Makefile Sun Mar 10 17:50:39 2019 (r495308) @@ -3,6 +3,7 @@ PORTNAME= xmltooling PORTVERSION= 3.0.3 +PORTREVISION= 1 CATEGORIES= devel security MASTER_SITES= http://shibboleth.net/downloads/c++-opensaml/3.0.0/ Added: head/devel/xmltooling/files/patch-xmltooling_util_ParserPool.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/xmltooling/files/patch-xmltooling_util_ParserPool.cpp Sun Mar 10 17:50:39 2019 (r495308) @@ -0,0 +1,43 @@ +commit af27c422f551e16989ff6f1722d83614c8550eb5 +Author: Scott Cantor +Date: Wed Mar 6 21:14:13 2019 -0500 + + CPPXT - Crash due to uncaught DOMException + + https://issues.shibboleth.net/jira/browse/CPPXT-143 + +diff --git a/xmltooling/util/ParserPool.cpp b/xmltooling/util/ParserPool.cpp +index 5d96b66..da23846 100644 +--- xmltooling/util/ParserPool.cpp ++++ xmltooling/util/ParserPool.cpp +@@ -148,14 +148,28 @@ DOMDocument* ParserPool::parse(DOMLSInput& domsrc) + checkinBuilder(janitor.release()); + return doc; + } +- catch (XMLException& ex) { ++ catch (const DOMException& ex) { ++ parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)nullptr); ++ parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true); ++ checkinBuilder(janitor.release()); ++ auto_ptr_char temp(ex.getMessage()); ++ throw XMLParserException(string("DOM error during parsing: ") + (temp.get() ? temp.get() : "no message")); ++ } ++ catch (const SAXException& ex) { ++ parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)nullptr); ++ parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true); ++ checkinBuilder(janitor.release()); ++ auto_ptr_char temp(ex.getMessage()); ++ throw XMLParserException(string("SAX error during parsing: ") + (temp.get() ? temp.get() : "no message")); ++ } ++ catch (const XMLException& ex) { + parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)nullptr); + parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true); + checkinBuilder(janitor.release()); + auto_ptr_char temp(ex.getMessage()); + throw XMLParserException(string("Xerces error during parsing: ") + (temp.get() ? temp.get() : "no message")); + } +- catch (XMLToolingException&) { ++ catch (const XMLToolingException&) { + parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)nullptr); + parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true); + checkinBuilder(janitor.release());