From patchwork Thu Feb 4 12:55:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 3861 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4DWdnb226fz3wp0 for ; Thu, 4 Feb 2021 12:55:31 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4DWdnb0Bv6z3g4; Thu, 4 Feb 2021 12:55:31 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4DWdnZ6QJ6z2xZx; Thu, 4 Feb 2021 12:55:30 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4DWdnY4hGtz2xFP for ; Thu, 4 Feb 2021 12:55:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4DWdnY1LXDz1Tq; Thu, 4 Feb 2021 12:55:29 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1612443329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WCc3gIbFJCiYcdnXA+kErvco2E/EkV4PnF/Dfir+MK4=; b=w0R1SXKmWaXi0RiNX32IdMvEZ7SWJhffMJfnou7RZ6w57FuMpTChYkB8OBpp7JcwA7Ps1y t2MmSDmQO1BJKiDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1612443329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WCc3gIbFJCiYcdnXA+kErvco2E/EkV4PnF/Dfir+MK4=; b=Ui3zLJtEePw6PCppYLExxy6Xx1zNESmQBi4MFiXqwduK41QHFU/UvPpVMkwE58vavEWwvv O7P1dKx+1v5J65GWCuUOLNB0Bf+kB5bGrw6mthqU83ju3ZqhSjbMud8Xcv17lbsjVg3VCs xYUQznq9l88YYUpVyPwWE9AIw+AC/u/3TEptPqw0XhAuavK7IsJN2S4f0XqpSBwX/4mWxj qBRgArGnrM5RdriSvrfxAr1P5TZZ0MwMMYx6F3FMRj4jHOY7OIFrsM0xVRM4vyaFYTIrEv hNpqz1luGZeN9pCcncYa0e+FA/eV1iHanMR+WYfUTny5z9uWM6LRa0EF1J1ywA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 1/2] freetype: Update to 2.10.4 Date: Thu, 4 Feb 2021 13:55:27 +0100 Message-Id: <20210204125527.3970932-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Update freetype from 2.10.2 to 2.10.4 - A heap buffer overflow has been found in the handling of embedded PNG bitmaps, introduced in FreeType version 2.6. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15999 If you use option FT_CONFIG_OPTION_USE_PNG you should upgrade immediately. - Version 2.10.3 and later breaks the build of ghostscript, due to ghostscripts use of a withdrawn freetype macro that wasn't for external usage. A patch has been created to fix this and is included in the connected ghostcript patch. - Updated rootfile - Changelog for version 2.10.3 release is too long to add here. This can be found in the changelog file in the tarball Signed-off-by: Adolf Belka Reviewed-by: Peter Müller --- config/rootfiles/common/freetype | 10 ++++------ lfs/freetype | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/config/rootfiles/common/freetype b/config/rootfiles/common/freetype index 4d72ec357..194253601 100644 --- a/config/rootfiles/common/freetype +++ b/config/rootfiles/common/freetype @@ -7,15 +7,16 @@ #usr/include/freetype2/freetype/config/ftmodule.h #usr/include/freetype2/freetype/config/ftoption.h #usr/include/freetype2/freetype/config/ftstdlib.h +#usr/include/freetype2/freetype/config/integer-types.h +#usr/include/freetype2/freetype/config/mac-support.h +#usr/include/freetype2/freetype/config/public-macros.h #usr/include/freetype2/freetype/freetype.h #usr/include/freetype2/freetype/ftadvanc.h -#usr/include/freetype2/freetype/ftautoh.h #usr/include/freetype2/freetype/ftbbox.h #usr/include/freetype2/freetype/ftbdf.h #usr/include/freetype2/freetype/ftbitmap.h #usr/include/freetype2/freetype/ftbzip2.h #usr/include/freetype2/freetype/ftcache.h -#usr/include/freetype2/freetype/ftcffdrv.h #usr/include/freetype2/freetype/ftchapters.h #usr/include/freetype2/freetype/ftcid.h #usr/include/freetype2/freetype/ftcolor.h @@ -47,20 +48,17 @@ #usr/include/freetype2/freetype/ftsynth.h #usr/include/freetype2/freetype/ftsystem.h #usr/include/freetype2/freetype/fttrigon.h -#usr/include/freetype2/freetype/ftttdrv.h #usr/include/freetype2/freetype/fttypes.h #usr/include/freetype2/freetype/ftwinfnt.h #usr/include/freetype2/freetype/t1tables.h #usr/include/freetype2/freetype/ttnameid.h #usr/include/freetype2/freetype/tttables.h #usr/include/freetype2/freetype/tttags.h -#usr/include/freetype2/freetype/ttunpat.h #usr/include/freetype2/ft2build.h -#usr/lib/libfreetype.a #usr/lib/libfreetype.la #usr/lib/libfreetype.so usr/lib/libfreetype.so.6 -usr/lib/libfreetype.so.6.17.2 +usr/lib/libfreetype.so.6.17.4 #usr/lib/pkgconfig/freetype2.pc #usr/share/aclocal/freetype2.m4 #usr/share/man/man1/freetype-config.1 diff --git a/lfs/freetype b/lfs/freetype index 4106d22ee..8a93ad0e9 100644 --- a/lfs/freetype +++ b/lfs/freetype @@ -24,7 +24,7 @@ include Config -VER = 2.10.2 +VER = 2.10.4 THISAPP = freetype-$(VER) DL_FILE = $(THISAPP).tar.xz @@ -40,7 +40,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = 7c0d5a39f232d7eb9f9d7da76bf08074 +$(DL_FILE)_MD5 = 0e6c0e9b218be3ba3e26e1d23b1c80dd install : $(TARGET) From patchwork Thu Feb 4 12:55:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 3862 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4DWdpS3rvyz3wp0 for ; Thu, 4 Feb 2021 12:56:16 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4DWdpS1Slnz18m; Thu, 4 Feb 2021 12:56:16 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4DWdpS0Jn7z2xZr; Thu, 4 Feb 2021 12:56:16 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4DWdpQ4bkNz2xZr for ; Thu, 4 Feb 2021 12:56:14 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4DWdpQ1cFTz10d; Thu, 4 Feb 2021 12:56:14 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1612443374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HyszCx8Nwbyn7ESOhjE1ImETfFYwA2vq3qJEkwpb3Nc=; b=4gwNxO9WnAgI95bKuNeRRijRo4LuIOe2RpNBPrGt4q8Z64gsCfptjn6Cmja7nbqecJshDz GDgWEW0B2GSO3UBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1612443374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HyszCx8Nwbyn7ESOhjE1ImETfFYwA2vq3qJEkwpb3Nc=; b=GTacZMeYWlO6GYUxBNLyshLtboAxrecanvP3SmKijhDhAJUMomgZkiGE3FPVp3l+LEsOzo RDcO/8K2iF3okoYB01GCMG/1OvHHb6glAr6yAAj7vydcD223WH74mUx6zRVSZeWdMKxX3/ fuhEvQQm0JmF7/YBOzA2eN64nzQcF7LHH/zcisjayMpYtvTMysRNy2CMROQYVXzBxUCnnz qSscKPg6T7leQsUvJv+fA8ygaQWKT0y1U9KZPJQHdDoyMXzS1iQsgPjnqSafSUgfAmsUW3 9/MLKyuqkIjwlWnonQXCQwus0susxYOGoEEM29zmzJ139Z/ICvjQJKl9d6q0Cg== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/2] ghostscript: Addition of patch to fix freetype problem Date: Thu, 4 Feb 2021 13:55:41 +0100 Message-Id: <20210204125541.3970996-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" -Addition of patch to ghoscript as freetype version 2.10.3 and later have withdrawn a macro that ghostscript used. Confirmed that without the patch ghostscript failed to build due to the lack of the FT_CALLBACK_DEF() macro. The fix is to explicitly declare the callbacks file static. - Update lfs to apply patch - Add patch to src/patches Signed-off-by: Adolf Belka Reviewed-by: Peter Müller --- lfs/ghostscript | 3 +- ...K_DEF-with-Freetype-2.10.3-and-later.patch | 50 +++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 src/patches/ghostscript-drop-use-of-FT_CALLBACK_DEF-with-Freetype-2.10.3-and-later.patch diff --git a/lfs/ghostscript b/lfs/ghostscript index edf019f5d..696f95b29 100644 --- a/lfs/ghostscript +++ b/lfs/ghostscript @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = ghostscript -PAK_VER = 6 +PAK_VER = 7 DEPS = cups dbus libtiff @@ -83,6 +83,7 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ghostscript-drop-use-of-FT_CALLBACK_DEF-with-Freetype-2.10.3-and-later.patch cd $(DIR_APP) && rm -rf expat freetype icclib jasper jpeg jpegxr \ lcms lcms2 libpng openjpeg zlib cups/libs cd $(DIR_APP) && \ diff --git a/src/patches/ghostscript-drop-use-of-FT_CALLBACK_DEF-with-Freetype-2.10.3-and-later.patch b/src/patches/ghostscript-drop-use-of-FT_CALLBACK_DEF-with-Freetype-2.10.3-and-later.patch new file mode 100644 index 000000000..78014667d --- /dev/null +++ b/src/patches/ghostscript-drop-use-of-FT_CALLBACK_DEF-with-Freetype-2.10.3-and-later.patch @@ -0,0 +1,50 @@ +From 41ef9a0bc36b9db7115fbe9623f989bfb47bbade Mon Sep 17 00:00:00 2001 +From: Chris Liddell +Date: Tue, 20 Oct 2020 09:49:45 +0100 +Subject: [PATCH] Bug 702985: drop use of FT_CALLBACK_DEF() def + +From 2.10.3, Freetype disappeared the FT_CALLBACK_DEF() macro, which is what +we used when defining our callbacks from Freetype. + +No guidance forthcoming from the Freetype developer who made those changes, +so change to explicitly declaring the callbacks file static. + +Should fix the reported build failures. +--- + base/fapi_ft.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/base/fapi_ft.c b/base/fapi_ft.c +index 65fa6dcf4..21aef2f06 100644 +--- a/base/fapi_ft.c ++++ b/base/fapi_ft.c +@@ -125,7 +125,7 @@ static void + delete_inc_int_info(gs_fapi_server * a_server, + FT_IncrementalRec * a_inc_int_info); + +-FT_CALLBACK_DEF(void *) ++static void * + FF_alloc(FT_Memory memory, long size) + { + gs_memory_t *mem = (gs_memory_t *) memory->user; +@@ -133,7 +133,7 @@ FF_alloc(FT_Memory memory, long size) + return (gs_malloc(mem, size, 1, "FF_alloc")); + } + +-FT_CALLBACK_DEF(void *) ++static void * + FF_realloc(FT_Memory memory, long cur_size, long new_size, void *block) + { + gs_memory_t *mem = (gs_memory_t *) memory->user; +@@ -153,7 +153,7 @@ FT_CALLBACK_DEF(void *) + return (tmp); + } + +-FT_CALLBACK_DEF(void) ++static void + FF_free(FT_Memory memory, void *block) + { + gs_memory_t *mem = (gs_memory_t *) memory->user; +-- +2.17.1 +