mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-14 05:49:57 +00:00
poppler: fix CVE-2025-52885
Poppler ia a library for rendering PDF files, and examining or modifying their structure. A use-after-free (write) vulnerability has been detected in versions Poppler prior to 25.10.0 within the StructTreeRoot class. The issue arises from the use of raw pointers to elements of a `std::vector`, which can lead to dangling pointers when the vector is resized. The vulnerability stems from the way that refToParentMap stores references to `std::vector` elements using raw pointers. These pointers may become invalid when the vector is resized. This vulnerability is a common security problem involving the use of raw pointers to `std::vectors`. Internally, `std::vector `stores its elements in a dynamically allocated array. When the array reaches its capacity and a new element is added, the vector reallocates a larger block of memory and moves all the existing elements to the new location. At this point if any pointers to elements are stored before a resize occurs, they become dangling pointers once the reallocation happens. Version 25.10.0 contains a patch for the issue. Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-52885 Upstream patch: https://gitlab.freedesktop.org/poppler/poppler/-/commit/4ce27cc826bf90cc8dbbd8a8c87bd913cccd7ec0 Signed-off-by: Yogita Urade <yogita.urade@windriver.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
committed by
Anuj Mittal
parent
ed71c716fa
commit
580609b6d5
@@ -0,0 +1,30 @@
|
||||
From 4ce27cc826bf90cc8dbbd8a8c87bd913cccd7ec0 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Backhouse <kevinbackhouse@github.com>
|
||||
Date: Wed, 3 Sep 2025 14:36:54 +0100
|
||||
Subject: [PATCH] Check for duplicate entries
|
||||
|
||||
CVE: CVE-2025-52885
|
||||
Upstream-Status: Backport [https://gitlab.freedesktop.org/poppler/poppler/-/commit/4ce27cc826bf90cc8dbbd8a8c87bd913cccd7ec0]
|
||||
|
||||
Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
|
||||
---
|
||||
poppler/StructTreeRoot.cc | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/poppler/StructTreeRoot.cc b/poppler/StructTreeRoot.cc
|
||||
index 47adac9..10db9aa 100644
|
||||
--- a/poppler/StructTreeRoot.cc
|
||||
+++ b/poppler/StructTreeRoot.cc
|
||||
@@ -137,6 +137,10 @@ void StructTreeRoot::parseNumberTreeNode(Dict *node)
|
||||
}
|
||||
int keyVal = key.getInt();
|
||||
std::vector<Parent> &vec = parentTree[keyVal];
|
||||
+ if (!vec.empty()) {
|
||||
+ error(errSyntaxError, -1, "Nums item at position {0:d} is a duplicate entry for key {1:d}", i, keyVal);
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
Object valueArray = nums.arrayGet(i + 1);
|
||||
if (valueArray.isArray()) {
|
||||
--
|
||||
2.40.0
|
||||
@@ -20,6 +20,7 @@ SRC_URI = "http://poppler.freedesktop.org/${BP}.tar.xz \
|
||||
file://CVE-2025-52886-0002.patch \
|
||||
file://CVE-2025-50420.patch \
|
||||
file://CVE-2025-43718.patch \
|
||||
file://CVE-2025-52885.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "b6d893dc7dcd4138b9e9df59a13c59695e50e80dc5c2cacee0674670693951a1"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user