From 07dfc89859a3539100a23c8acc0d643f4f7cb99d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 18 Oct 2017 22:15:09 +0200 Subject: gnu: mupdf: Fix CVE-2017-15587. * gnu/packages/patches/mupdf-CVE-2017-15587.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/pdf.scm (mupdf)[source](patches): Use it. --- gnu/packages/patches/mupdf-CVE-2017-15587.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 gnu/packages/patches/mupdf-CVE-2017-15587.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/mupdf-CVE-2017-15587.patch b/gnu/packages/patches/mupdf-CVE-2017-15587.patch new file mode 100644 index 0000000000..5da7737ea1 --- /dev/null +++ b/gnu/packages/patches/mupdf-CVE-2017-15587.patch @@ -0,0 +1,21 @@ +Fix CVE-2017-15587. + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-15587 +https://nandynarwhals.org/CVE-2017-15587/ + +Copied from upstream: + + +diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c +index 66bd0ed..6292793 100644 +--- a/source/pdf/pdf-xref.c ++++ b/source/pdf/pdf-xref.c +@@ -924,7 +924,7 @@ pdf_read_new_xref_section(fz_context *ctx, pdf_document *doc, fz_stream *stm, fz + pdf_xref_entry *table; + int i, n; + +- if (i0 < 0 || i1 < 0) ++ if (i0 < 0 || i1 < 0 || (i0+i1) < 0) + 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"); -- cgit 1.4.1