Open
fix CVE-2026-10275: pkcs11-tool buffer overflow in test_kpgen_certwrite #138
VenlandAdd on Oct 8
fix CVE-2026-10275: pkcs11-tool buffer overflow in test_kpgen_certwrite #138
Open
Total: 2 files changed+33-1
| @@ -0,0 +1,28 @@ | |||
| 1 | +From f204114336e57a1d2e7fd1434698952a0640a0a2 Mon Sep 17 00:00:00 2001 | ||
| 2 | +From: Frank Morgner <frankmorgner@gmail.com> | ||
| 3 | +Date: Mon, 11 May 2026 11:00:28 +0200 | ||
| 4 | +Subject: [PATCH] pkcs11-tool: prevent buffer overflow (CVE-2026-10275 backport | ||
| 5 | + to 0.23.0) | ||
| 6 | + | ||
| 7 | +--- | ||
| 8 | + src/tools/pkcs11-tool.c | 4 ++++ | ||
| 9 | + 1 file changed, 4 insertions(+) | ||
| 10 | + | ||
| 11 | +diff --git a/src/tools/pkcs11-tool.c b/src/tools/pkcs11-tool.c | ||
| 12 | +index aae205f..b01acdf 100644 | ||
| 13 | +--- a/src/tools/pkcs11-tool.c | ||
| 14 | ++++ b/src/tools/pkcs11-tool.c | ||
| 15 | +@@ -7479,6 +7479,10 @@ static CK_SESSION_HANDLE test_kpgen_certwrite(CK_SLOT_ID slot, CK_SESSION_HANDLE | ||
| 16 | + return session; | ||
| 17 | + } | ||
| 18 | + opt_object_id_len = (size_t) i; | ||
| 19 | ++ if (opt_object_id_len > sizeof(opt_object_id)) { | ||
| 20 | ++ fprintf(stderr, "ERR: object ID too long\n"); | ||
| 21 | ++ return session; | ||
| 22 | ++ } | ||
| 23 | + memcpy(opt_object_id, tmp, opt_object_id_len); | ||
| 24 | + | ||
| 25 | + /* This is done in NSS */ | ||
| 26 | +-- | ||
| 27 | +2.50.1 | ||
| 28 | + | ||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | Name: opensc | 4 | Name: opensc |
| 5 | Version: 0.23.0 | 5 | Version: 0.23.0 |
| 6 | -Release: 11 | 6 | +Release: 12 |
| 7 | License: LGPL-2.1-or-later | 7 | License: LGPL-2.1-or-later |
| 8 | Summary: Smart card library and applications | 8 | Summary: Smart card library and applications |
| 9 | URL: https://github.com/OpenSC/OpenSC/wiki | 9 | URL: https://github.com/OpenSC/OpenSC/wiki |
| @@ -46,6 +46,7 @@ Patch28: opensc-CVE-2025-66037.patch | |||
| 46 | Patch29: opensc-CVE-2025-66215.patch | 46 | Patch29: opensc-CVE-2025-66215.patch |
| 47 | Patch30: opensc-CVE-2026-40510.patch | 47 | Patch30: opensc-CVE-2026-40510.patch |
| 48 | Patch31: opensc-CVE-2026-40528.patch | 48 | Patch31: opensc-CVE-2026-40528.patch |
| 49 | +Patch32: backport-CVE-2026-10275.patch | ||
| 49 | 50 | ||
| 50 | BuildRequires: openssl-devel pcsc-lite-devel bash-completion docbook-style-xsl readline-devel | 51 | BuildRequires: openssl-devel pcsc-lite-devel bash-completion docbook-style-xsl readline-devel |
| 51 | BuildRequires: desktop-file-utils /usr/bin/xsltproc autoconf automake libtool gcc | 52 | BuildRequires: desktop-file-utils /usr/bin/xsltproc autoconf automake libtool gcc |
| @@ -179,6 +180,9 @@ make check | |||
| 179 | %{_datadir}/opensc/ | 180 | %{_datadir}/opensc/ |
| 180 | 181 | ||
| 181 | %changelog | 182 | %changelog |
| 183 | +* Thu Oct 08 2026 liweigang <liweiganga@uniontech.com> - 0.23.0-12 | ||
| 184 | +- Fix CVE-2026-10275 | ||
| 185 | + | ||
| 182 | * Wed Aug 19 2026 ChenYanpan <chenyanpan@xfusion.com> - 0.23.0-11 | 186 | * Wed Aug 19 2026 ChenYanpan <chenyanpan@xfusion.com> - 0.23.0-11 |
| 183 | - Fix CVE-2026-40528 | 187 | - Fix CVE-2026-40528 |
| 184 | 188 | ||