From owner-svn-ports-head@freebsd.org Sun Oct 16 18:41:22 2016 Return-Path: Delivered-To: svn-ports-head@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 A5573C1448A; Sun, 16 Oct 2016 18:41:22 +0000 (UTC) (envelope-from dinoex@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 5D7B410FB; Sun, 16 Oct 2016 18:41:22 +0000 (UTC) (envelope-from dinoex@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9GIfLjf016138; Sun, 16 Oct 2016 18:41:21 GMT (envelope-from dinoex@FreeBSD.org) Received: (from dinoex@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9GIfLoT016136; Sun, 16 Oct 2016 18:41:21 GMT (envelope-from dinoex@FreeBSD.org) Message-Id: <201610161841.u9GIfLoT016136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dinoex set sender to dinoex@FreeBSD.org using -f From: Dirk Meyer Date: Sun, 16 Oct 2016 18:41:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r424078 - in head/graphics/gd: . 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2016 18:41:22 -0000 Author: dinoex Date: Sun Oct 16 18:41:21 2016 New Revision: 424078 URL: https://svnweb.freebsd.org/changeset/ports/424078 Log: - fix option WEBP - make option WEBP default PR: 211368 - Security patch, port was not vulnerable Security: https://github.com/libgd/libgd/issues/308 Security: http://seclists.org/oss-sec/2016/q3/626 Security: CVE-2016-7568 PR: 213020 Added: head/graphics/gd/files/patch-gd_webp.c (contents, props changed) Modified: head/graphics/gd/Makefile Modified: head/graphics/gd/Makefile ============================================================================== --- head/graphics/gd/Makefile Sun Oct 16 18:35:02 2016 (r424077) +++ head/graphics/gd/Makefile Sun Oct 16 18:41:21 2016 (r424078) @@ -3,7 +3,7 @@ PORTNAME= libgd PORTVERSION= 2.2.3 -PORTREVISION?= 0 +PORTREVISION?= 1 PORTEPOCH= 1 CATEGORIES+= graphics MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/gd-${PORTVERSION}/ @@ -25,7 +25,7 @@ GNU_CONFIGURE= yes USE_LDCONFIG= yes OPTIONS_DEFINE= FONTCONFIG ICONV XPM WEBP -OPTIONS_DEFAULT=FONTCONFIG +OPTIONS_DEFAULT=FONTCONFIG WEBP NO_OPTIONS_SORT=yes FONTCONFIG_LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig FONTCONFIG_CONFIGURE_OFF= --with-fontconfig=no @@ -36,7 +36,6 @@ XPM_CONFIGURE_ON= --with-x XPM_CONFIGURE_OFF= --with-xpm=no WEBP_LIB_DEPENDS= libwebp.so:graphics/webp WEBP_CONFIGURE_OFF= --without-webp -WEBP_BROKEN= circular dependencies .include Added: head/graphics/gd/files/patch-gd_webp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/gd/files/patch-gd_webp.c Sun Oct 16 18:41:21 2016 (r424078) @@ -0,0 +1,27 @@ +LibGD Issue: https://github.com/libgd/libgd/issues/308 +Commit: https://github.com/libgd/libgd/commit/40bec0f38f50e8510f5bb71a82f516d46facde03 + +Fix integer overflow in gdImageWebpCtx + +Integer overflow can be happened in expression gdImageSX(im) * 4 * +gdImageSY(im). It could lead to heap buffer overflow in the following +code. This issue has been reported to the PHP Bug Tracking System. The +proof-of-concept file will be supplied some days later. This issue was +discovered by Ke Liu of Tencent's Xuanwu LAB. +--- src/gd_webp.c.orig 2016-07-21 10:06:42.000000000 +0200 ++++ src/gd_webp.c 2016-10-16 20:27:17.150066000 +0200 +@@ -126,6 +126,14 @@ + quantization = 80; + } + ++ if (overflow2(gdImageSX(im), 4)) { ++ return; ++ } ++ ++ if (overflow2(gdImageSX(im) * 4, gdImageSY(im))) { ++ return; ++ } ++ + argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im)); + if (!argb) { + return;