Skip to contentSkip to conversation

fio: upgrade 3.41 -> 3.42

PATCH New Gyorgy Sarvari 1 participant 17 messages Apr 20

lore
Share & tools
lore
#0 lore raw

PATCH 1/17 fio: upgrade 3.41 -> 3.42

Contains fix for CVE-2026-30656. Also mark this CVE as patched explicitly, as NVD tracks it without version info.

Drop patches that are included in this release.

Changelog:
https://github.com/axboe/fio/releases/tag/fio-3.42

fio

---
 .../fio/fio/0001-fix-musl-builds.patch        | 38 -------------------
 .../fio/fio/CVE-2025-10823.patch              | 37 ------------------
 .../fio/{fio_3.41.bb => fio_3.42.bb}          |  7 +---
 3 files changed, 2 insertions(+), 80 deletions(-)
 delete mode 100644 meta-oe/recipes-benchmark/fio/fio/0001-fix-musl-builds.patch
 delete mode 100644 meta-oe/recipes-benchmark/fio/fio/CVE-2025-10823.patch
 rename meta-oe/recipes-benchmark/fio/{fio_3.41.bb => fio_3.42.bb} (93%)
meta-oe/recipes-benchmark/fio/fio/0001-fix-musl-builds.patch deleted +0 -38
deleted file mode 100644
index 6c0d69d6e8..0000000000
@@ -1,38 +0,0 @@
-From ccce76d2850d6e52da3d7986c950af068fbfe0fd Mon Sep 17 00:00:00 2001
-From: Arthur Gautier <[email protected]>
-Date: Sat, 13 Dec 2025 20:07:11 -0800
-Subject: [PATCH] fix musl builds
-
-This commit fixes the build on musl which fails with the following
-error:
-```
-oslib/linux-blkzoned.c: In function 'blkzoned_move_zone_wp':
-oslib/linux-blkzoned.c:389:37: error: 'FALLOC_FL_ZERO_RANGE' undeclared (first use in this function)
-  389 |                 ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, z->wp, length);
-      |                                     ^~~~~~~~~~~~~~~~~~~~
-oslib/linux-blkzoned.c:389:37: note: each undeclared identifier is reported only once for each function it appears in
-make: *** [Makefile:501: oslib/linux-blkzoned.o] Error 1
-make: *** Waiting for unfinished jobs....
-```
-
-Upstream-Status: Backport [https://github.com/axboe/fio/commit/ccce76d2850d6e52da3d7986c950af068fbfe0fd]
-Signed-off-by: Arthur Gautier <[email protected]>
----
- oslib/linux-blkzoned.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/oslib/linux-blkzoned.c b/oslib/linux-blkzoned.c
-index 78e25fca..c45ef623 100644
---- a/oslib/linux-blkzoned.c
-+++ b/oslib/linux-blkzoned.c
-@@ -25,6 +25,7 @@
- #ifndef BLKFINISHZONE
- #define BLKFINISHZONE _IOW(0x12, 136, struct blk_zone_range)
- #endif
-+#include <linux/falloc.h>
- 
- /*
-  * If the uapi headers installed on the system lacks zone capacity support,
--- 
-2.51.0
-
meta-oe/recipes-benchmark/fio/fio/CVE-2025-10823.patch deleted +0 -37
deleted file mode 100644
index c5813273c7..0000000000
@@ -1,37 +0,0 @@
-From 6a39dfaffdb8a6c2080eec0dc7fb1ee532d54025 Mon Sep 17 00:00:00 2001
-From: Jens Axboe <[email protected]>
-Date: Tue, 23 Sep 2025 11:50:46 -0600
-Subject: [PATCH] options: check for NULL input string and fail
-
-Waste of time busy work.
-
-Link: https://github.com/axboe/fio/issues/1982
-
-CVE: CVE-2025-10823
-
-Upstream-Status: Backport
-https://github.com/axboe/fio/commit/6a39dfaffdb8a6c2080eec0dc7fb1ee532d54025
-
-Signed-off-by: Jens Axboe <[email protected]>
-Signed-off-by: Saravanan <[email protected]>
----
- options.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/options.c b/options.c
-index c35878f..562c5bc 100644
---- a/options.c
-+++ b/options.c
-@@ -1616,6 +1616,9 @@ static int str_buffer_pattern_cb(void *data, const char *input)
- 	struct thread_data *td = cb_data_to_td(data);
- 	int ret;
- 
-+	if (!input)
-+		return 1;
-+
- 	/* FIXME: for now buffer pattern does not support formats */
- 	ret = parse_and_fill_pattern_alloc(input, strlen(input),
- 				&td->o.buffer_pattern, NULL, NULL, NULL);
--- 
-2.48.1
-
meta-oe/recipes-benchmark/fio/fio_3.42.bb renamed from meta-oe/recipes-benchmark/fio/fio_3.41.bb +2 -5
similarity index 93%
rename from meta-oe/recipes-benchmark/fio/fio_3.41.bb
rename to meta-oe/recipes-benchmark/fio/fio_3.42.bb
index 3f03c41f22..dac7548d08 100644
@@ -24,15 +24,11 @@ PACKAGECONFIG[numa] = ",--disable-numa,numactl"
 
 SRC_URI = " \
     git://git.kernel.dk/fio.git;branch=master;tag=${BP} \
-    file://0001-fix-musl-builds.patch \
 "
-SRCREV = "ed675d3477a70a42d2e757b713f6c7125a27cdca"
-
-SRC_URI += "file://CVE-2025-10823.patch"
+SRCREV = "ab77643023f5d7e3c1b71a7576a564f368bf577a"
 
 UPSTREAM_CHECK_GITTAGREGEX = "fio-(?P<pver>\d+(\.\d+)+)"
 
-
 # avoids build breaks when using no-static-libs.inc
 DISABLE_STATIC = ""
 
@@ -50,3 +46,4 @@ do_install() {
 }
 
 CVE_STATUS[CVE-2025-10824] = "disputed: Maintainer could not reproduce the issue, issue is closed without change."
+CVE_STATUS[CVE-2026-30656] = "fixed-version: fixed in 3.42"
#1 lore raw

PATCH 2/17 jq: patch CVE-2026-32316

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-32316

Backport the patch that is referenced by the NVD advisory.

---
 .../jq/jq/CVE-2026-32316.patch                | 53 +++++++++++++++++++
 meta-oe/recipes-devtools/jq/jq_1.8.1.bb       | 10 ++--
 2 files changed, 58 insertions(+), 5 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/jq/jq/CVE-2026-32316.patch
meta-oe/recipes-devtools/jq/jq/CVE-2026-32316.patch new file +53 -0
new file mode 100644
index 0000000000..1277b356d8
@@ -0,0 +1,53 @@
+From 321e62b356df2d4ed47aba4f3818e447ec4d77fc Mon Sep 17 00:00:00 2001
+From: itchyny <[email protected]>
+Date: Thu, 12 Mar 2026 20:28:43 +0900
+Subject: [PATCH] Fix heap buffer overflow in `jvp_string_append` and
+ `jvp_string_copy_replace_bad`
+
+In `jvp_string_append`, the allocation size `(currlen + len) * 2` could
+overflow `uint32_t` when `currlen + len` exceeds `INT_MAX`, causing a small
+allocation followed by a large `memcpy`.
+
+In `jvp_string_copy_replace_bad`, the output buffer size calculation
+`length * 3 + 1` could overflow `uint32_t`, again resulting in a small
+allocation followed by a large write.
+
+Add overflow checks to both functions to return an error for strings
+that would exceed `INT_MAX` in length. Fixes CVE-2026-32316.
+
+CVE: CVE-2026-32316
+Upstream-Status: Backport [https://github.com/jqlang/jq/commit/e47e56d226519635768e6aab2f38f0ab037c09e5]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ src/jv.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/src/jv.c b/src/jv.c
+index e4529a4..74be05a 100644
+--- a/src/jv.c
++++ b/src/jv.c
+@@ -1114,7 +1114,12 @@ static jv jvp_string_copy_replace_bad(const char* data, uint32_t length) {
+   const char* end = data + length;
+   const char* i = data;
+ 
+-  uint32_t maxlength = length * 3 + 1; // worst case: all bad bytes, each becomes a 3-byte U+FFFD
++  // worst case: all bad bytes, each becomes a 3-byte U+FFFD
++  uint64_t maxlength = (uint64_t)length * 3 + 1;
++  if (maxlength >= INT_MAX) {
++    return jv_invalid_with_msg(jv_string("String too long"));
++  }
++
+   jvp_string* s = jvp_string_alloc(maxlength);
+   char* out = s->data;
+   int c = 0;
+@@ -1174,6 +1179,10 @@ static uint32_t jvp_string_remaining_space(jvp_string* s) {
+ static jv jvp_string_append(jv string, const char* data, uint32_t len) {
+   jvp_string* s = jvp_string_ptr(string);
+   uint32_t currlen = jvp_string_length(s);
++  if ((uint64_t)currlen + len >= INT_MAX) {
++    jv_free(string);
++    return jv_invalid_with_msg(jv_string("String too long"));
++  }
+ 
+   if (jvp_refcnt_unshared(string.u.ptr) &&
+       jvp_string_remaining_space(s) >= len) {
meta-oe/recipes-devtools/jq/jq_1.8.1.bb +5 -5
index 6eaa2de6df..71d7387bf8 100644
@@ -10,11 +10,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=cf7fcb0a1def4a7ad62c028f7d0dca47"
 
 SRCREV = "4467af7068b1bcd7f882defff6e7ea674c5357f4"
 
-SRC_URI = " \
-    git://github.com/jqlang/jq.git;protocol=https;branch=master;tag=jq-${PV} \
-    file://run-ptest \
-    file://0001-Support-building-with-disable-maintainer-mode-and-so.patch \
-"
+SRC_URI = "git://github.com/jqlang/jq.git;protocol=https;branch=master;tag=jq-${PV} \
+           file://run-ptest \
+           file://0001-Support-building-with-disable-maintainer-mode-and-so.patch \
+           file://CVE-2026-32316.patch \
+           "
 
 inherit autotools ptest
 
#2 lore raw

PATCH 3/17 jq: patch CVE-2026-33947

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-33947

Backport the patch that is referenced by the NVD report.

---
 .../jq/jq/CVE-2026-33947.patch                | 104 ++++++++++++++++++
 meta-oe/recipes-devtools/jq/jq_1.8.1.bb       |   1 +
 2 files changed, 105 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/jq/jq/CVE-2026-33947.patch
meta-oe/recipes-devtools/jq/jq/CVE-2026-33947.patch new file +104 -0
new file mode 100644
index 0000000000..69a8381f06
@@ -0,0 +1,104 @@
+From 5fd935884a6f5b3d8ecdcacfc5d3982140f3a478 Mon Sep 17 00:00:00 2001
+From: itchyny <[email protected]>
+Date: Mon, 13 Apr 2026 11:23:40 +0900
+Subject: [PATCH] Limit path depth to prevent stack overflow
+
+Deeply nested path arrays can cause unbounded recursion in
+`jv_setpath`, `jv_getpath`, and `jv_delpaths`, leading to
+stack overflow. Add a depth limit of 10000 to match the
+existing `tojson` depth limit. This fixes CVE-2026-33947.
+
+CVE: CVE-2026-33947
+Upstream-Status: Backport [https://github.com/jqlang/jq/commit/fb59f1491058d58bdc3e8dd28f1773d1ac690a1f]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ src/jv_aux.c  | 21 +++++++++++++++++++++
+ tests/jq.test | 25 +++++++++++++++++++++++++
+ 2 files changed, 46 insertions(+)
+
+diff --git a/src/jv_aux.c b/src/jv_aux.c
+index bc1405f..594a21f 100644
+--- a/src/jv_aux.c
++++ b/src/jv_aux.c
+@@ -375,6 +375,10 @@ static jv jv_dels(jv t, jv keys) {
+   return t;
+ }
+ 
++#ifndef MAX_PATH_DEPTH
++#define MAX_PATH_DEPTH (10000)
++#endif
++
+ jv jv_setpath(jv root, jv path, jv value) {
+   if (jv_get_kind(path) != JV_KIND_ARRAY) {
+     jv_free(value);
+@@ -382,6 +386,12 @@ jv jv_setpath(jv root, jv path, jv value) {
+     jv_free(path);
+     return jv_invalid_with_msg(jv_string("Path must be specified as an array"));
+   }
++  if (jv_array_length(jv_copy(path)) > MAX_PATH_DEPTH) {
++    jv_free(value);
++    jv_free(root);
++    jv_free(path);
++    return jv_invalid_with_msg(jv_string("Path too deep"));
++  }
+   if (!jv_is_valid(root)){
+     jv_free(value);
+     jv_free(path);
+@@ -434,6 +444,11 @@ jv jv_getpath(jv root, jv path) {
+     jv_free(path);
+     return jv_invalid_with_msg(jv_string("Path must be specified as an array"));
+   }
++  if (jv_array_length(jv_copy(path)) > MAX_PATH_DEPTH) {
++    jv_free(root);
++    jv_free(path);
++    return jv_invalid_with_msg(jv_string("Path too deep"));
++  }
+   if (!jv_is_valid(root)) {
+     jv_free(path);
+     return root;
+@@ -511,6 +526,12 @@ jv jv_delpaths(jv object, jv paths) {
+       jv_free(elem);
+       return err;
+     }
++    if (jv_array_length(jv_copy(elem)) > MAX_PATH_DEPTH) {
++      jv_free(object);
++      jv_free(paths);
++      jv_free(elem);
++      return jv_invalid_with_msg(jv_string("Path too deep"));
++    }
+     jv_free(elem);
+   }
+   if (jv_array_length(jv_copy(paths)) == 0) {
+diff --git a/tests/jq.test b/tests/jq.test
+index 4ecf72f..6186d8b 100644
+--- a/tests/jq.test
++++ b/tests/jq.test
+@@ -2507,3 +2507,28 @@ strflocaltime("" | ., @uri)
+ 0
+ ""
+ ""
++
++# regression test for CVE-2026-33947
++setpath([range(10000) | 0]; 0) | flatten
++null
++[0]
++
++try setpath([range(10001) | 0]; 0) catch .
++null
++"Path too deep"
++
++getpath([range(10000) | 0])
++null
++null
++
++try getpath([range(10001) | 0]) catch .
++null
++"Path too deep"
++
++delpaths([[range(10000) | 0]])
++null
++null
++
++try delpaths([[range(10001) | 0]]) catch .
++null
++"Path too deep"
meta-oe/recipes-devtools/jq/jq_1.8.1.bb +1 -0
index 71d7387bf8..6df1d46f48 100644
@@ -14,6 +14,7 @@ SRC_URI = "git://github.com/jqlang/jq.git;protocol=https;branch=master;tag=jq-${
            file://run-ptest \
            file://0001-Support-building-with-disable-maintainer-mode-and-so.patch \
            file://CVE-2026-32316.patch \
+           file://CVE-2026-33947.patch \
            "
 
 inherit autotools ptest
#3 lore raw

PATCH 4/17 jq: patch CVE-2026-33948

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-33948

Backport the patch that is referenced by the NVD advisory.

---
 .../jq/jq/CVE-2026-33948.patch                | 49 +++++++++++++++++++
 meta-oe/recipes-devtools/jq/jq_1.8.1.bb       |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/jq/jq/CVE-2026-33948.patch
meta-oe/recipes-devtools/jq/jq/CVE-2026-33948.patch new file +49 -0
new file mode 100644
index 0000000000..8625429c74
@@ -0,0 +1,49 @@
+From 19a792c4cdb6b91c056eac033ac3367af6e67755 Mon Sep 17 00:00:00 2001
+From: itchyny <[email protected]>
+Date: Mon, 13 Apr 2026 08:46:11 +0900
+Subject: [PATCH] Fix NUL truncation in the JSON parser
+
+This fixes CVE-2026-33948.
+
+CVE: CVE-2026-33948
+Upstream-Status: Backport [https://github.com/jqlang/jq/commit/6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ src/util.c   | 8 +-------
+ tests/shtest | 6 ++++++
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/util.c b/src/util.c
+index bcb86da..60ec4d5 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -309,13 +309,7 @@ static int jq_util_input_read_more(jq_util_input_state *state) {
+       if (p != NULL)
+         state->current_line++;
+ 
+-      if (p == NULL && state->parser != NULL) {
+-        /*
+-         * There should be no NULs in JSON texts (but JSON text
+-         * sequences are another story).
+-         */
+-        state->buf_valid_len = strlen(state->buf);
+-      } else if (p == NULL && feof(state->current_input)) {
++      if (p == NULL && feof(state->current_input)) {
+         size_t i;
+ 
+         /*
+diff --git a/tests/shtest b/tests/shtest
+index 887a6bb..a046afe 100755
+--- a/tests/shtest
++++ b/tests/shtest
+@@ -842,4 +842,10 @@ if ! $msys && ! $mingw; then
+   fi
+ fi
+ 
++# CVE-2026-33948: No NUL truncation in the JSON parser
++if printf '{}\x00{}' | $JQ >/dev/null 2> /dev/null; then
++  printf 'Error expected but jq exited successfully\n' 1>&2
++  exit 1
++fi
++
+ exit 0
meta-oe/recipes-devtools/jq/jq_1.8.1.bb +1 -0
index 6df1d46f48..acea1e4b27 100644
@@ -15,6 +15,7 @@ SRC_URI = "git://github.com/jqlang/jq.git;protocol=https;branch=master;tag=jq-${
            file://0001-Support-building-with-disable-maintainer-mode-and-so.patch \
            file://CVE-2026-32316.patch \
            file://CVE-2026-33947.patch \
+           file://CVE-2026-33948.patch \
            "
 
 inherit autotools ptest
#4 lore raw

PATCH 5/17 jq: patch CVE-2026-39979

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-39979

Backport the patch that is referenced by the NVD advisory.y

---
 .../jq/jq/CVE-2026-39979.patch                | 31 +++++++++++++++++++
 meta-oe/recipes-devtools/jq/jq_1.8.1.bb       |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/jq/jq/CVE-2026-39979.patch
meta-oe/recipes-devtools/jq/jq/CVE-2026-39979.patch new file +31 -0
new file mode 100644
index 0000000000..40c57a46a0
@@ -0,0 +1,31 @@
+From ac09f274b6c029a23e3dffc38afac819b5daacc4 Mon Sep 17 00:00:00 2001
+From: itchyny <[email protected]>
+Date: Mon, 13 Apr 2026 11:04:52 +0900
+Subject: [PATCH] Fix out-of-bounds read in jv_parse_sized()
+
+This fixes CVE-2026-39979.
+
+Co-authored-by: Mattias Wadman <[email protected]>
+
+CVE: CVE-2026-39979
+Upstream-Status: Backport [https://github.com/jqlang/jq/commit/2f09060afab23fe9390cce7cb860b10416e1bf5f]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ src/jv_parse.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/jv_parse.c b/src/jv_parse.c
+index ffcf51f..e6b8aa9 100644
+--- a/src/jv_parse.c
++++ b/src/jv_parse.c
+@@ -892,8 +892,9 @@ jv jv_parse_sized_custom_flags(const char* string, int length, int flags) {
+ 
+   if (!jv_is_valid(value) && jv_invalid_has_msg(jv_copy(value))) {
+     jv msg = jv_invalid_get_msg(value);
+-    value = jv_invalid_with_msg(jv_string_fmt("%s (while parsing '%s')",
++    value = jv_invalid_with_msg(jv_string_fmt("%s (while parsing '%.*s')",
+                                               jv_string_value(msg),
++                                              length,
+                                               string));
+     jv_free(msg);
+   }
meta-oe/recipes-devtools/jq/jq_1.8.1.bb +1 -0
index acea1e4b27..026f6bfa71 100644
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/jqlang/jq.git;protocol=https;branch=master;tag=jq-${
            file://CVE-2026-32316.patch \
            file://CVE-2026-33947.patch \
            file://CVE-2026-33948.patch \
+           file://CVE-2026-39979.patch \
            "
 
 inherit autotools ptest
#5 lore raw

PATCH 6/17 lcms: patch CVE-2026-41254

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-41254

Backport the patches referenced by the NVD advisory.

---
 .../lcms/lcms/CVE-2026-41254_1.patch          | 28 +++++++++++++++
 .../lcms/lcms/CVE-2026-41254_2.patch          | 34 +++++++++++++++++++
 meta-oe/recipes-support/lcms/lcms_2.18.bb     |  5 ++-
 3 files changed, 66 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/lcms/lcms/CVE-2026-41254_1.patch
 create mode 100644 meta-oe/recipes-support/lcms/lcms/CVE-2026-41254_2.patch
meta-oe/recipes-support/lcms/lcms/CVE-2026-41254_1.patch new file +28 -0
new file mode 100644
index 0000000000..2ed8e9f587
@@ -0,0 +1,28 @@
+From c83cfcd249d06950a307cee8d1e22b7f6a78a8a7 Mon Sep 17 00:00:00 2001
+From: Marti Maria <[email protected]>
+Date: Thu, 19 Feb 2026 09:07:20 +0100
+Subject: [PATCH] Fix integer overflow in CubeSize()
+
+Thanks to @zerojackyi for reporting
+
+CVE: CVE-2026-41254
+Upstream-Status: Backport [https://github.com/mm2/Little-CMS/commit/da6110b1d14abc394633a388209abd5ebedd7ab0]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ src/cmslut.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/cmslut.c b/src/cmslut.c
+index 1089148..b245209 100644
+--- a/src/cmslut.c
++++ b/src/cmslut.c
+@@ -460,7 +460,8 @@ void EvaluateCLUTfloatIn16(const cmsFloat32Number In[], cmsFloat32Number Out[],
+ static
+ cmsUInt32Number CubeSize(const cmsUInt32Number Dims[], cmsUInt32Number b)
+ {
+-    cmsUInt32Number rv, dim;
++    cmsUInt32Number dim;
++    cmsUInt64Number rv;
+ 
+     _cmsAssert(Dims != NULL);
+ 
meta-oe/recipes-support/lcms/lcms/CVE-2026-41254_2.patch new file +34 -0
new file mode 100644
index 0000000000..be8c759a6f
@@ -0,0 +1,34 @@
+From f5994aea02d5620f3182cafdcf116ffe9d6c9fd2 Mon Sep 17 00:00:00 2001
+From: Marti Maria <[email protected]>
+Date: Thu, 12 Mar 2026 22:57:35 +0100
+Subject: [PATCH] check for overflow
+
+Thanks to Guanni Qu for detecting & reporting the issue
+
+CVE: CVE-2026-41254
+Upstream-Status: Backport [https://github.com/mm2/Little-CMS/commit/e0641b1828d0a1af5ecb1b11fe22f24fceefd4bc]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ src/cmslut.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/cmslut.c b/src/cmslut.c
+index b245209..c1dbb32 100644
+--- a/src/cmslut.c
++++ b/src/cmslut.c
+@@ -468,12 +468,12 @@ cmsUInt32Number CubeSize(const cmsUInt32Number Dims[], cmsUInt32Number b)
+     for (rv = 1; b > 0; b--) {
+ 
+         dim = Dims[b-1];
+-        if (dim <= 1) return 0;  // Error
+-
+-        rv *= dim;
++        if (dim <= 1) return 0;  
+ 
+         // Check for overflow
+         if (rv > UINT_MAX / dim) return 0;
++
++        rv *= dim;
+     }
+ 
+     // Again, prevent overflow
meta-oe/recipes-support/lcms/lcms_2.18.bb +4 -1
index 79e4a6f694..1ff3b3908f 100644
@@ -3,7 +3,10 @@ SECTION = "libs"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e9ce323c4b71c943a785db90142b228a"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/lcms/lcms2-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/lcms/lcms2-${PV}.tar.gz \
+           file://CVE-2026-41254_1.patch \
+           file://CVE-2026-41254_2.patch \
+           "
 SRC_URI[sha256sum] = "ee67be3566f459362c1ee094fde2c159d33fa0390aa4ed5f5af676f9e5004347"
 
 DEPENDS = "tiff"
#6 lore raw

PATCH 7/17 libcoap: upgrade 4.3.5a -> 4.3.5b

In reply to Gyorgy Sarvari

Contains fix fox CVE-2026-29013

Shortlog:
https://github.com/obgm/libcoap/compare/v4.3.5a...v4.3.5b

---
 .../libcoap/{libcoap_4.3.5a.bb => libcoap_4.3.5b.bb}            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-networking/recipes-devtools/libcoap/{libcoap_4.3.5a.bb => libcoap_4.3.5b.bb} (97%)
meta-networking/recipes-devtools/libcoap/libcoap_4.3.5b.bb renamed from meta-networking/recipes-devtools/libcoap/libcoap_4.3.5a.bb +1 -1
similarity index 97%
rename from meta-networking/recipes-devtools/libcoap/libcoap_4.3.5a.bb
rename to meta-networking/recipes-devtools/libcoap/libcoap_4.3.5b.bb
index 611795e17d..e7279013ed 100644
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=05d17535846895e23ea4c79b16a9e904"
 SRC_URI = "git://github.com/obgm/libcoap.git;branch=release-4.3.5-patches;protocol=https;tag=v${PV} \
            file://run-ptest \
            "
-SRCREV = "e3fdcdcfbd1588754fe9dd4b754ac9397260f0f9"
+SRCREV = "851533c3cf63d16984d370ce39d586ecb3694971"
 
 # patch releases often use alphabetical suffixes
 CVE_VERSION_SUFFIX = "alphabetical"
#7 lore raw

PATCH 8/17 gphoto2: upgrade 2.5.28 -> 2.5.32

In reply to Gyorgy Sarvari

Drop patches that were merged in this release.

Changelog:
- --get-exif , --get-all-exif added
- --reverse modifier option added for fileoperations commands
- kill -USR2 can now stop --capture-movie
- updated translations

---
 ...ototypes-of-callbacks-with-libgphoto.patch | 50 -------------------
 ...figure-Filter-out-buildpaths-from-CC.patch |  8 +--
 ...01-configure.ac-remove-AM_PO_SUBDIRS.patch |  8 +--
 ...thread_t-abstract-type-for-thead-IDs.patch | 39 ---------------
 .../{gphoto2_2.5.28.bb => gphoto2_2.5.32.bb}  |  4 +-
 5 files changed, 9 insertions(+), 100 deletions(-)
 delete mode 100644 meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch
 delete mode 100644 meta-oe/recipes-graphics/gphoto2/gphoto2/0001-gphoto2-Use-pthread_t-abstract-type-for-thead-IDs.patch
 rename meta-oe/recipes-graphics/gphoto2/{gphoto2_2.5.28.bb => gphoto2_2.5.32.bb} (70%)
meta-oe/recipes-graphics/gphoto2/gphoto2/0001-Match-prototypes-of-callbacks-with-libgphoto.patch deleted +0 -50
deleted file mode 100644
index e0c3de469a..0000000000
@@ -1,50 +0,0 @@
-From 366930ccc1a261c3eb883da2bf3c655162ccd75f Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Wed, 1 Mar 2023 22:58:37 -0800
-Subject: [PATCH] Match prototypes of callbacks with libgphoto
-
-In https://github.com/gphoto/gphoto2/pull/535/commits/ccc4c1f092bd21ebc713f4d7b9be85be49f92f1e
-we tried to fix by using pthread_t but it also needs to make changes in
-libgphoto and these changes can be invasive, therefore lets revert to
-older types and to fix musl problem fix it via type casts
-
-Upstream-Status: Backport [https://github.com/gphoto/gphoto2/pull/569]
-Signed-off-by: Khem Raj <[email protected]>
----
- gphoto2/main.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gphoto2/main.c b/gphoto2/main.c
-index 0dac947..cd3c990 100644
---- a/gphoto2/main.c
-+++ b/gphoto2/main.c
-@@ -1198,7 +1198,7 @@ thread_func (void *data)
- 	pthread_cleanup_pop (1);
- }
- 
--static pthread_t
-+static unsigned int
- start_timeout_func (Camera *camera, unsigned int timeout,
- 		    CameraTimeoutFunc func, void __unused__ *data)
- {
-@@ -1215,14 +1215,14 @@ start_timeout_func (Camera *camera, unsigned int timeout,
- 
- 	pthread_create (&tid, NULL, thread_func, td);
- 
--	return (tid);
-+	return (unsigned int)tid;
- }
- 
- static void
--stop_timeout_func (Camera __unused__ *camera, pthread_t id,
-+stop_timeout_func (Camera __unused__ *camera, unsigned int id,
- 		   void __unused__ *data)
- {
--	pthread_t tid = id;
-+	pthread_t tid = (pthread_t)id;
- 
- 	pthread_cancel (tid);
- 	pthread_join (tid, NULL);
--- 
-2.39.2
-
meta-oe/recipes-graphics/gphoto2/gphoto2/0001-configure-Filter-out-buildpaths-from-CC.patch +4 -4
index 3d54d58e18..bd916e339a 100644
@@ -14,13 +14,13 @@ Signed-off-by: Khem Raj <[email protected]>
 --- a/configure.ac
 +++ b/configure.ac
 @@ -26,7 +26,9 @@ AC_PROG_INSTALL
- AC_SYS_LARGEFILE
+ ])
  
- GP_CONFIG_MSG([Compiler],[${CC}])
--AC_DEFINE_UNQUOTED([HAVE_CC],"$CC",[The C compiler we're using])
+ GP_CONFIG_MSG([Compiler], [${CC}])
+-AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC"], [The C compiler we are using])
 +CC_NO_SYSROOT=`echo $CC | sed -e \
 +	's|--sysroot=.*\b||g'`
-+AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC_NO_SYSROOT"], [The C compiler we're using])
++AC_DEFINE_UNQUOTED([HAVE_CC], ["$CC_NO_SYSROOT"], [The C compiler we are using])
  
  dnl AC_STRUCT_TIMEZONE
  
meta-oe/recipes-graphics/gphoto2/gphoto2/0001-configure.ac-remove-AM_PO_SUBDIRS.patch +4 -4
index 14976ffb72..358dbbb51a 100644
@@ -14,10 +14,10 @@ Upstream-Status: Pending
 --- a/configure.ac
 +++ b/configure.ac
 @@ -46,7 +46,6 @@ dnl i18n support
- dnl ---------------------------------------------------------------------------
- GP_GETTEXT_HACK([],[Lutz Müller and others],[${MAIL_GPHOTO_TRANSLATION}])
- ALL_LINGUAS="az cs da de en_GB es eu fi fr hu id is it ja nl pa pl pt_BR ro ru rw sk sr sv uk vi zh_CN zh_TW"
+ GP_GETTEXT_SETUP([GETTEXT_PACKAGE_GPHOTO2],
+                  [gphoto2],
+                  [po])
 -AM_PO_SUBDIRS()
- AM_GNU_GETTEXT_VERSION([0.14.1])
+ AM_GNU_GETTEXT_VERSION([0.19.1])
  AM_GNU_GETTEXT([external])
  AM_ICONV()
meta-oe/recipes-graphics/gphoto2/gphoto2/0001-gphoto2-Use-pthread_t-abstract-type-for-thead-IDs.patch deleted +0 -39
deleted file mode 100644
index a27c02cefc..0000000000
@@ -1,39 +0,0 @@
-From 23c67e93e51f700d0aeecfc08277e39f51201fc3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Fri, 2 Sep 2022 12:59:46 -0700
-Subject: [PATCH] gphoto2: Use pthread_t abstract type for thead IDs
-
-This is not a plain old datatype in every libc, e.g. with musl this
-would fail in type conversion
-
-Upstream-Status: Submitted [https://github.com/gphoto/gphoto2/pull/535]
-Signed-off-by: Khem Raj <[email protected]>
----
- gphoto2/main.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gphoto2/main.c b/gphoto2/main.c
-index 2bf5964..9a6b05d 100644
---- a/gphoto2/main.c
-+++ b/gphoto2/main.c
-@@ -1198,7 +1198,7 @@ thread_func (void *data)
- 	pthread_cleanup_pop (1);
- }
- 
--static unsigned int
-+static pthread_t
- start_timeout_func (Camera *camera, unsigned int timeout,
- 		    CameraTimeoutFunc func, void __unused__ *data)
- {
-@@ -1219,7 +1219,7 @@ start_timeout_func (Camera *camera, unsigned int timeout,
- }
- 
- static void
--stop_timeout_func (Camera __unused__ *camera, unsigned int id,
-+stop_timeout_func (Camera __unused__ *camera, pthread_t id,
- 		   void __unused__ *data)
- {
- 	pthread_t tid = id;
--- 
-2.37.3
-
meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.32.bb renamed from meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb +1 -3
similarity index 70%
rename from meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb
rename to meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.32.bb
index 40409ed388..e5e7c6926f 100644
@@ -8,11 +8,9 @@ RDEPENDS:gphoto2 = "libgphoto2"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.bz2;name=gphoto2 \
            file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
-           file://0001-gphoto2-Use-pthread_t-abstract-type-for-thead-IDs.patch \
-           file://0001-Match-prototypes-of-callbacks-with-libgphoto.patch \
            file://0001-configure-Filter-out-buildpaths-from-CC.patch \
 "
-SRC_URI[gphoto2.sha256sum] = "2a648dcdf12da19e208255df4ebed3e7d2a02f905be4165f2443c984cf887375"
+SRC_URI[gphoto2.sha256sum] = "4e379a0f12f72b49ee5ee2283ffd806b5d12d099939d75197a3f4bbc7f27a1a1"
 
 inherit autotools pkgconfig gettext
 
#8 lore raw

PATCH 9/17 libgphoto2: patch CVE-2026-40333

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-40333

Backport the patch referenced by the NVD advisory.

---
 .../gphoto2/libgphoto2/CVE-2026-40333.patch   | 150 ++++++++++++++++++
 .../gphoto2/libgphoto2_2.5.33.bb              |   5 +-
 2 files changed, 153 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40333.patch
meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40333.patch new file +150 -0
new file mode 100644
index 0000000000..77c307e88d
@@ -0,0 +1,150 @@
+From 8fefd2da7b9e2c7c448086cd251b108c0ebf1262 Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <[email protected]>
+Date: Wed, 8 Apr 2026 15:18:42 +0200
+Subject: [PATCH] Fixed EOS ImageFormat/CustomFuncEx Parsers Lack Length
+ Parameter
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ptp_unpack_EOS_ImageFormat() and ptp_unpack_EOS_CustomFuncEx() accept
+const unsigned char** data but no length/size parameter. They perform
+unbounded reads via dtoh32o calls (up to 36 bytes for ImageFormat,
+up to 1024 bytes for CustomFuncEx). Callers in ptp_unpack_EOS_events()
+have xsize available but never pass it.
+
+ CVE-2026-40333
+
+Reported-By: Sebastián Alba <[email protected]>
+
+CVE: CVE-2026-40333
+Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/1817ecead20c2aafa7549dac9619fe38f47b2f53]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ camlibs/ptp2/ptp-pack.c | 53 ++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 44 insertions(+), 9 deletions(-)
+
+diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
+index 09421b7..09dcc24 100644
+--- a/camlibs/ptp2/ptp-pack.c
++++ b/camlibs/ptp2/ptp-pack.c
+@@ -1448,7 +1448,7 @@ ptp_unpack_Canon_EOS_FE (PTPParams *params, const unsigned char* data, unsigned
+ 
+ 
+ static inline uint16_t
+-ptp_unpack_EOS_ImageFormat (PTPParams* params, const unsigned char** data )
++ptp_unpack_EOS_ImageFormat (PTPParams* params, const unsigned char** data, unsigned int *size )
+ {
+ 	/*
+ 	  EOS ImageFormat entries look are a sequence of u32 values:
+@@ -1492,30 +1492,57 @@ ptp_unpack_EOS_ImageFormat (PTPParams* params, const unsigned char** data )
+ 
+ 	const uint8_t* d = *data;
+ 	uint32_t offset = 0;
+-	uint32_t n = dtoh32o (d, offset);
++	uint32_t n;
+ 	uint32_t l, t1, s1, c1, t2 = 0, s2 = 0, c2 = 0;
+ 
++	if (*size < sizeof(uint32_t)) {
++		ptp_debug (params, "parsing EOS ImageFormat property failed 1 (size %d)", *size);
++		return 0;
++	}
++	n = dtoh32o (d, offset);
++	*size -= sizeof(uint32_t);
++
+ 	if (n != 1 && n !=2) {
+ 		ptp_debug (params, "parsing EOS ImageFormat property failed (n != 1 && n != 2: %d)", n);
+ 		return 0;
+ 	}
+-
++	if (*size < sizeof(uint32_t)) {
++		ptp_debug (params, "parsing EOS ImageFormat property failed 2 (size %d)", *size);
++		return 0;
++	}
+ 	l = dtoh32o (d, offset);
++	*size -= sizeof(uint32_t);
++
+ 	if (l != 0x10) {
+ 		ptp_debug (params, "parsing EOS ImageFormat property failed (l != 0x10: 0x%x)", l);
+ 		return 0;
+ 	}
+ 
++	if (*size < 3*sizeof(uint32_t)) {
++		ptp_debug (params, "parsing EOS ImageFormat property failed 3 (size %d)", *size);
++		return 0;
++	}
+ 	t1 = dtoh32o (d, offset);
+ 	s1 = dtoh32o (d, offset);
+ 	c1 = dtoh32o (d, offset);
++	*size -= 3*sizeof(uint32_t);
+ 
+ 	if (n == 2) {
++		if (*size < sizeof(uint32_t)) {
++			ptp_debug (params, "parsing EOS ImageFormat property failed 4 (size %d)", *size);
++			return 0;
++		}
+ 		l = dtoh32o (d, offset);
++		*size -= sizeof(uint32_t);
++
+ 		if (l != 0x10) {
+ 			ptp_debug (params, "parsing EOS ImageFormat property failed (l != 0x10: 0x%x)", l);
+ 			return 0;
+ 		}
++		if (*size < 3*sizeof(uint32_t)) {
++			ptp_debug (params, "parsing EOS ImageFormat property failed 5 (size %d)", *size);
++			return 0;
++		}
+ 		t2 = dtoh32o (d, offset);
+ 		s2 = dtoh32o (d, offset);
+ 		c2 = dtoh32o (d, offset);
+@@ -1668,12 +1695,20 @@ ptp_unpack_EOS_FocusInfoEx (PTPParams* params, const unsigned char** data, uint3
+ 
+ 
+ static inline char*
+-ptp_unpack_EOS_CustomFuncEx (PTPParams* params, const unsigned char** data )
++ptp_unpack_EOS_CustomFuncEx (PTPParams* params, const unsigned char** data, unsigned int *size )
+ {
+-	uint32_t s = dtoh32a( *data );
+-	uint32_t n = s/4, i;
++	uint32_t s, n, i;
+ 	char	*str, *p;
+ 
++	if (*size < sizeof(uint32_t))
++		return strdup("bad length");
++
++	s = dtoh32a( *data );
++	n = s/4;
++
++	if (*size < 4+s)
++		return strdup("bad length");
++
+ 	if (s > 1024) {
+ 		ptp_debug (params, "customfuncex data is larger than 1k / %d... unexpected?", s);
+ 		return strdup("bad length");
+@@ -1962,7 +1997,7 @@ ptp_unpack_EOS_events (PTPParams *params, const unsigned char* data, unsigned in
+ 			case PTP_DPC_CANON_EOS_ImageFormatExtHD:
+ 				/* special handling of ImageFormat properties */
+ 				for (j=0;j<dpd_count;j++) {
+-					dpd->FORM.Enum.SupportedValue[j].u16 = ptp_unpack_EOS_ImageFormat( params, &xdata );
++					dpd->FORM.Enum.SupportedValue[j].u16 = ptp_unpack_EOS_ImageFormat( params, &xdata, &xsize );
+ 					ptp_debug (params, INDENT "prop %x option[%2d] == 0x%04x", dpc, j, dpd->FORM.Enum.SupportedValue[j].u16);
+ 				}
+ 				break;
+@@ -2267,7 +2302,7 @@ ptp_unpack_EOS_events (PTPParams *params, const unsigned char* data, unsigned in
+ 			case PTP_DPC_CANON_EOS_ImageFormatSD:
+ 			case PTP_DPC_CANON_EOS_ImageFormatExtHD:
+ 				dpd->DataType = PTP_DTC_UINT16;
+-				dpd->DefaultValue.u16 = ptp_unpack_EOS_ImageFormat( params, &xdata );
++				dpd->DefaultValue.u16 = ptp_unpack_EOS_ImageFormat( params, &xdata, &xsize );
+ 				dpd->CurrentValue.u16 = dpd->DefaultValue.u16;
+ 				ptp_debug (params, INDENT "prop %x value == 0x%04x (u16)", dpc, dpd->CurrentValue.u16);
+ 				break;
+@@ -2275,7 +2310,7 @@ ptp_unpack_EOS_events (PTPParams *params, const unsigned char* data, unsigned in
+ 				dpd->DataType = PTP_DTC_STR;
+ 				free (dpd->DefaultValue.str);
+ 				free (dpd->CurrentValue.str);
+-				dpd->DefaultValue.str = ptp_unpack_EOS_CustomFuncEx( params, &xdata );
++				dpd->DefaultValue.str = ptp_unpack_EOS_CustomFuncEx( params, &xdata, &xsize );
+ 				dpd->CurrentValue.str = strdup( (char*)dpd->DefaultValue.str );
+ 				ptp_debug (params, INDENT "prop %x value == %s", dpc, dpd->CurrentValue.str);
+ 				break;
meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb +3 -2
index 3644bd9bf4..ac7892151f 100644
@@ -12,8 +12,9 @@ DEPENDS = "libtool jpeg virtual/libusb0 libexif zlib libxml2"
 SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.xz;name=libgphoto2 \
            file://40-libgphoto2.rules \
            file://0001-configure-Filter-out-buildpaths-from-CC.patch \
-		   file://0001-libgphoto2-fix-const-correctness-for-c23-builds.patch \
-"
+           file://0001-libgphoto2-fix-const-correctness-for-c23-builds.patch \
+           file://CVE-2026-40333.patch \
+           "
 SRC_URI[libgphoto2.sha256sum] = "28825f767a85544cb58f6e15028f8e53a5bb37a62148b3f1708b524781c3bef2"
 
 UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/gphoto/files/libgphoto/"
#9 lore raw

PATCH 10/17 libgphoto2: patch CVE-2026-40334

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-40334

Backport the patch that is referenced by the NVD advisory.

---
 .../gphoto2/libgphoto2/CVE-2026-40334.patch   | 37 +++++++++++++++++++
 .../gphoto2/libgphoto2_2.5.33.bb              |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40334.patch
meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40334.patch new file +37 -0
new file mode 100644
index 0000000000..883582dff0
@@ -0,0 +1,37 @@
+From 20b33a26b2efdbf2c35c5cacc54a041855ec764b Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <[email protected]>
+Date: Wed, 8 Apr 2026 15:15:54 +0200
+Subject: [PATCH] Fixed Canon FolderEntry Missing Null Termination
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ptp_unpack_Canon_FE() copies filename with strncpy into a 13-byte
+buffer without explicit null termination. The EOS variant at line
+1451–1452 correctly adds fe->Filename[PTP_CANON_FilenameBufferLen-1]
+= 0; confirming this was recognized as necessary but not applied to the
+original Canon path.
+
+ CVE-2026-40334
+
+Reported-By: Sebastián Alba <[email protected]>
+
+CVE: CVE-2026-40334
+Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/259fc7d3bfe534ce4b114c464f55b448670ab873]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ camlibs/ptp2/ptp-pack.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
+index 09dcc24..982b4f4 100644
+--- a/camlibs/ptp2/ptp-pack.c
++++ b/camlibs/ptp2/ptp-pack.c
+@@ -1369,6 +1369,7 @@ ptp_unpack_Canon_FE (PTPParams *params, const unsigned char* data, PTPCANONFolde
+ 	fe->ObjectSize       = dtoh32a(data + PTP_cfe_ObjectSize);
+ 	fe->Time     = (time_t)dtoh32a(data + PTP_cfe_Time);
+ 	strncpy(fe->Filename, (char*)data + PTP_cfe_Filename, PTP_CANON_FilenameBufferLen);
++	fe->Filename[PTP_CANON_FilenameBufferLen-1] = '\0';
+ }
+ 
+ /*
meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb +1 -0
index ac7892151f..e8e56171a1 100644
@@ -14,6 +14,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.xz;name=libgphoto2 \
            file://0001-configure-Filter-out-buildpaths-from-CC.patch \
            file://0001-libgphoto2-fix-const-correctness-for-c23-builds.patch \
            file://CVE-2026-40333.patch \
+           file://CVE-2026-40334.patch \
            "
 SRC_URI[libgphoto2.sha256sum] = "28825f767a85544cb58f6e15028f8e53a5bb37a62148b3f1708b524781c3bef2"
 
#10 lore raw

PATCH 11/17 libgphoto2: patch CVE-2026-40335

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-40335

Backport the patch that is referenced by the NVD advisory.

---
 .../gphoto2/libgphoto2/CVE-2026-40335.patch   | 43 +++++++++++++++++++
 .../gphoto2/libgphoto2_2.5.33.bb              |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40335.patch
meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40335.patch new file +43 -0
new file mode 100644
index 0000000000..dfe832e6c8
@@ -0,0 +1,43 @@
+From edcdf804662eb4340fdc371af4853d6579e969ab Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <[email protected]>
+Date: Wed, 8 Apr 2026 15:07:38 +0200
+Subject: [PATCH] =?UTF-8?q?Fixed=20UINT128/INT128=20Unchecked=20Offset=20A?=
+ =?UTF-8?q?dvance=20(CWE-125)=20=E2=80=94=20MEDIUM?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Finding 5: UINT128/INT128 Unchecked Offset Advance (CWE-125) — MEDIUM
+
+In ptp_unpack_DPV(), the PTP_DTC_UINT128 and PTP_DTC_INT128 cases advance *offset += 16 without verifying 16 bytes remain. The entry check at line 609 only guarantees *offset < total (at least 1 byte available). After the unchecked advance, *offset can exceed total, and the CTVAL macro's bounds check (total - *offset < sizeof(target)) wraps due to unsigned arithmetic.
+
+CVE-2026-40335
+
+Reported-By: Sebastián Alba <[email protected]>
+
+CVE: CVE-2026-40335
+Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/433bde9888d70aa726e32744cd751d7dbe94379a]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ camlibs/ptp2/ptp-pack.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
+index 982b4f4..7fc120d 100644
+--- a/camlibs/ptp2/ptp-pack.c
++++ b/camlibs/ptp2/ptp-pack.c
+@@ -614,10 +614,14 @@ ptp_unpack_DPV (
+ 	case PTP_DTC_UINT64: CTVAL(value->u64,dtoh64a); break;
+ 
+ 	case PTP_DTC_UINT128:
++		if (total - *offset < 16)
++			return 0;
+ 		*offset += 16;
+ 		/*fprintf(stderr,"unhandled unpack of uint128n");*/
+ 		break;
+ 	case PTP_DTC_INT128:
++		if (total - *offset < 16)
++			return 0;
+ 		*offset += 16;
+ 		/*fprintf(stderr,"unhandled unpack of int128n");*/
+ 		break;
meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb +1 -0
index e8e56171a1..269731731b 100644
@@ -15,6 +15,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.xz;name=libgphoto2 \
            file://0001-libgphoto2-fix-const-correctness-for-c23-builds.patch \
            file://CVE-2026-40333.patch \
            file://CVE-2026-40334.patch \
+           file://CVE-2026-40335.patch \
            "
 SRC_URI[libgphoto2.sha256sum] = "28825f767a85544cb58f6e15028f8e53a5bb37a62148b3f1708b524781c3bef2"
 
#11 lore raw

PATCH 12/17 libgphoto2: patch CVE-2026-40336

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-40336

Backport the patch referenced by the NVD advisory.

---
 .../gphoto2/libgphoto2/CVE-2026-40336.patch   | 44 +++++++++++++++++++
 .../gphoto2/libgphoto2_2.5.33.bb              |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40336.patch
meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40336.patch new file +44 -0
new file mode 100644
index 0000000000..1a809b4f25
@@ -0,0 +1,44 @@
+From e19c45d3530f1585805711e14aa4ea788e499f46 Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <[email protected]>
+Date: Wed, 8 Apr 2026 15:13:51 +0200
+Subject: [PATCH] Fixed Sony DPD Secondary Enum List Memory Leak
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Finding 4: Sony DPD Secondary Enum List Memory Leak (CWE-401) — LOW
+
+File: ptp-pack.c:884-885
+
+When processing a secondary enumeration list (2024+ Sony cameras), line
+884–885 overwrites dpd->FORM.Enum.SupportedValue with a new calloc()
+without freeing the previous allocation from line 857. The original
+array and any string values it contains are leaked.
+
+CVE-2026-40336
+
+Reported-By: Sebastián Alba <[email protected]>
+
+CVE: CVE-2026-40336
+Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/404ff02c75f3cb280196fc260a63c4d26cf1a8f6]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ camlibs/ptp2/ptp-pack.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
+index 7fc120d..fc51d77 100644
+--- a/camlibs/ptp2/ptp-pack.c
++++ b/camlibs/ptp2/ptp-pack.c
+@@ -879,6 +879,11 @@ ptp_unpack_Sony_DPD (PTPParams *params, const unsigned char* data, PTPDeviceProp
+ 		/* check if we have a secondary list of items, this is for newer Sonys (2024) */
+ 		if (val < 0x200) {	/* if a secondary list is not provided, this will be the next property code - 0x5XXX or 0xDxxx */
+ 			if (dpd->FormFlag == PTP_DPFF_Enumeration) {
++				/* free old enum variables */
++				for (i=0;i<dpd->FORM.Enum.NumberOfValues;i++)
++					ptp_free_propvalue (dpd->DataType, dpd->FORM.Enum.SupportedValue+i);
++				free (dpd->FORM.Enum.SupportedValue);
++
+ 				N = dtoh16o(data, *poffset);
+ 				dpd->FORM.Enum.SupportedValue = calloc(N,sizeof(dpd->FORM.Enum.SupportedValue[0]));
+ 				if (!dpd->FORM.Enum.SupportedValue)
meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb +1 -0
index 269731731b..bb5470fa7a 100644
@@ -16,6 +16,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.xz;name=libgphoto2 \
            file://CVE-2026-40333.patch \
            file://CVE-2026-40334.patch \
            file://CVE-2026-40335.patch \
+           file://CVE-2026-40336.patch \
            "
 SRC_URI[libgphoto2.sha256sum] = "28825f767a85544cb58f6e15028f8e53a5bb37a62148b3f1708b524781c3bef2"
 
#12 lore raw

PATCH 13/17 libgphoto2: patch CVE-2026-40338

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-40338

Backport the patch referenced by the NVD advisory.

---
 .../gphoto2/libgphoto2/CVE-2026-40338.patch   | 34 +++++++++++++++++++
 .../gphoto2/libgphoto2_2.5.33.bb              |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40338.patch
meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40338.patch new file +34 -0
new file mode 100644
index 0000000000..9f233f2ec9
@@ -0,0 +1,34 @@
+From 43cc20e807cd2935869617a7d8b9488070712c0e Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <[email protected]>
+Date: Sat, 11 Apr 2026 10:47:52 +0200
+Subject: [PATCH] =?UTF-8?q?Fixed=20Sony=20DPD=20Enum=20Count=20OOB=20Read?=
+ =?UTF-8?q?=20(CWE-125)=20=E2=80=94=20MEDIUM?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In the PTP_DPFF_Enumeration case of ptp_unpack_Sony_DPD(), dtoh16o(data, *poffset) reads 2 bytes for enumeration count N without verifying 2 bytes remain. The standard parser at line 704 has this check.
+
+CVE-2026-40338
+
+Reported-By: Sebastián Alba <[email protected]>
+
+CVE: CVE-2026-40338
+Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/3b9f9696be76ae51dca983d9dd8ce586a2561845]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ camlibs/ptp2/ptp-pack.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
+index fc51d77..f90d2a5 100644
+--- a/camlibs/ptp2/ptp-pack.c
++++ b/camlibs/ptp2/ptp-pack.c
+@@ -851,6 +851,7 @@ ptp_unpack_Sony_DPD (PTPParams *params, const unsigned char* data, PTPDeviceProp
+ 		break;
+ 	case PTP_DPFF_Enumeration: {
+ #define N	dpd->FORM.Enum.NumberOfValues
++		if (*poffset + sizeof(uint16_t) > dpdlen) goto outofmemory;
+ 		N = dtoh16o(data, *poffset);
+ 		dpd->FORM.Enum.SupportedValue = calloc(N,sizeof(dpd->FORM.Enum.SupportedValue[0]));
+ 		if (!dpd->FORM.Enum.SupportedValue)
meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb +1 -0
index bb5470fa7a..df23932535 100644
@@ -17,6 +17,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.xz;name=libgphoto2 \
            file://CVE-2026-40334.patch \
            file://CVE-2026-40335.patch \
            file://CVE-2026-40336.patch \
+           file://CVE-2026-40338.patch \
            "
 SRC_URI[libgphoto2.sha256sum] = "28825f767a85544cb58f6e15028f8e53a5bb37a62148b3f1708b524781c3bef2"
 
#13 lore raw

PATCH 14/17 libgphoto2: patch CVE-2026-40339

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-40339

Backport the patch referenced by the NVD advisory.

---
 .../gphoto2/libgphoto2/CVE-2026-40339.patch   | 41 +++++++++++++++++++
 .../gphoto2/libgphoto2_2.5.33.bb              |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40339.patch
meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40339.patch new file +41 -0
new file mode 100644
index 0000000000..b00ac72772
@@ -0,0 +1,41 @@
+From 585e8113b541469347d09c341c2e8b468b431adb Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <[email protected]>
+Date: Sat, 11 Apr 2026 10:50:47 +0200
+Subject: [PATCH] =?UTF-8?q?Fixed=20Sony=20DPD=20FormFlag=20OOB=20Read=20(C?=
+ =?UTF-8?q?WE-125)=20=E2=80=94=20MEDIUM?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ptp_unpack_Sony_DPD() reads the FormFlag byte via dtoh8o(data, *poffset)
+without a prior bounds check. The standard ptp_unpack_DPD() at line
+686–687 correctly validates *offset + sizeof(uint8_t) > dpdlen before
+this same read, but the Sony variant omits this check.
+
+CVE-2026-40339
+
+Reported-By: Sebastián Alba <[email protected]>
+
+CVE: CVE-2026-40339
+Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/09f8a940b1e418b5693f5c11e3016a1ad2cea62d]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ camlibs/ptp2/ptp-pack.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
+index f90d2a5..28648a5 100644
+--- a/camlibs/ptp2/ptp-pack.c
++++ b/camlibs/ptp2/ptp-pack.c
+@@ -833,9 +833,10 @@ ptp_unpack_Sony_DPD (PTPParams *params, const unsigned char* data, PTPDeviceProp
+ 	   code or the Data Type is a string (with two empty strings as
+ 	   values). In both cases Form Flag should be set to 0x00 and FORM is
+ 	   not present. */
+-
+ 	if (*poffset==PTP_dpd_Sony_DefaultValue)
+ 		return 1;
++	if (*poffset + sizeof(uint8_t) > dpdlen)
++		return 1;
+ 
+ 	dpd->FormFlag = dtoh8o(data, *poffset);
+ 	ptp_debug (params, "formflag 0x%04x", dpd->FormFlag);
meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb +1 -0
index df23932535..be761bc940 100644
@@ -18,6 +18,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.xz;name=libgphoto2 \
            file://CVE-2026-40335.patch \
            file://CVE-2026-40336.patch \
            file://CVE-2026-40338.patch \
+           file://CVE-2026-40339.patch \
            "
 SRC_URI[libgphoto2.sha256sum] = "28825f767a85544cb58f6e15028f8e53a5bb37a62148b3f1708b524781c3bef2"
 
#14 lore raw

PATCH 15/17 libgphoto2: patch CVE-2026-40340

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-40340

Backport the patch referenced by the NVD advisory.

---
 .../gphoto2/libgphoto2/CVE-2026-40340.patch   | 40 +++++++++++++++++++
 .../gphoto2/libgphoto2_2.5.33.bb              |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40340.patch
meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40340.patch new file +40 -0
new file mode 100644
index 0000000000..a0852692b0
@@ -0,0 +1,40 @@
+From fd9f234df894caec6c65144b5a4f0264aadf0989 Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <[email protected]>
+Date: Wed, 8 Apr 2026 16:01:48 +0200
+Subject: [PATCH] Fixed ObjectInfo Parser OOB Read
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ptp_unpack_OI() validates len < PTP_oi_SequenceNumber (i.e., len < 48) but then accesses:
+
+    Offsets 48–51: dtoh32a(data + PTP_oi_SequenceNumber) at line 563 (4 bytes OOB)
+    Offset 52: data[PTP_oi_filenamelen] at line 547 (5 bytes OOB)
+    Offset 56: data[PTP_oi_filenamelen+4] at line 547 (9 bytes OOB)
+
+The Samsung Galaxy 64-bit objectsize detection heuristic reads up to 9 bytes beyond the validated boundary.
+
+ CVE-2026-40340
+
+Reported-By: Sebastián Alba <[email protected]>
+
+CVE: CVE-2026-40340
+Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/7c7f515bc88c3d0c4098ac965d313518e0ccbe33]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ camlibs/ptp2/ptp-pack.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
+index 28648a5..9eba06f 100644
+--- a/camlibs/ptp2/ptp-pack.c
++++ b/camlibs/ptp2/ptp-pack.c
+@@ -526,7 +526,7 @@ ptp_unpack_OI (PTPParams *params, const unsigned char* data, PTPObjectInfo *oi,
+ {
+ 	char *capture_date;
+ 
+-	if (!data || len < PTP_oi_SequenceNumber)
++	if (!data || len < PTP_oi_filenamelen + 5)
+ 		return;
+ 
+ 	oi->Filename = oi->Keywords = NULL;
meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb +1 -0
index be761bc940..c82e76a06e 100644
@@ -19,6 +19,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.xz;name=libgphoto2 \
            file://CVE-2026-40336.patch \
            file://CVE-2026-40338.patch \
            file://CVE-2026-40339.patch \
+           file://CVE-2026-40340.patch \
            "
 SRC_URI[libgphoto2.sha256sum] = "28825f767a85544cb58f6e15028f8e53a5bb37a62148b3f1708b524781c3bef2"
 
#15 lore raw

PATCH 16/17 libgphoto2: patch CVE-2026-40341

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-40341

Backport the patch referenced by the NVD advisory.

---
 .../gphoto2/libgphoto2/CVE-2026-40341.patch   | 69 +++++++++++++++++++
 .../gphoto2/libgphoto2_2.5.33.bb              |  1 +
 2 files changed, 70 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40341.patch
meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40341.patch new file +69 -0
new file mode 100644
index 0000000000..b71792c185
@@ -0,0 +1,69 @@
+From 3674dbeafa5157a264ca5e562ffdbef159a2185f Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <[email protected]>
+Date: Wed, 8 Apr 2026 15:28:52 +0200
+Subject: [PATCH] Fixed OOB read in ptp_unpack_EOS_FocusInfoEx
+
+Do not read out values before checking there is sufficient size
+
+CVE-2026-40341
+
+CVE: CVE-2026-40341
+Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/c385b34af260595dfbb5f9329526be5158985987]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ camlibs/ptp2/ptp-pack.c | 34 +++++++++++++++++++++++++---------
+ 1 file changed, 25 insertions(+), 9 deletions(-)
+
+diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
+index 9eba06f..11428ab 100644
+--- a/camlibs/ptp2/ptp-pack.c
++++ b/camlibs/ptp2/ptp-pack.c
+@@ -1629,23 +1629,39 @@ ptp_pack_EOS_ImageFormat (PTPParams* params, unsigned char* data, uint16_t value
+ static inline char*
+ ptp_unpack_EOS_FocusInfoEx (PTPParams* params, const unsigned char** data, uint32_t datasize)
+ {
+-	uint32_t size 			= dtoh32a( *data );
+-	uint32_t halfsize		= dtoh16a( (*data) + 4);
+-	uint32_t version		= dtoh16a( (*data) + 6);
+-	uint32_t focus_points_in_struct	= dtoh16a( (*data) + 8);
+-	uint32_t focus_points_in_use	= dtoh16a( (*data) + 10);
+-	uint32_t sizeX			= dtoh16a( (*data) + 12);
+-	uint32_t sizeY			= dtoh16a( (*data) + 14);
+-	uint32_t size2X			= dtoh16a( (*data) + 16);
+-	uint32_t size2Y			= dtoh16a( (*data) + 18);
++	uint32_t size;
++	uint32_t halfsize;
++	uint32_t version;
++	uint32_t focus_points_in_struct;
++	uint32_t focus_points_in_use;
++	uint32_t sizeX;
++	uint32_t sizeY;
++	uint32_t size2X;
++	uint32_t size2Y;
+ 	uint32_t i;
+ 	uint32_t maxlen;
+ 	char	*str, *p;
+ 
++	if (datasize<4) {
++		ptp_error(params, "FocusInfoEx has invalid size (%d)", datasize);
++		return strdup("bad size 0");
++	}
++
++	size 			= dtoh32a( *data );
+ 	if ((size > datasize) || (size < 20)) {
+ 		ptp_error(params, "FocusInfoEx has invalid size (%d) vs datasize (%d)", size, datasize);
+ 		return strdup("bad size 1");
+ 	}
++
++	halfsize		= dtoh16a( (*data) + 4);
++	version			= dtoh16a( (*data) + 6);
++	focus_points_in_struct	= dtoh16a( (*data) + 8);
++	focus_points_in_use	= dtoh16a( (*data) + 10);
++	sizeX			= dtoh16a( (*data) + 12);
++	sizeY			= dtoh16a( (*data) + 14);
++	size2X			= dtoh16a( (*data) + 16);
++	size2Y			= dtoh16a( (*data) + 18);
++
+ 	/* If data is zero-filled, then it is just a placeholder, so nothing
+ 	   useful, but also not an error */
+ 	if (!focus_points_in_struct || !focus_points_in_use) {
meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb +1 -0
index c82e76a06e..04c4786f84 100644
@@ -20,6 +20,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.xz;name=libgphoto2 \
            file://CVE-2026-40338.patch \
            file://CVE-2026-40339.patch \
            file://CVE-2026-40340.patch \
+           file://CVE-2026-40341.patch \
            "
 SRC_URI[libgphoto2.sha256sum] = "28825f767a85544cb58f6e15028f8e53a5bb37a62148b3f1708b524781c3bef2"
 
#16 lore raw

PATCH 17/17 libraw: mark CVE-2026-20911 and CVE-2026-21413 patched

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-20911
https://nvd.nist.gov/vuln/detail/CVE-2026-21413

Both CVEs are tracked with incorrect version info: NVD indicates that 0.22.1 is explicitly vulnerable, but the fixes are actually included in this release.

Relevant commits:
CVE-2026-20911: https://github.com/LibRaw/LibRaw/commit/5357bb5fc67ac616838fb84de67260d45987489b
CVE-2026-21413: https://github.com/LibRaw/LibRaw/commit/75ed2c12a35b765b3b6ad695cc1f044f19efe644

---
 meta-oe/recipes-support/libraw/libraw_0.22.1.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-support/libraw/libraw_0.22.1.bb +2 -0
index 2e11a7f1f9..e99f0e46b6 100644
@@ -13,3 +13,5 @@ CVE_STATUS[CVE-2026-5318] = "fixed-version: fixed since 0.22.1"
 CVE_STATUS[CVE-2026-5342] = "fixed-version: fixed since 0.22.1"
 CVE_STATUS[CVE-2026-20884] = "fixed-version: fixed since 0.22.1"
 CVE_STATUS[CVE-2026-24450] = "fixed-version: fixed since 0.22.1"
+CVE_STATUS[CVE-2026-20911] = "fixed-version: fixed since 0.22.1"
+CVE_STATUS[CVE-2026-21413] = "fixed-version: fixed since 0.22.1"