diff options
author | feld <feld@FreeBSD.org> | 2016-10-12 00:11:07 +0000 |
---|---|---|
committer | feld <feld@FreeBSD.org> | 2016-10-12 00:11:07 +0000 |
commit | 4e80d6d3fb748b46458f3c9a6cc78283a43849c5 (patch) | |
tree | b2ed8f07e5dae1fbcd862de1b1798effcf5b8fa4 | |
parent | 5a7d20aa94a2d7743348c9af1efb2153b9cabc1b (diff) | |
download | FreeBSD-ports-4e80d6d3fb748b46458f3c9a6cc78283a43849c5.zip FreeBSD-ports-4e80d6d3fb748b46458f3c9a6cc78283a43849c5.tar.gz |
graphics/mupdf: Patch to resolve CVEs
PR: 212207
MFH: 2016Q4
Security: CVE-2016-6525
Security: CVE-2016-6265
-rw-r--r-- | graphics/llpp/Makefile | 2 | ||||
-rw-r--r-- | graphics/mupdf/Makefile | 1 | ||||
-rw-r--r-- | graphics/mupdf/files/patch-scripts_fontdump.c | 2 | ||||
-rw-r--r-- | graphics/mupdf/files/patch-source__fitz__load-jpx.c | 2 | ||||
-rw-r--r-- | graphics/mupdf/files/patch-source_pdf_pdf-shade.c | 17 | ||||
-rw-r--r-- | graphics/mupdf/files/patch-source_pdf_pdf-xref.c | 25 | ||||
-rw-r--r-- | graphics/zathura-pdf-mupdf/Makefile | 2 |
7 files changed, 47 insertions, 4 deletions
diff --git a/graphics/llpp/Makefile b/graphics/llpp/Makefile index 98f4efb..057860e 100644 --- a/graphics/llpp/Makefile +++ b/graphics/llpp/Makefile @@ -3,7 +3,7 @@ PORTNAME= llpp PORTVERSION= 22 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= http://repo.or.cz/llpp.git/snapshot/ DISTNAME= 561dc5673cea431e930668b0d87b0c4b31a36b39 diff --git a/graphics/mupdf/Makefile b/graphics/mupdf/Makefile index c1fe997..c5c4f5f 100644 --- a/graphics/mupdf/Makefile +++ b/graphics/mupdf/Makefile @@ -3,6 +3,7 @@ PORTNAME= mupdf PORTVERSION= 1.9a +PORTREVISION= 1 DISTVERSIONSUFFIX= -source PORTEPOCH= 1 CATEGORIES= graphics diff --git a/graphics/mupdf/files/patch-scripts_fontdump.c b/graphics/mupdf/files/patch-scripts_fontdump.c index 092f416..15fa945 100644 --- a/graphics/mupdf/files/patch-scripts_fontdump.c +++ b/graphics/mupdf/files/patch-scripts_fontdump.c @@ -1,4 +1,4 @@ ---- scripts/fontdump.c.orig 2016-06-12 09:11:56 UTC +--- scripts/fontdump.c.orig 2016-04-21 11:14:32 UTC +++ scripts/fontdump.c @@ -50,7 +50,6 @@ main(int argc, char **argv) fprintf(fo, "#ifndef __STRICT_ANSI__\n"); diff --git a/graphics/mupdf/files/patch-source__fitz__load-jpx.c b/graphics/mupdf/files/patch-source__fitz__load-jpx.c index 3d62514..83291ca 100644 --- a/graphics/mupdf/files/patch-source__fitz__load-jpx.c +++ b/graphics/mupdf/files/patch-source__fitz__load-jpx.c @@ -1,4 +1,4 @@ ---- source/fitz/load-jpx.c.orig 2015-04-16 08:57:45 UTC +--- source/fitz/load-jpx.c.orig 2016-04-21 11:14:32 UTC +++ source/fitz/load-jpx.c @@ -1,14 +1,6 @@ #include "mupdf/fitz.h" diff --git a/graphics/mupdf/files/patch-source_pdf_pdf-shade.c b/graphics/mupdf/files/patch-source_pdf_pdf-shade.c new file mode 100644 index 0000000..38b3ca1 --- /dev/null +++ b/graphics/mupdf/files/patch-source_pdf_pdf-shade.c @@ -0,0 +1,17 @@ +$OpenBSD: patch-source_pdf_pdf-shade_c,v 1.1 2016/08/27 20:58:48 jca Exp $ + + CVE-2016-6525 + + http://git.ghostscript.com/?p=mupdf.git;a=commitdiff;h=39b0f07dd960f34e7e6bf230ffc3d87c41ef0f2e;hp=fa1936405b6a84e5c9bb440912c23d532772f958 + +--- source/pdf/pdf-shade.c.orig 2016-04-21 11:14:32 UTC ++++ source/pdf/pdf-shade.c +@@ -206,7 +206,7 @@ pdf_load_mesh_params(fz_context *ctx, pd + obj = pdf_dict_get(ctx, dict, PDF_NAME_Decode); + if (pdf_array_len(ctx, obj) >= 6) + { +- n = (pdf_array_len(ctx, obj) - 4) / 2; ++ n = fz_mini(FZ_MAX_COLORS, (pdf_array_len(ctx, obj) - 4) / 2); + shade->u.m.x0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0)); + shade->u.m.x1 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 1)); + shade->u.m.y0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 2)); diff --git a/graphics/mupdf/files/patch-source_pdf_pdf-xref.c b/graphics/mupdf/files/patch-source_pdf_pdf-xref.c new file mode 100644 index 0000000..12cf04a --- /dev/null +++ b/graphics/mupdf/files/patch-source_pdf_pdf-xref.c @@ -0,0 +1,25 @@ +$OpenBSD: patch-source_pdf_pdf-xref_c,v 1.1 2016/08/27 20:58:48 jca Exp $ + + CVE-2016-6265 + + http://git.ghostscript.com/?p=mupdf.git;a=commitdiff;h=fa1936405b6a84e5c9bb440912c23d532772f958 + +--- source/pdf/pdf-xref.c.orig 2016-04-21 11:14:32 UTC ++++ source/pdf/pdf-xref.c +@@ -1191,8 +1191,14 @@ pdf_load_xref(fz_context *ctx, pdf_docum + fz_throw(ctx, FZ_ERROR_GENERIC, "object offset out of range: %d (%d 0 R)", (int)entry->ofs, i); + } + if (entry->type == 'o') +- if (entry->ofs <= 0 || entry->ofs >= xref_len || pdf_get_xref_entry(ctx, doc, entry->ofs)->type != 'n') +- fz_throw(ctx, FZ_ERROR_GENERIC, "invalid reference to an objstm that does not exist: %d (%d 0 R)", (int)entry->ofs, i); ++ { ++ /* Read this into a local variable here, because pdf_get_xref_entry ++ * may solidify the xref, hence invalidating "entry", meaning we ++ * need a stashed value for the throw. */ ++ fz_off_t ofs = entry->ofs; ++ if (ofs <= 0 || ofs >= xref_len || pdf_get_xref_entry(ctx, doc, ofs)->type != 'n') ++ fz_throw(ctx, FZ_ERROR_GENERIC, "invalid reference to an objstm that does not exist: %d (%d 0 R)", (int)ofs, i); ++ } + } + } + diff --git a/graphics/zathura-pdf-mupdf/Makefile b/graphics/zathura-pdf-mupdf/Makefile index bac3627..2a7edf0 100644 --- a/graphics/zathura-pdf-mupdf/Makefile +++ b/graphics/zathura-pdf-mupdf/Makefile @@ -3,7 +3,7 @@ PORTNAME= zathura-pdf-mupdf PORTVERSION= 0.3.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= http://pwmt.org/projects/zathura-pdf-mupdf/download/ |