diff options
| author | Ankur Tyagi <ankur.tyagi85@gmail.com> | 2026-04-27 01:03:49 +1200 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@oss.qualcomm.com> | 2026-04-29 10:14:29 +0530 |
| commit | a02592addafcc71efaab5ed59cb0e5eed181b678 (patch) | |
| tree | 37de840b3588d0b24b76c7b2aec0cbcc5e76847a /meta-oe | |
| parent | 886f7d221a31ee234291012ccee78b6b85c5ccde (diff) | |
| download | meta-openembedded-a02592addafcc71efaab5ed59cb0e5eed181b678.tar.gz | |
opensc: patch CVE-2025-66037
Details: https://nvd.nist.gov/vuln/detail/CVE-2025-66037
Backport the patch referenced by the wiki[1] mentioned in the nvd.
[1] https://github.com/OpenSC/OpenSC/wiki/CVE-2025-66037
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-support/opensc/files/CVE-2025-66037.patch | 35 | ||||
| -rw-r--r-- | meta-oe/recipes-support/opensc/opensc_0.25.1.bb | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opensc/files/CVE-2025-66037.patch b/meta-oe/recipes-support/opensc/files/CVE-2025-66037.patch new file mode 100644 index 0000000000..91ffe53373 --- /dev/null +++ b/meta-oe/recipes-support/opensc/files/CVE-2025-66037.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From b1a6f86298af7dfbaa1110b86662a9d1393a7678 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jakub Jelen <jjelen@redhat.com> | ||
| 3 | Date: Tue, 25 Nov 2025 15:58:02 +0100 | ||
| 4 | Subject: [PATCH] pkcs15: Avoid buffer overrun on invalid data | ||
| 5 | |||
| 6 | Invalid data can contain zero-length buffer, which after copying | ||
| 7 | was dereferenced without length check | ||
| 8 | |||
| 9 | Credit: Aldo Ristori | ||
| 10 | |||
| 11 | Signed-off-by: Jakub Jelen <jjelen@redhat.com> | ||
| 12 | (cherry picked from commit 65fc211015cfcac27b10d0876054156c97225f50) | ||
| 13 | |||
| 14 | CVE: CVE-2025-66037 | ||
| 15 | Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/commit/65fc211015cfcac27b10d0876054156c97225f50] | ||
| 16 | Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> | ||
| 17 | --- | ||
| 18 | src/libopensc/pkcs15-pubkey.c | 4 ++++ | ||
| 19 | 1 file changed, 4 insertions(+) | ||
| 20 | |||
| 21 | diff --git a/src/libopensc/pkcs15-pubkey.c b/src/libopensc/pkcs15-pubkey.c | ||
| 22 | index a759efa45..48fb08cac 100644 | ||
| 23 | --- a/src/libopensc/pkcs15-pubkey.c | ||
| 24 | +++ b/src/libopensc/pkcs15-pubkey.c | ||
| 25 | @@ -1328,6 +1328,10 @@ sc_pkcs15_pubkey_from_spki_fields(struct sc_context *ctx, struct sc_pkcs15_pubke | ||
| 26 | "sc_pkcs15_pubkey_from_spki_fields() called: %p:%"SC_FORMAT_LEN_SIZE_T"u\n%s", | ||
| 27 | buf, buflen, sc_dump_hex(buf, buflen)); | ||
| 28 | |||
| 29 | + if (buflen < 1) { | ||
| 30 | + LOG_TEST_RET(ctx, SC_ERROR_INVALID_DATA, "subjectPublicKeyInfo can not be empty"); | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | tmp_buf = malloc(buflen); | ||
| 34 | if (!tmp_buf) { | ||
| 35 | r = SC_ERROR_OUT_OF_MEMORY; | ||
diff --git a/meta-oe/recipes-support/opensc/opensc_0.25.1.bb b/meta-oe/recipes-support/opensc/opensc_0.25.1.bb index bcdf5900ea..999ae34b12 100644 --- a/meta-oe/recipes-support/opensc/opensc_0.25.1.bb +++ b/meta-oe/recipes-support/opensc/opensc_0.25.1.bb | |||
| @@ -18,6 +18,7 @@ SRC_URI = "git://github.com/OpenSC/OpenSC;branch=stable-0.25;protocol=https \ | |||
| 18 | file://CVE-2024-8443-0001.patch \ | 18 | file://CVE-2024-8443-0001.patch \ |
| 19 | file://CVE-2024-8443-0002.patch \ | 19 | file://CVE-2024-8443-0002.patch \ |
| 20 | file://CVE-2025-49010.patch \ | 20 | file://CVE-2025-49010.patch \ |
| 21 | file://CVE-2025-66037.patch \ | ||
| 21 | " | 22 | " |
| 22 | DEPENDS = "virtual/libiconv openssl" | 23 | DEPENDS = "virtual/libiconv openssl" |
| 23 | 24 | ||
