Article View: linux.debian.bugs.rc
Article #3362Bug#1142282: jbig2dec: diff for NMU version 0.20-1.1
From: Salvatore Bonaccorso
Date: Mon, 16 Nov 2026 21:40
Date: Mon, 16 Nov 2026 21:40
112 lines
5907 bytes
5907 bytes
--ugkqRpLTxApOgl3X
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Control: tags 1142282 + patch
Control: tags 1142282 + pending
Dear maintainer,
I've prepared an NMU for jbig2dec (versioned as 0.20-1.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should cancel it.
Regards,
Salvatore
--ugkqRpLTxApOgl3X
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename=jbig2dec-0.20-1.1-nmu.diff
diffstat for jbig2dec-0.20 jbig2dec-0.20
changelog | 7 +
patches/Bug-709176-Validate-SBSYMCODELEN-before-use.patch | 56 ++++++++++++++
patches/series | 1
3 files changed, 64 insertions(+)
diff -Nru jbig2dec-0.20/debian/changelog jbig2dec-0.20/debian/changelog
--- jbig2dec-0.20/debian/changelog 2023-11-30 14:40:40.000000000 +0100
+++ jbig2dec-0.20/debian/changelog 2026-09-11 10:34:12.000000000 +0200
@@ -1,3 +1,10 @@
+jbig2dec (0.20-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Validate SBSYMCODELEN before use (CVE-2026-38076) (Closes: #1142282)
+
+ -- Salvatore Bonaccorso <carnil@debian.org> Fri, 11 Sep 2026 10:34:12 +0200
+
jbig2dec (0.20-1) unstable; urgency=medium
[ upstream ]
diff -Nru jbig2dec-0.20/debian/patches/Bug-709176-Validate-SBSYMCODELEN-before-use.patch jbig2dec-0.20/debian/patches/Bug-709176-Validate-SBSYMCODELEN-before-use.patch
--- jbig2dec-0.20/debian/patches/Bug-709176-Validate-SBSYMCODELEN-before-use.patch 1970-01-01 01:00:00.000000000 +0100
+++ jbig2dec-0.20/debian/patches/Bug-709176-Validate-SBSYMCODELEN-before-use.patch 2026-09-11 10:34:12.000000000 +0200
@@ -0,0 +1,56 @@
+From: Robin Watts <Robin.Watts@artifex.com>
+Date: Tue, 10 Mar 2026 16:33:37 +0000
+Subject: Bug 709176: Validate SBSYMCODELEN before use.
+Origin: https://github.com/ArtifexSoftware/jbig2dec/commit/cc37d0931aa71582f7128736a068c92cd8712d9b
+Bug-Debian: https://bugs.debian.org/1142282
+Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2026-38076
+
+Thanks to dkjsone@gmail.com for the report. The original version of
+this patch came from hvtaifwkbgefbaei@gmail.com.
+---
+ jbig2_arith_iaid.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/jbig2_arith_iaid.c b/jbig2_arith_iaid.c
+index 5e0dbe6dd5e6..b69274f80a6d 100644
+--- a/jbig2_arith_iaid.c
++++ b/jbig2_arith_iaid.c
+@@ -47,7 +47,7 @@ jbig2_arith_iaid_ctx_new(Jbig2Ctx *ctx, uint8_t SBSYMCODELEN)
+ Jbig2ArithIaidCtx *result;
+ size_t ctx_size;
+
+- if (sizeof(ctx_size) * 8 <= SBSYMCODELEN)
++ if (SBSYMCODELEN > 31 || sizeof(ctx_size) * 8 <= SBSYMCODELEN)
+ {
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, JBIG2_UNKNOWN_SEGMENT_NUMBER, "requested IAID arithmetic coding state size too large");
+ return NULL;
+@@ -82,7 +82,7 @@ jbig2_arith_iaid_decode(Jbig2Ctx *ctx, Jbig2ArithIaidCtx *actx, Jbig2ArithState
+ Jbig2ArithCx *IAIDx = actx->IAIDx;
+ uint8_t SBSYMCODELEN = actx->SBSYMCODELEN;
+ /* A.3 (1) */
+- int PREV = 1;
++ uint32_t PREV = 1;
+ int D;
+ int i;
+
+@@ -94,14 +94,14 @@ jbig2_arith_iaid_decode(Jbig2Ctx *ctx, Jbig2ArithIaidCtx *actx, Jbig2ArithState
+ #ifdef VERBOSE
+ fprintf(stderr, "IAID%x: D = %d\n", PREV, D);
+ #endif
+- PREV = (PREV << 1) | D;
++ PREV = (PREV << 1) | (uint32_t)D;
+ }
+ /* A.3 (3) */
+- PREV -= 1 << SBSYMCODELEN;
++ PREV -= (1U << SBSYMCODELEN);
+ #ifdef VERBOSE
+ fprintf(stderr, "IAID result: %d\n", PREV);
+ #endif
+- *p_result = PREV;
++ *p_result = (int)PREV;
+ return 0;
+ }
+
+--
+2.55.0
+
diff -Nru jbig2dec-0.20/debian/patches/series jbig2dec-0.20/debian/patches/series
--- jbig2dec-0.20/debian/patches/series 2023-11-30 14:40:40.000000000 +0100
+++ jbig2dec-0.20/debian/patches/series 2026-09-11 10:34:12.000000000 +0200
@@ -3,3 +3,4 @@
1004_extract_infile_from_autogen-sh.patch
2001_disable_memento.patch
2002_abi_compat.patch
+Bug-709176-Validate-SBSYMCODELEN-before-use.patch
--ugkqRpLTxApOgl3X--
Technical Details
Message-ID:
<O0cAF-ckn6-5@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomodReferences:
<NhKyt-5g6I-9@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!bofh.it!news.nic.it!robomod From: Salvatore Bonaccorso <carnil@debian.org> Newsgroups: linux.debian.bugs.rc Subject: Bug#1142282: jbig2dec: diff for NMU version 0.20-1.1 Date: Mon, 16 Nov 2026 22:40:01 +0100 Message-ID: <O0cAF-ckn6-5@gated-at.bofh.it> References: <NhKyt-5g6I-9@gated-at.bofh.it> X-Original-To: 1142282@bugs.debian.org X-Mailbox-Line: From debian-bugs-rc-request@lists.debian.org Mon Nov 16 21:33:09 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.7 Reply-To: Salvatore Bonaccorso <carnil@debian.org>, 1142282@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: debian-printing@lists.debian.org X-Debian-Pr-Message: followup 1142282 X-Debian-Pr-Package: src:jbig2dec X-Debian-Pr-Keywords: security upstream X-Debian-Pr-Source: jbig2dec MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ugkqRpLTxApOgl3X" Content-Disposition: inline X-Nmudiff-Version: 2.26.15 X-Debian-User: carnil X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-rc@lists.debian.org> archive/latest/838505 List-ID: <debian-bugs-rc.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-rc/> Approved: robomod@news.nic.it Lines: 112 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Mon, 16 Nov 2026 22:31:08 +0100 X-Original-Message-ID: <avt2HJrsUHHkABHC@eldamar.lan> X-Original-References: <178427065745.485559.14502463835298965413.reportbug@eldamar.lan>