summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2026-04-20 08:27:42 +0200
committerKhem Raj <khem.raj@oss.qualcomm.com>2026-04-20 07:35:34 -0700
commitce3fa8ad2a403c0c9bfcbcc9f4fc877c6ffb9fab (patch)
tree2bf0f1f15ee2ad72afe7bfd5aac4b56c3cb91da2
parent754e02c668a1130e3808cdaa4dbd5c7954e99890 (diff)
downloadmeta-openembedded-ce3fa8ad2a403c0c9bfcbcc9f4fc877c6ffb9fab.tar.gz
libgphoto2: patch CVE-2026-40334
Details: https://nvd.nist.gov/vuln/detail/CVE-2026-40334 Backport the patch that is referenced by the NVD advisory. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
-rw-r--r--meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40334.patch37
-rw-r--r--meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40334.patch b/meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40334.patch
new file mode 100644
index 0000000000..883582dff0
--- /dev/null
+++ b/meta-oe/recipes-graphics/gphoto2/libgphoto2/CVE-2026-40334.patch
@@ -0,0 +1,37 @@
1From 20b33a26b2efdbf2c35c5cacc54a041855ec764b Mon Sep 17 00:00:00 2001
2From: Marcus Meissner <marcus@jet.franken.de>
3Date: Wed, 8 Apr 2026 15:15:54 +0200
4Subject: [PATCH] Fixed Canon FolderEntry Missing Null Termination
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9ptp_unpack_Canon_FE() copies filename with strncpy into a 13-byte
10buffer without explicit null termination. The EOS variant at line
111451–1452 correctly adds fe->Filename[PTP_CANON_FilenameBufferLen-1]
12= 0; confirming this was recognized as necessary but not applied to the
13original Canon path.
14
15 CVE-2026-40334
16
17Reported-By: Sebastián Alba <sebasjosue84@gmail.com>
18
19CVE: CVE-2026-40334
20Upstream-Status: Backport [https://github.com/gphoto/libgphoto2/commit/259fc7d3bfe534ce4b114c464f55b448670ab873]
21Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
22---
23 camlibs/ptp2/ptp-pack.c | 1 +
24 1 file changed, 1 insertion(+)
25
26diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
27index 09dcc24..982b4f4 100644
28--- a/camlibs/ptp2/ptp-pack.c
29+++ b/camlibs/ptp2/ptp-pack.c
30@@ -1369,6 +1369,7 @@ ptp_unpack_Canon_FE (PTPParams *params, const unsigned char* data, PTPCANONFolde
31 fe->ObjectSize = dtoh32a(data + PTP_cfe_ObjectSize);
32 fe->Time = (time_t)dtoh32a(data + PTP_cfe_Time);
33 strncpy(fe->Filename, (char*)data + PTP_cfe_Filename, PTP_CANON_FilenameBufferLen);
34+ fe->Filename[PTP_CANON_FilenameBufferLen-1] = '\0';
35 }
36
37 /*
diff --git a/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb b/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb
index ac7892151f..e8e56171a1 100644
--- a/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb
+++ b/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.33.bb
@@ -14,6 +14,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/${BP}.tar.xz;name=libgphoto2 \
14 file://0001-configure-Filter-out-buildpaths-from-CC.patch \ 14 file://0001-configure-Filter-out-buildpaths-from-CC.patch \
15 file://0001-libgphoto2-fix-const-correctness-for-c23-builds.patch \ 15 file://0001-libgphoto2-fix-const-correctness-for-c23-builds.patch \
16 file://CVE-2026-40333.patch \ 16 file://CVE-2026-40333.patch \
17 file://CVE-2026-40334.patch \
17 " 18 "
18SRC_URI[libgphoto2.sha256sum] = "28825f767a85544cb58f6e15028f8e53a5bb37a62148b3f1708b524781c3bef2" 19SRC_URI[libgphoto2.sha256sum] = "28825f767a85544cb58f6e15028f8e53a5bb37a62148b3f1708b524781c3bef2"
19 20