Skip to contentSkip to conversation

exiv2: patch CVE-2025-26623

PATCH Ankur Tyagi 1 participant 1 message Oct 12, 2025 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Please ignore this series as I missed earlier submission via
https://lists.openembedded.org/g/openembedded-devel/message/120366

Quoted 127 lines · Ankur Tyagi via lists.openembedded.org

Details https://nvd.nist.gov/vuln/detail/CVE-2025-26623

---
 .../exiv2/exiv2/0001-CVE-2025-26623.patch     | 86 +++++++++++++++++++
 meta-oe/recipes-support/exiv2/exiv2_0.28.3.bb |  5 +-
 2 files changed, 90 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/exiv2/exiv2/0001-CVE-2025-26623.patch
meta-oe/recipes-support/exiv2/exiv2/0001-CVE-2025-26623.patch new file +86 -0
new file mode 100644
index 0000000000..db561ed96b
@@ -0,0 +1,86 @@
+From 943fbd9c688a10037ccb42bf7c4b20be76df1119 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <[email protected]>
+Date: Mon, 17 Feb 2025 16:34:40 -0800
+Subject: [PATCH] CVE-2025-26623
+
+Revert "fix copy constructors"
+
+This reverts commit afb2d998fe62f7e829e93e62506bf9968117c9c5.
+
+This commit is wrong and ends up resulting in use after frees because of
+C pointers. The proper solution is shared_ptr instead of C pointers but
+that's a lot more involved than reverting this.
+
+CVE: CVE-2025-26623
+Upstream-Status: Backport [https://github.com/Exiv2/exiv2/commit/facce628f3622764e91a8161f89ade8cb34bc120]
+
+Signed-off-by: Rosen Penev <[email protected]>
+(cherry picked from commit ebff8b48820b96c786cfddbf0bebb395cb1317d7)
+(cherry picked from commit facce628f3622764e91a8161f89ade8cb34bc120)
+Signed-off-by: Ankur Tyagi <[email protected]>
+---
+ src/tiffcomposite_int.cpp | 19 +++++++++++++++++++
+ src/tiffcomposite_int.hpp |  6 +++---
+ 2 files changed, 22 insertions(+), 3 deletions(-)
+
+diff --git a/src/tiffcomposite_int.cpp b/src/tiffcomposite_int.cpp
+index 95ce450c7..3e6e93d5c 100644
+--- a/src/tiffcomposite_int.cpp
++++ b/src/tiffcomposite_int.cpp
+@@ -127,6 +127,25 @@ TiffEntryBase::TiffEntryBase(const TiffEntryBase& rhs) :
+     storage_(rhs.storage_) {
+ }
+
++TiffDirectory::TiffDirectory(const TiffDirectory& rhs) : TiffComponent(rhs), hasNext_(rhs.hasNext_) {
++}
++
++TiffSubIfd::TiffSubIfd(const TiffSubIfd& rhs) : TiffEntryBase(rhs), newGroup_(rhs.newGroup_) {
++}
++
++TiffBinaryArray::TiffBinaryArray(const TiffBinaryArray& rhs) :
++    TiffEntryBase(rhs),
++    cfgSelFct_(rhs.cfgSelFct_),
++    arraySet_(rhs.arraySet_),
++    arrayCfg_(rhs.arrayCfg_),
++    arrayDef_(rhs.arrayDef_),
++    defSize_(rhs.defSize_),
++    setSize_(rhs.setSize_),
++    origData_(rhs.origData_),
++    origSize_(rhs.origSize_),
++    pRoot_(rhs.pRoot_) {
++}
++
+ TiffComponent::UniquePtr TiffComponent::clone() const {
+   return UniquePtr(doClone());
+ }
+diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp
+index 4506a4dca..307e0bd9e 100644
+--- a/src/tiffcomposite_int.hpp
++++ b/src/tiffcomposite_int.hpp
+@@ -851,7 +851,7 @@ class TiffDirectory : public TiffComponent {
+   //! @name Protected Creators
+   //@{
+   //! Copy constructor (used to implement clone()).
+-  TiffDirectory(const TiffDirectory&) = default;
++  TiffDirectory(const TiffDirectory& rhs);
+   //@}
+
+   //! @name Protected Manipulators
+@@ -944,7 +944,7 @@ class TiffSubIfd : public TiffEntryBase {
+   //! @name Protected Creators
+   //@{
+   //! Copy constructor (used to implement clone()).
+-  TiffSubIfd(const TiffSubIfd&) = default;
++  TiffSubIfd(const TiffSubIfd& rhs);
+   TiffSubIfd& operator=(const TiffSubIfd&) = delete;
+   //@}
+
+@@ -1346,7 +1346,7 @@ class TiffBinaryArray : public TiffEntryBase {
+   //! @name Protected Creators
+   //@{
+   //! Copy constructor (used to implement clone()).
+-  TiffBinaryArray(const TiffBinaryArray&) = default;
++  TiffBinaryArray(const TiffBinaryArray& rhs);
+   //@}
+
+   //! @name Protected Manipulators
meta-oe/recipes-support/exiv2/exiv2_0.28.3.bb +4 -2
index 3e33ab7953..4986415a6b 100644
@@ -4,7 +4,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=625f055f41728f84a8d7938acc35bdc2"
 
 DEPENDS = "zlib expat brotli libinih"
 
-SRC_URI = "git://github.com/Exiv2/exiv2.git;protocol=https;branch=0.28.x"
+SRC_URI = " \
+    git://github.com/Exiv2/exiv2.git;protocol=https;branch=0.28.x \
+    file://0001-CVE-2025-26623.patch \
+"
 SRCREV = "a6a79ef064f131ffd03c110acce2d3edb84ffa2e"
 S = "${WORKDIR}/git"
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#120466): https://lists.openembedded.org/g/openembedded-devel/message/120466
Mute This Topic: https://lists.openembedded.org/mt/115655086/3619737
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-