summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Peng <peng.zhang1.cn@windriver.com>2025-01-15 15:24:21 +0800
committerArmin Kuster <akuster808@gmail.com>2025-01-22 19:26:03 -0500
commit7e91b406fa1bc43bc8086733dc447199ecbe2919 (patch)
treeb97b99134fe91ecf04a43545d8354af94ff80a81
parent291fc3e7fc87ab62397b1e87c49bd79f87436235 (diff)
downloadmeta-openembedded-7e91b406fa1bc43bc8086733dc447199ecbe2919.tar.gz
opensc: fix CVE-2024-1454
CVE-2024-1454: The use-after-free vulnerability was found in the AuthentIC driver in OpenSC packages, occuring in the card enrolment process using pkcs15-init when a user or administrator enrols or modifies cards. An attacker must have physical access to the computer system and requires a crafted USB device or smart card to present the system with specially crafted responses to the APDUs, which are considered high complexity and low severity. This manipulation can allow for compromised card management operations during enrolment. Reference: [https://nvd.nist.gov/vuln/detail/CVE-2024-1454] Upstream patches: [https://github.com/OpenSC/OpenSC/commit/5835f0d4f6c033bd58806d33fa546908d39825c9] Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/opensc/files/CVE-2024-1454.patch37
-rw-r--r--meta-oe/recipes-support/opensc/opensc_0.22.0.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opensc/files/CVE-2024-1454.patch b/meta-oe/recipes-support/opensc/files/CVE-2024-1454.patch
new file mode 100644
index 0000000000..0ef26d447f
--- /dev/null
+++ b/meta-oe/recipes-support/opensc/files/CVE-2024-1454.patch
@@ -0,0 +1,37 @@
1From 5835f0d4f6c033bd58806d33fa546908d39825c9 Mon Sep 17 00:00:00 2001
2From: Jakub Jelen <jjelen@redhat.com>
3Date: Mon, 18 Dec 2023 11:09:50 +0100
4Subject: [PATCH] authentic: Avoid use after free
5
6Thanks oss-fuzz
7
8https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64898
9
10CVE: CVE-2024-1454
11Upstream-Status: Backport [https://github.com/OpenSC/OpenSC/commit/5835f0d4f6c033bd58806d33fa546908d39825c9]
12
13The original patch is adjusted to fit for the current version.
14
15Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
16---
17 src/pkcs15init/pkcs15-authentic.c | 5 ++++-
18 1 file changed, 4 insertions(+), 1 deletion(-)
19
20diff --git a/src/pkcs15init/pkcs15-authentic.c b/src/pkcs15init/pkcs15-authentic.c
21index c6894dd37..adedd0a04 100644
22--- a/src/pkcs15init/pkcs15-authentic.c
23+++ b/src/pkcs15init/pkcs15-authentic.c
24@@ -858,7 +858,10 @@ authentic_emu_update_tokeninfo(struct sc_profile *profile, struct sc_pkcs15_card
25 rv = sc_select_file(p15card->card, &path, &file);
26 if (!rv) {
27 rv = sc_get_challenge(p15card->card, buffer, sizeof(buffer));
28- LOG_TEST_RET(ctx, rv, "Get challenge error");
29+ if (rv < 0) {
30+ sc_file_free(file);
31+ LOG_TEST_RET(ctx, rv, "Get challenge error");
32+ }
33
34 len = file->size > sizeof(buffer) ? sizeof(buffer) : file->size;
35 rv = sc_update_binary(p15card->card, 0, buffer, len, 0);
36--
372.34.1 \ No newline at end of file
diff --git a/meta-oe/recipes-support/opensc/opensc_0.22.0.bb b/meta-oe/recipes-support/opensc/opensc_0.22.0.bb
index 7915d8913b..834b83d686 100644
--- a/meta-oe/recipes-support/opensc/opensc_0.22.0.bb
+++ b/meta-oe/recipes-support/opensc/opensc_0.22.0.bb
@@ -23,6 +23,7 @@ SRC_URI = "git://github.com/OpenSC/OpenSC;branch=master;protocol=https \
23 file://CVE-2023-40661-5.patch \ 23 file://CVE-2023-40661-5.patch \
24 file://CVE-2023-40661-6.patch \ 24 file://CVE-2023-40661-6.patch \
25 file://CVE-2023-40661-7.patch \ 25 file://CVE-2023-40661-7.patch \
26 file://CVE-2024-1454.patch \
26 " 27 "
27 28
28# CVE-2021-34193 is a duplicate CVE covering the 5 individual 29# CVE-2021-34193 is a duplicate CVE covering the 5 individual