From owner-svn-ports-branches@freebsd.org Wed May 4 15:19:19 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 A603BB2D785; Wed, 4 May 2016 15:19:19 +0000 (UTC) (envelope-from vanilla@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 6A2841AF5; Wed, 4 May 2016 15:19:19 +0000 (UTC) (envelope-from vanilla@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u44FJI8o019880; Wed, 4 May 2016 15:19:18 GMT (envelope-from vanilla@FreeBSD.org) Received: (from vanilla@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u44FJIaR019878; Wed, 4 May 2016 15:19:18 GMT (envelope-from vanilla@FreeBSD.org) Message-Id: <201605041519.u44FJIaR019878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vanilla set sender to vanilla@FreeBSD.org using -f From: "Vanilla I. Shu" Date: Wed, 4 May 2016 15:19:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r414604 - in branches/2016Q2/devel/jansson: . 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: Wed, 04 May 2016 15:19:19 -0000 Author: vanilla Date: Wed May 4 15:19:18 2016 New Revision: 414604 URL: https://svnweb.freebsd.org/changeset/ports/414604 Log: MFH: r414586 Fix CVE-2016-4425. PR: 209219/209257 Submitted by: junovitch@ / pkubaj@anongoth.pl Approved by: ports-secteam (junovitch) Added: branches/2016Q2/devel/jansson/files/patch-CVE-2016-4425 - copied unchanged from r414586, head/devel/jansson/files/patch-CVE-2016-4425 Modified: branches/2016Q2/devel/jansson/Makefile Directory Properties: branches/2016Q2/ (props changed) Modified: branches/2016Q2/devel/jansson/Makefile ============================================================================== --- branches/2016Q2/devel/jansson/Makefile Wed May 4 14:46:03 2016 (r414603) +++ branches/2016Q2/devel/jansson/Makefile Wed May 4 15:19:18 2016 (r414604) @@ -3,7 +3,7 @@ PORTNAME= jansson PORTVERSION= 2.7 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= http://www.digip.org/jansson/releases/ @@ -17,5 +17,7 @@ USES= cpe pathfix pkgconfig gmake tar:b USE_LDCONFIG= yes GNU_CONFIGURE= yes CPE_VENDOR= jansson_project +INSTALL_TARGET= install-strip +TEST_TARGET= check .include Copied: branches/2016Q2/devel/jansson/files/patch-CVE-2016-4425 (from r414586, head/devel/jansson/files/patch-CVE-2016-4425) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2016Q2/devel/jansson/files/patch-CVE-2016-4425 Wed May 4 15:19:18 2016 (r414604, copy of r414586, head/devel/jansson/files/patch-CVE-2016-4425) @@ -0,0 +1,43 @@ +--- src/jansson_config.h.in.orig 2016-05-04 11:43:48.386196000 +0800 ++++ src/jansson_config.h.in 2016-05-04 11:44:21.204996000 +0800 +@@ -36,4 +36,8 @@ + otherwise to 0. */ + #define JSON_HAVE_LOCALECONV @json_have_localeconv@ + ++/* Maximum recursion depth for parsing JSON input. ++ * This limits the depth of e.g. array-within-array constructions. */ ++#define JSON_PARSER_MAX_DEPTH 2048 ++ + #endif +--- src/load.c.orig 2016-05-04 11:44:34.356957000 +0800 ++++ src/load.c 2016-05-04 11:46:44.547307000 +0800 +@@ -61,6 +61,7 @@ typedef struct { + typedef struct { + stream_t stream; + strbuffer_t saved_text; ++ size_t depth; + int token; + union { + struct { +@@ -800,6 +801,12 @@ static json_t *parse_value(lex_t *lex, s + json_t *json; + double value; + ++ lex->depth++; ++ if(lex->depth > JSON_PARSER_MAX_DEPTH) { ++ error_set(error, lex, "maximum parsing depth reached"); ++ return NULL; ++ } ++ + switch(lex->token) { + case TOKEN_STRING: { + const char *value = lex->value.string.val; +@@ -877,6 +884,8 @@ static json_t *parse_json(lex_t *lex, si + { + json_t *result; + ++ lex->depth = 0; ++ + lex_scan(lex, error); + if(!(flags & JSON_DECODE_ANY)) { + if(lex->token != '[' && lex->token != '{') {