public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mupdf] f43: fix CVE-2026-112036 (rhbz#2558213)
@ 2026-10-23 16:05 Michael J Gruber
  0 siblings, 0 replies; only message in thread
From: Michael J Gruber @ 2026-10-23 16:05 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/mupdf
Branch : f43
Commit : 61c416e6cd6c35e8331a4680a8f045be97f9e52e
Author : Michael J Gruber <mjg@fedoraproject.org>
Date   : 2026-10-23T17:18:19+02:00
Stats  : +44/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/mupdf/c/61c416e6cd6c35e8331a4680a8f045be97f9e52e?branch=f43

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 bfcfb99..bfcce04 100644
--- a/mupdf.spec
+++ b/mupdf.spec
@@ -50,6 +50,8 @@ Patch:		0001-pdf_font-report-font-name-in-warning.patch
 Patch:		0001-Replace-removed-Python-2-C-API-macros-for-SWIG-4.5.0.patch
 # Upstreamable:
 Patch:		0001-mupdfwrap_test-adjust-to-mupdf-1.27.x.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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-23 16:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23 16:05 [rpms/mupdf] f43: fix CVE-2026-112036 (rhbz#2558213) Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox