From 94146ef889be2f4d1e68b3f130058ed8cbd7fca5 Mon Sep 17 00:00:00 2001 From: Rmys Date: Thu, 9 Aug 2018 18:38:49 +0300 Subject: [PATCH] office-misc:rebuild --- office/misc/libodfgen/pspec.xml | 9 +- office/misc/libofx/pspec.xml | 9 +- office/misc/libpagemaker/pspec.xml | 7 ++ office/misc/libvc/pspec.xml | 7 ++ office/misc/libvisio/pspec.xml | 7 ++ office/misc/mdbtools/pspec.xml | 7 ++ office/misc/mupdf/actions.py | 2 +- .../mupdf-1.12.0-consolidated_fixes-1.patch | 87 ++++++++++++++ .../files/mupdf-1.12.0-security_fix-1.patch | 108 ++++++++++++++++++ office/misc/mupdf/pspec.xml | 14 ++- 10 files changed, 253 insertions(+), 4 deletions(-) create mode 100644 office/misc/mupdf/files/mupdf-1.12.0-consolidated_fixes-1.patch create mode 100644 office/misc/mupdf/files/mupdf-1.12.0-security_fix-1.patch diff --git a/office/misc/libodfgen/pspec.xml b/office/misc/libodfgen/pspec.xml index 6492d0666b..23f3ad1978 100644 --- a/office/misc/libodfgen/pspec.xml +++ b/office/misc/libodfgen/pspec.xml @@ -10,7 +10,7 @@ library Library for generating documents Library for generating documents in Open Document Format - https://sourceforge.net/projects/libwpd/files/libodfgen/libodfgen-0.1.6/libodfgen-0.1.6.tar.xz + https://sourceforge.net/projects/libwpd/files/libodfgen/libodfgen-0.1.7/libodfgen-0.1.7.tar.xz boost-devel libwpd-devel @@ -50,6 +50,13 @@ + + 2018-08-09 + 0.1.7 + Rebuild. + Pisi Linux Community + admin@pisilinux.org + 2018-03-22 0.1.6 diff --git a/office/misc/libofx/pspec.xml b/office/misc/libofx/pspec.xml index 1ebdc21727..2823989443 100644 --- a/office/misc/libofx/pspec.xml +++ b/office/misc/libofx/pspec.xml @@ -13,7 +13,7 @@ library A library for supporting Open Financial Exchange (OFX) format libofx is a library designed to allow applications to very easily support OFX command responses, usually provided by financial institutions. - http://sourceforge.net/projects/libofx/files/libofx/0.9.10/libofx-0.9.10.tar.gz + https://sourceforge.net/projects/libofx/files/libofx/libofx-0.9.13.tar.gz opensp-devel @@ -59,6 +59,13 @@ + + 2018-08-09 + 0.9.13 + Rebuild with new toolchain + Pisi Linux Community + admin@pisilinux.org + 2017-04-04 0.9.10 diff --git a/office/misc/libpagemaker/pspec.xml b/office/misc/libpagemaker/pspec.xml index 416529685d..6cca4bd95b 100644 --- a/office/misc/libpagemaker/pspec.xml +++ b/office/misc/libpagemaker/pspec.xml @@ -46,6 +46,13 @@ + + 2018-08-09 + 0.0.4 + Rebuild. + Pisi Linux Community + admin@pisilinux.org + 2018-03-22 0.0.4 diff --git a/office/misc/libvc/pspec.xml b/office/misc/libvc/pspec.xml index e45d5f613d..9809c8823a 100644 --- a/office/misc/libvc/pspec.xml +++ b/office/misc/libvc/pspec.xml @@ -39,6 +39,13 @@ + + 2018-08-09 + 1.3.3 + Version Bump. + Pisi Linux Community + admin@pisilinux.org + 2018-02-11 1.3.3 diff --git a/office/misc/libvisio/pspec.xml b/office/misc/libvisio/pspec.xml index b9c360ac3a..91053470b2 100644 --- a/office/misc/libvisio/pspec.xml +++ b/office/misc/libvisio/pspec.xml @@ -57,6 +57,13 @@ + + 2018-08-09 + 0.1.6 + Rebuild. + Pisi Linux Community + admin@pisilinux.org + 2018-03-22 0.1.6 diff --git a/office/misc/mdbtools/pspec.xml b/office/misc/mdbtools/pspec.xml index efe760168a..70eabe3775 100644 --- a/office/misc/mdbtools/pspec.xml +++ b/office/misc/mdbtools/pspec.xml @@ -79,6 +79,13 @@ --> + + 2018-08-09 + 0.7.1 + Release Bump + Rebuild with new toolchain + admin@pisilinux.org + 2017-03-30 0.7.1 diff --git a/office/misc/mupdf/actions.py b/office/misc/mupdf/actions.py index 0167aa5211..2944b8ac5d 100644 --- a/office/misc/mupdf/actions.py +++ b/office/misc/mupdf/actions.py @@ -14,7 +14,7 @@ def build(): autotools.make("prefix=/usr") # remove bundled packages, use our system libraries - shelltools.system("rm -rf thirdparty/{curl,freeglut,freetype,harfbuzz,jbig2dec,libjpeg,openjpeg,zlib}") + shelltools.system("rm -rf thirdparty/{curl,freeglut,freetype,harfbuzz,jpeg,lcms2,libjpeg,openjpeg,zlib}") def install(): autotools.rawInstall("DESTDIR=%s prefix=/usr" % get.installDIR()) diff --git a/office/misc/mupdf/files/mupdf-1.12.0-consolidated_fixes-1.patch b/office/misc/mupdf/files/mupdf-1.12.0-consolidated_fixes-1.patch new file mode 100644 index 0000000000..6a4b0cf50b --- /dev/null +++ b/office/misc/mupdf/files/mupdf-1.12.0-consolidated_fixes-1.patch @@ -0,0 +1,87 @@ +Submitted By: Bruce Dubbs +Date: 2017-12-17 +Initial Package Version: 1.12.0 +Upstream Status: Not submitted +Origin: Arch Linux, rolled forward for openjpeg-2.3 +Description: Fixes for openjpeg-2.2 +Update: 2017-10-15 Change include directory to openjpeg-2.3 + +Consolidated patch for installing shared libraries. +Original patch by Ken Moffat + +diff -Naur mupdf-1.12.0-source.orig/Makefile mupdf-1.12.0-source/Makefile +--- mupdf-1.12.0-source.orig/Makefile 2017-12-13 08:00:30.000000000 -0600 ++++ mupdf-1.12.0-source/Makefile 2017-12-17 18:07:39.809057239 -0600 +@@ -14,7 +14,7 @@ + # Do not specify CFLAGS or LIBS on the make invocation line - specify + # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that + # set a variable that was set on the command line. +-CFLAGS += $(XCFLAGS) -Iinclude ++CFLAGS += $(XCFLAGS) -Iinclude -fPIC + LIBS += $(XLIBS) -lm + + LIBS += $(FREETYPE_LIBS) +@@ -312,9 +312,9 @@ + + # --- Library --- + +-MUPDF_LIB = $(OUT)/libmupdf.a +-THIRD_LIB = $(OUT)/libmupdfthird.a +-THREAD_LIB = $(OUT)/libmuthreads.a ++MUPDF_LIB = $(OUT)/libmupdf.so ++THIRD_LIB = $(OUT)/libmupdfthird.so ++THREAD_LIB = $(OUT)/libmuthreads.so + + MUPDF_OBJ := \ + $(FITZ_OBJ) \ +@@ -343,11 +343,14 @@ + + THREAD_OBJ := $(THREAD_OBJ) + +-$(MUPDF_LIB) : $(MUPDF_OBJ) ++$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) $(THREAD_LIB) ++ $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf.so -Wl,--no-undefined + $(THIRD_LIB) : $(THIRD_OBJ) ++ $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdfthird.so -Wl,--no-undefined + $(THREAD_LIB) : $(THREAD_OBJ) ++ $(LINK_CMD) -shared -Wl,-soname -Wl,libmuthreads.so -Wl,--no-undefined -lpthread + +-INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) ++INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) + + # --- Tools and Apps --- + +diff -Naur mupdf-1.12.0-source.orig/source/fitz/load-jpx.c mupdf-1.12.0-source/source/fitz/load-jpx.c +--- mupdf-1.12.0-source.orig/source/fitz/load-jpx.c 2017-12-13 08:00:30.000000000 -0600 ++++ mupdf-1.12.0-source/source/fitz/load-jpx.c 2017-12-17 18:03:03.259071255 -0600 +@@ -445,14 +445,18 @@ + + #else /* HAVE_LURATECH */ + ++#ifdef __cplusplus ++extern "C" ++{ + #define OPJ_STATIC + #define OPJ_HAVE_INTTYPES_H + #if !defined(_MSC_VER) || _MSC_VER >= 1600 + #define OPJ_HAVE_STDINT_H + #endif ++#endif + #define USE_JPIP + +-#include ++#include + + struct fz_jpxd_s + { +@@ -930,6 +934,10 @@ + *yresp = state.yres; + } + ++#ifdef __cplusplus ++} ++#endif ++ + #endif /* HAVE_LURATECH */ + + #else /* FZ_ENABLE_JPX */ diff --git a/office/misc/mupdf/files/mupdf-1.12.0-security_fix-1.patch b/office/misc/mupdf/files/mupdf-1.12.0-security_fix-1.patch new file mode 100644 index 0000000000..0f496edc42 --- /dev/null +++ b/office/misc/mupdf/files/mupdf-1.12.0-security_fix-1.patch @@ -0,0 +1,108 @@ +Submitted By: Pierre Labastie +Date: 2018-02-18 +Initial Package Version: 1.12.0 +Upstream Status: Commit 55c3f68d638ac1263a386e0aaa004bb6e8bde731 +Origin: Upstream +Description: Fixes for CVE-2017-17858 + +From 55c3f68d638ac1263a386e0aaa004bb6e8bde731 Mon Sep 17 00:00:00 2001 +From: Sebastian Rasmussen +Date: Mon, 11 Dec 2017 14:09:15 +0100 +Subject: [PATCH] Bugs 698804/698810/698811: Keep PDF object numbers below + limit. + +This ensures that: + * xref tables with objects pointers do not grow out of bounds. + * other readers, e.g. Adobe Acrobat can parse PDFs written by mupdf. +--- + include/mupdf/pdf/object.h | 3 +++ + source/pdf/pdf-repair.c | 5 +---- + source/pdf/pdf-xref.c | 21 ++++++++++++--------- + 3 files changed, 16 insertions(+), 13 deletions(-) + +diff --git a/include/mupdf/pdf/object.h b/include/mupdf/pdf/object.h +index 21ed859..4177112 100644 +--- a/include/mupdf/pdf/object.h ++++ b/include/mupdf/pdf/object.h +@@ -3,6 +3,9 @@ + + typedef struct pdf_document_s pdf_document; + ++/* Defined in PDF 1.7 according to Acrobat limit. */ ++#define PDF_MAX_OBJECT_NUMBER 8388607 ++ + /* + * Dynamic objects. + * The same type of objects as found in PDF and PostScript. +diff --git a/source/pdf/pdf-repair.c b/source/pdf/pdf-repair.c +index ca149bd..0c29758 100644 +--- a/source/pdf/pdf-repair.c ++++ b/source/pdf/pdf-repair.c +@@ -6,9 +6,6 @@ + + /* Scan file for objects and reconstruct xref table */ + +-/* Define in PDF 1.7 to be 8388607, but mupdf is more lenient. */ +-#define MAX_OBJECT_NUMBER (10 << 20) +- + struct entry + { + int num; +@@ -436,7 +433,7 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc) + break; + } + +- if (num <= 0 || num > MAX_OBJECT_NUMBER) ++ if (num <= 0 || num > PDF_MAX_OBJECT_NUMBER) + { + fz_warn(ctx, "ignoring object with invalid object number (%d %d R)", num, gen); + goto have_next_token; +diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c +index 00586db..6284e70 100644 +--- a/source/pdf/pdf-xref.c ++++ b/source/pdf/pdf-xref.c +@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) + fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); + } + +- if (ofs < 0) +- fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)ofs); +- if (ofs > INT64_MAX - len) +- fz_throw(ctx, FZ_ERROR_GENERIC, "xref section object numbers too big"); +- ++ if (ofs < 0 || ofs > PDF_MAX_OBJECT_NUMBER ++ || len < 0 || len > PDF_MAX_OBJECT_NUMBER ++ || ofs + len - 1 > PDF_MAX_OBJECT_NUMBER) ++ { ++ fz_throw(ctx, FZ_ERROR_GENERIC, "xref subsection object numbers are out of range"); ++ } + /* broken pdfs where size in trailer undershoots entries in xref sections */ + if (ofs + len > xref_len) + { +@@ -933,10 +934,8 @@ pdf_read_new_xref_section(fz_context *ctx, pdf_document *doc, fz_stream *stm, in + pdf_xref_entry *table; + int i, n; + +- if (i0 < 0 || i1 < 0 || i0 > INT_MAX - i1) +- fz_throw(ctx, FZ_ERROR_GENERIC, "negative xref stream entry index"); +- //if (i0 + i1 > pdf_xref_len(ctx, doc)) +- // fz_throw(ctx, FZ_ERROR_GENERIC, "xref stream has too many entries"); ++ if (i0 < 0 || i0 > PDF_MAX_OBJECT_NUMBER || i1 < 0 || i1 > PDF_MAX_OBJECT_NUMBER || i0 + i1 - 1 > PDF_MAX_OBJECT_NUMBER) ++ fz_throw(ctx, FZ_ERROR_GENERIC, "xref subsection object numbers are out of range"); + + table = pdf_xref_find_subsection(ctx, doc, i0, i1); + for (i = i0; i < i0 + i1; i++) +@@ -2086,6 +2085,10 @@ pdf_create_object(fz_context *ctx, pdf_document *doc) + /* TODO: reuse free object slots by properly linking free object chains in the ofs field */ + pdf_xref_entry *entry; + int num = pdf_xref_len(ctx, doc); ++ ++ if (num > PDF_MAX_OBJECT_NUMBER) ++ fz_throw(ctx, FZ_ERROR_GENERIC, "too many objects stored in pdf"); ++ + entry = pdf_get_incremental_xref_entry(ctx, doc, num); + entry->type = 'f'; + entry->ofs = -1; +-- +2.9.1 + diff --git a/office/misc/mupdf/pspec.xml b/office/misc/mupdf/pspec.xml index 9360d82243..b9bfe45703 100644 --- a/office/misc/mupdf/pspec.xml +++ b/office/misc/mupdf/pspec.xml @@ -12,7 +12,7 @@ app:gui Lightweight PDF and XPS viewer MuPDF is a lightweight open source software framework for viewing and converting PDF, XPS, and E-book documents. - https://mupdf.com/downloads/mupdf-1.12.0-source.tar.gz + http://www.mupdf.com/downloads/archive/mupdf-1.12.0-source.tar.gz mesa-devel curl-devel @@ -20,13 +20,18 @@ libX11-devel libXi-devel libXext-devel + freeglut-devel harfbuzz-devel mesa-glu-devel openjpeg-devel + libjpeg-turbo-devel libXrandr-devel libXcursor-devel libXinerama-devel + + mupdf-1.12.0-security_fix-1.patch + @@ -58,6 +63,13 @@ + + 2018-08-09 + 1.12.0 + Rebuild. + Pisi Linux Community + admin@pisilinux.org + 2018-02-11 1.12.0