public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michael J Gruber <mjg@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/mupdf] rawhide: fix CVE-2026-112036 (rhbz#2558213)
Date: Fri, 23 Oct 2026 10:55:28 GMT	[thread overview]
Message-ID: <179275292843.1.6764306377583756054.rpms-mupdf-fd4880d0e1b5@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/mupdf
Branch : rawhide
Commit : fd4880d0e1b59c1b26c0454a8b1758b19e5f62b9
Author : Michael J Gruber <mjg@fedoraproject.org>
Date   : 2026-10-23T12:54:53+02:00
Stats  : +44/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/mupdf/c/fd4880d0e1b59c1b26c0454a8b1758b19e5f62b9?branch=rawhide

Log:
fix CVE-2026-112036 (rhbz#2558213)

---
diff --git a/0001-Bug-709768-Clear-list-pointer-to-avoid-double-free.patch b/0001-Bug-709768-Clear-list-pointer-to-avoid-double-free.patch
new file mode 100644
index 0000000..991f95b
--- /dev/null
+++ b/0001-Bug-709768-Clear-list-pointer-to-avoid-double-free.patch
@@ -0,0 +1,42 @@
+From 594a8f1774dd6838fbbc7c5ba19c8e60b212bbff Mon Sep 17 00:00:00 2001
+Message-ID: <594a8f1774dd6838fbbc7c5ba19c8e60b212bbff.1792587545.git.mjg@fedoraproject.org>
+From: Sebastian Rasmussen <sebras@gmail.com>
+Date: Wed, 30 Sep 2026 13:16:29 +0200
+Subject: [PATCH] Bug 709768: Clear list pointer to avoid double free.
+
+The bug shows up when signing a crafted PDF-file where a signature
+object has two reference dictionaries that specify which field
+objects should be included in the digest: one references a
+specific field, and the other one specifies /All implying that
+all fields should be included.
+
+When encountering /All MuPDF drops the list of field names that
+created when parsing the first signature reference dictionary.
+While doing so, all names in that list are freed, as is the list
+itself, but crucially the pointer to the list is not reset to
+NULL.
+
+Later on when the code for freeing the list is called again,
+MuPDF attempts to free the stale list pointer.
+
+As mentioned in the report by Suyuan Wang the fix is to set the
+list pointer to NULL when the list of field names is freed.
+---
+ source/pdf/pdf-xref.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
+index ca25fea42..db21647ee 100644
+--- a/source/pdf/pdf-xref.c
++++ b/source/pdf/pdf-xref.c
+@@ -4176,6 +4176,7 @@ free_char_list(fz_context *ctx, char_list *c)
+ 	for (i = c->len-1; i >= 0; i--)
+ 		fz_free(ctx, c->list[i]);
+ 	fz_free(ctx, c->list);
++	c->list = NULL;
+ 	c->len = 0;
+ 	c->max = 0;
+ }
+-- 
+2.56.0.317.g652edc0b5e
+

diff --git a/mupdf.spec b/mupdf.spec
index 579125f..dd493db 100644
--- a/mupdf.spec
+++ b/mupdf.spec
@@ -37,6 +37,8 @@ Patch:		0001-do-not-use-CXXFLAGS-with-swig.patch
 # for compatibility with SWIG 4.5.0
 # https://github.com/ArtifexSoftware/mupdf/pull/102
 Patch:		0001-Replace-removed-Python-2-C-API-macros-for-SWIG-4.5.0.patch
+# Upstream patches:
+Patch:		0001-Bug-709768-Clear-list-pointer-to-avoid-double-free.patch
 
 BuildRequires:	gcc gcc-c++ make binutils desktop-file-utils coreutils pkgconfig
 BuildRequires:	openjpeg2-devel desktop-file-utils

                 reply	other threads:[~2026-10-23 10:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179275292843.1.6764306377583756054.rpms-mupdf-fd4880d0e1b5@fedoraproject.org \
    --to=mjg@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox