summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2026-04-07 11:52:44 +0200
committerAnuj Mittal <anuj.mittal@oss.qualcomm.com>2026-04-24 21:13:20 +0530
commit73034a4fe191a2368e66c6e8ee9003672573c5ad (patch)
tree85f303e028b69587a665b5886daf3b6584d44dce
parent7c8dd8d492e67f223b8dd3c908e5ccf1f68297d4 (diff)
downloadmeta-openembedded-73034a4fe191a2368e66c6e8ee9003672573c5ad.tar.gz
opensc: patch CVE-2025-66037
Details: https://nvd.nist.gov/vuln/detail/CVE-2025-66037 Backport the patch that is referenced by the upstream wiki page[1] that is related to this vulnerability. [1]: https://github.com/OpenSC/OpenSC/wiki/CVE-2025-66037 Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
-rw-r--r--meta-oe/recipes-support/opensc/opensc/CVE-2025-66037.patch34
-rw-r--r--meta-oe/recipes-support/opensc/opensc_0.26.1.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opensc/opensc/CVE-2025-66037.patch b/meta-oe/recipes-support/opensc/opensc/CVE-2025-66037.patch
new file mode 100644
index 0000000000..2c0fcab23e
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/opensc/CVE-2025-66037.patch
@@ -0,0 +1,34 @@
1From 29fce41f0b65e8467745b385b0bafbb79e72d33d Mon Sep 17 00:00:00 2001
2From: Jakub Jelen <jjelen@redhat.com>
3Date: Tue, 25 Nov 2025 15:58:02 +0100
4Subject: [PATCH] pkcs15: Avoid buffer overrun on invalid data
5
6Invalid data can contain zero-length buffer, which after copying
7was dereferenced without length check
8
9Credit: Aldo Ristori
10
11Signed-off-by: Jakub Jelen <jjelen@redhat.com>
12
13CVE: CVE-2025-66037
14Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/commit/65fc211015cfcac27b10d0876054156c97225f50]
15Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
16---
17 src/libopensc/pkcs15-pubkey.c | 4 ++++
18 1 file changed, 4 insertions(+)
19
20diff --git a/src/libopensc/pkcs15-pubkey.c b/src/libopensc/pkcs15-pubkey.c
21index 83f3feb26..e6bf803f4 100644
22--- a/src/libopensc/pkcs15-pubkey.c
23+++ b/src/libopensc/pkcs15-pubkey.c
24@@ -1328,6 +1328,10 @@ sc_pkcs15_pubkey_from_spki_fields(struct sc_context *ctx, struct sc_pkcs15_pubke
25 "sc_pkcs15_pubkey_from_spki_fields() called: %p:%"SC_FORMAT_LEN_SIZE_T"u\n%s",
26 buf, buflen, sc_dump_hex(buf, buflen));
27
28+ if (buflen < 1) {
29+ LOG_TEST_RET(ctx, SC_ERROR_INVALID_DATA, "subjectPublicKeyInfo can not be empty");
30+ }
31+
32 tmp_buf = malloc(buflen);
33 if (!tmp_buf) {
34 r = SC_ERROR_OUT_OF_MEMORY;
diff --git a/meta-oe/recipes-support/opensc/opensc_0.26.1.bb b/meta-oe/recipes-support/opensc/opensc_0.26.1.bb
index 3aed590347..ce982c4aa9 100644
--- a/meta-oe/recipes-support/opensc/opensc_0.26.1.bb
+++ b/meta-oe/recipes-support/opensc/opensc_0.26.1.bb
@@ -14,6 +14,7 @@ DEPENDS = "openssl"
14SRCREV = "043343d2df7b09d1938bc3dc313d86a96be457cc" 14SRCREV = "043343d2df7b09d1938bc3dc313d86a96be457cc"
15SRC_URI = "git://github.com/OpenSC/OpenSC;branch=0.26.1;protocol=https \ 15SRC_URI = "git://github.com/OpenSC/OpenSC;branch=0.26.1;protocol=https \
16 file://CVE-2025-49010.patch \ 16 file://CVE-2025-49010.patch \
17 file://CVE-2025-66037.patch \
17 " 18 "
18 19
19CVE_STATUS[CVE-2024-8443] = "fixed-version: this is fixed since 0.26.0" 20CVE_STATUS[CVE-2024-8443] = "fixed-version: this is fixed since 0.26.0"