mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 20:07:25 +00:00
poppler: fix CVE-2025-32365
Poppler before 25.04.0 allows crafted input files to trigger out-of-bounds reads in the JBIG2Bitmap::combine function in JBIG2Stream.cc because of a misplaced isOk check. Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-32365 Upstream patch: https://gitlab.freedesktop.org/poppler/poppler/-/commit/1f151565bbca5be7449ba8eea6833051cc1baa41 Signed-off-by: Yogita Urade <yogita.urade@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
committed by
Armin Kuster
parent
7c900fa798
commit
a0b54655b5
@@ -0,0 +1,41 @@
|
|||||||
|
From 1f151565bbca5be7449ba8eea6833051cc1baa41 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Albert Astals Cid <aacid@kde.org>
|
||||||
|
Date: Mon, 31 Mar 2025 14:35:49 +0200
|
||||||
|
Subject: [PATCH] Move isOk check to inside JBIG2Bitmap::combine
|
||||||
|
|
||||||
|
CVE: CVE-2025-32365
|
||||||
|
Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/1f151565bbca5be7449ba8eea6833051cc1baa41]
|
||||||
|
|
||||||
|
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||||
|
---
|
||||||
|
poppler/JBIG2Stream.cc | 8 +++++---
|
||||||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
|
||||||
|
index bdc51d0..2974493 100644
|
||||||
|
--- a/poppler/JBIG2Stream.cc
|
||||||
|
+++ b/poppler/JBIG2Stream.cc
|
||||||
|
@@ -770,6 +770,10 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, unsigned int combOp
|
||||||
|
unsigned int src0, src1, src, dest, s1, s2, m1, m2, m3;
|
||||||
|
bool oneByte;
|
||||||
|
|
||||||
|
+ if (unlikely(!isOk())) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
// check for the pathological case where y = -2^31
|
||||||
|
if (y < -0x7fffffff) {
|
||||||
|
return;
|
||||||
|
@@ -2200,9 +2204,7 @@ void JBIG2Stream::readTextRegionSeg(unsigned int segNum, bool imm, bool lossless
|
||||||
|
if (pageH == 0xffffffff && y + h > curPageH) {
|
||||||
|
pageBitmap->expand(y + h, pageDefPixel);
|
||||||
|
}
|
||||||
|
- if (pageBitmap->isOk()) {
|
||||||
|
- pageBitmap->combine(bitmap.get(), x, y, extCombOp);
|
||||||
|
- }
|
||||||
|
+ pageBitmap->combine(bitmap.get(), x, y, extCombOp);
|
||||||
|
|
||||||
|
// store the region bitmap
|
||||||
|
} else {
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
@@ -13,6 +13,7 @@ SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \
|
|||||||
file://CVE-2024-6239-0002.patch \
|
file://CVE-2024-6239-0002.patch \
|
||||||
file://CVE-2024-56378.patch \
|
file://CVE-2024-56378.patch \
|
||||||
file://CVE-2025-32364.patch \
|
file://CVE-2025-32364.patch \
|
||||||
|
file://CVE-2025-32365.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[sha256sum] = "b6d893dc7dcd4138b9e9df59a13c59695e50e80dc5c2cacee0674670693951a1"
|
SRC_URI[sha256sum] = "b6d893dc7dcd4138b9e9df59a13c59695e50e80dc5c2cacee0674670693951a1"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user