From owner-svn-ports-branches@freebsd.org Thu Mar 8 18:34:27 2018 Return-Path: Delivered-To: svn-ports-branches@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 A8892F4A96A; Thu, 8 Mar 2018 18:34:27 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DEF669AE4; Thu, 8 Mar 2018 18:34:27 +0000 (UTC) (envelope-from jbeich@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 3BFE614985; Thu, 8 Mar 2018 18:34:27 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w28IYRMs096759; Thu, 8 Mar 2018 18:34:27 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w28IYQdv096757; Thu, 8 Mar 2018 18:34:26 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201803081834.w28IYQdv096757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Thu, 8 Mar 2018 18:34:26 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r463910 - in branches/2018Q1/multimedia/libvpx: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in branches/2018Q1/multimedia/libvpx: . files X-SVN-Commit-Revision: 463910 X-SVN-Commit-Repository: ports 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.25 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, 08 Mar 2018 18:34:28 -0000 Author: jbeich Date: Thu Mar 8 18:34:26 2018 New Revision: 463910 URL: https://svnweb.freebsd.org/changeset/ports/463910 Log: multimedia/libvpx: backport vpx_image fix (direct commit) Reported by: Debian Obtained from: upstream (libvpx 1.7.0) Approved by: ports-secteam blanket Added: branches/2018Q1/multimedia/libvpx/files/patch-CVE-2017-13194 (contents, props changed) Modified: branches/2018Q1/multimedia/libvpx/Makefile Modified: branches/2018Q1/multimedia/libvpx/Makefile ============================================================================== --- branches/2018Q1/multimedia/libvpx/Makefile Thu Mar 8 17:21:23 2018 (r463909) +++ branches/2018Q1/multimedia/libvpx/Makefile Thu Mar 8 18:34:26 2018 (r463910) @@ -4,7 +4,7 @@ PORTNAME= libvpx DISTVERSIONPREFIX= v DISTVERSION= 1.6.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= multimedia PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ Added: branches/2018Q1/multimedia/libvpx/files/patch-CVE-2017-13194 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2018Q1/multimedia/libvpx/files/patch-CVE-2017-13194 Thu Mar 8 18:34:26 2018 (r463910) @@ -0,0 +1,43 @@ +https://chromium.googlesource.com/webm/libvpx/+/5a40c8fde11b%5E!/ +https://chromium.googlesource.com/webm/libvpx/+/33c598990bc7%5E!/ + +--- vpx/src/vpx_image.c.orig 2017-01-12 20:27:27 UTC ++++ vpx/src/vpx_image.c +@@ -88,11 +88,10 @@ static vpx_image_t *img_alloc_helper(vpx_image_t *img, + default: ycs = 0; break; + } + +- /* Calculate storage sizes given the chroma subsampling */ +- align = (1 << xcs) - 1; +- w = (d_w + align) & ~align; +- align = (1 << ycs) - 1; +- h = (d_h + align) & ~align; ++ /* Calculate storage sizes. If the buffer was allocated externally, the width ++ * and height shouldn't be adjusted. */ ++ w = d_w; ++ h = d_h; + s = (fmt & VPX_IMG_FMT_PLANAR) ? w : bps * w / 8; + s = (s + stride_align - 1) & ~(stride_align - 1); + stride_in_bytes = (fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? s * 2 : s; +@@ -111,9 +110,18 @@ static vpx_image_t *img_alloc_helper(vpx_image_t *img, + img->img_data = img_data; + + if (!img_data) { +- const uint64_t alloc_size = (fmt & VPX_IMG_FMT_PLANAR) +- ? (uint64_t)h * s * bps / 8 +- : (uint64_t)h * s; ++ uint64_t alloc_size; ++ /* Calculate storage sizes given the chroma subsampling */ ++ align = (1 << xcs) - 1; ++ w = (d_w + align) & ~align; ++ align = (1 << ycs) - 1; ++ h = (d_h + align) & ~align; ++ ++ s = (fmt & VPX_IMG_FMT_PLANAR) ? w : bps * w / 8; ++ s = (s + stride_align - 1) & ~(stride_align - 1); ++ stride_in_bytes = (fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? s * 2 : s; ++ alloc_size = (fmt & VPX_IMG_FMT_PLANAR) ? (uint64_t)h * s * bps / 8 ++ : (uint64_t)h * s; + + if (alloc_size != (size_t)alloc_size) goto fail; +