summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/exiv2/exiv2/CVE-2026-27631-1.patch63
-rw-r--r--meta-oe/recipes-support/exiv2/exiv2/CVE-2026-27631-2.patch26
-rw-r--r--meta-oe/recipes-support/exiv2/exiv2_0.28.3.bb2
3 files changed, 91 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/exiv2/exiv2/CVE-2026-27631-1.patch b/meta-oe/recipes-support/exiv2/exiv2/CVE-2026-27631-1.patch
new file mode 100644
index 0000000000..918c9a234a
--- /dev/null
+++ b/meta-oe/recipes-support/exiv2/exiv2/CVE-2026-27631-1.patch
@@ -0,0 +1,63 @@
1From 70edff9f6f5af7314b65d6aab04b208f752f8953 Mon Sep 17 00:00:00 2001
2From: Kevin Backhouse <kevinbackhouse@github.com>
3Date: Thu, 26 Feb 2026 21:14:10 +0000
4Subject: [PATCH] Regression test for
5 https://github.com/Exiv2/exiv2/issues/3513
6
7CVE: CVE-2026-27631
8Upstream-Status: Backport [https://github.com/Exiv2/exiv2/commit/7adedce8c779e9c7bce843cbaf9eff26bc1659b6]
9Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
10---
11 test/data/issue_3513_poc.psd | Bin 0 -> 206 bytes
12 tests/bugfixes/github/test_issue_3513.py | 17 +++++++++++++++++
13 .../test_regression_allfiles.py | 1 +
14 3 files changed, 18 insertions(+)
15 create mode 100644 test/data/issue_3513_poc.psd
16 create mode 100644 tests/bugfixes/github/test_issue_3513.py
17
18diff --git a/test/data/issue_3513_poc.psd b/test/data/issue_3513_poc.psd
19new file mode 100644
20index 0000000000000000000000000000000000000000..b8cf982ccc29e4574783b1317347a8494bce4240
21GIT binary patch
22literal 206
23zcmcC;3J7LkWXND(VPIfj2I6QSp2oldW&@cF4i-+HzAOnKCIbVQ%?V)xNk#^S{{sU!
24VK$eS7U=ZX2Ii>-KnHh{ttN=+HebfK|
25
26literal 0
27HcmV?d00001
28
29diff --git a/tests/bugfixes/github/test_issue_3513.py b/tests/bugfixes/github/test_issue_3513.py
30new file mode 100644
31index 000000000..5383470e4
32--- /dev/null
33+++ b/tests/bugfixes/github/test_issue_3513.py
34@@ -0,0 +1,17 @@
35+# -*- coding: utf-8 -*-
36+
37+import system_tests
38+
39+
40+class test_issue_3513_PsdImage_readResourceBlock(metaclass=system_tests.CaseMeta):
41+ url = "https://github.com/Exiv2/exiv2/issues/3513"
42+
43+ filename = "$data_path/issue_3513_poc.psd"
44+ commands = ["$exiv2 -pp $filename"]
45+ retval = [1]
46+ stderr = [
47+ """$exiv2_exception_message $filename:
48+$kerCorruptedMetadata
49+"""
50+ ]
51+ stdout = [""]
52diff --git a/tests/regression_tests/test_regression_allfiles.py b/tests/regression_tests/test_regression_allfiles.py
53index 34bea3b03..ef7b066e0 100644
54--- a/tests/regression_tests/test_regression_allfiles.py
55+++ b/tests/regression_tests/test_regression_allfiles.py
56@@ -124,6 +124,7 @@ def get_valid_files(data_dir):
57 "pocIssue283.jpg",
58 "poc_1522.jp2",
59 "xmpsdk.xmp",
60+ "issue_3513_poc.psd",
61 "issue_3511_poc.eps",
62 # large file that creates 11Mb of output so let's exclude it
63 "ReaganLargeTiff.tiff",
diff --git a/meta-oe/recipes-support/exiv2/exiv2/CVE-2026-27631-2.patch b/meta-oe/recipes-support/exiv2/exiv2/CVE-2026-27631-2.patch
new file mode 100644
index 0000000000..e762b10b6d
--- /dev/null
+++ b/meta-oe/recipes-support/exiv2/exiv2/CVE-2026-27631-2.patch
@@ -0,0 +1,26 @@
1From 5a6dd6015d436c1f64b55b47bb50ef8fa72f11d2 Mon Sep 17 00:00:00 2001
2From: Kevin Backhouse <kevinbackhouse@github.com>
3Date: Fri, 27 Feb 2026 10:38:22 +0000
4Subject: [PATCH] Check for integer overflow.
5
6CVE: CVE-2026-27631
7Upstream-Status: Backport [https://github.com/Exiv2/exiv2/commit/284b4e20229dd6edf492e712871878ae320801fc]
8Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
9---
10 src/psdimage.cpp | 3 +++
11 1 file changed, 3 insertions(+)
12
13diff --git a/src/psdimage.cpp b/src/psdimage.cpp
14index 1a8e4c61c..b2f5247a2 100644
15--- a/src/psdimage.cpp
16+++ b/src/psdimage.cpp
17@@ -287,6 +287,9 @@ void PsdImage::readResourceBlock(uint16_t resourceId, uint32_t resourceSize) {
18 nativePreview.height_ = getLong(buf + 8, bigEndian);
19 const uint32_t format = getLong(buf + 0, bigEndian);
20
21+ Internal::enforce(nativePreview.size_ <= static_cast<size_t>(std::numeric_limits<long>::max()),
22+ Exiv2::ErrorCode::kerCorruptedMetadata);
23+
24 if (nativePreview.size_ > 0 && nativePreview.position_ > 0) {
25 io_->seek(static_cast<long>(nativePreview.size_), BasicIo::cur);
26 if (io_->error() || io_->eof())
diff --git a/meta-oe/recipes-support/exiv2/exiv2_0.28.3.bb b/meta-oe/recipes-support/exiv2/exiv2_0.28.3.bb
index 9ec2f48a77..f9ccdc079f 100644
--- a/meta-oe/recipes-support/exiv2/exiv2_0.28.3.bb
+++ b/meta-oe/recipes-support/exiv2/exiv2_0.28.3.bb
@@ -12,6 +12,8 @@ SRC_URI = "git://github.com/Exiv2/exiv2.git;protocol=https;branch=0.28.x \
12 file://CVE-2026-25884-2.patch \ 12 file://CVE-2026-25884-2.patch \
13 file://CVE-2026-27596-1.patch \ 13 file://CVE-2026-27596-1.patch \
14 file://CVE-2026-27596-2.patch \ 14 file://CVE-2026-27596-2.patch \
15 file://CVE-2026-27631-1.patch \
16 file://CVE-2026-27631-2.patch \
15 " 17 "
16SRCREV = "a6a79ef064f131ffd03c110acce2d3edb84ffa2e" 18SRCREV = "a6a79ef064f131ffd03c110acce2d3edb84ffa2e"
17S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"