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
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 <[email protected]> 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 <[email protected]> +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 [email protected] for the report. The original version of +this patch came from [email protected]. +--- + 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

