Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
opensc
opensc-CVE-2024-45618.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File opensc-CVE-2024-45618.patch of Package opensc
commit 8632ec172beda894581d67eaa991e519a7874f7d Author: Veronika HanulĂková <vhanulik@redhat.com> Date: Wed Jul 17 11:18:52 2024 +0200 pkcs15-tcos: Check return value of serial num conversion Thanks Matteo Marini for report https://github.com/OpenSC/OpenSC/security/advisories/GHSA-p3mx-7472-h3j8 fuzz_pkcs15_encode/21 Index: opensc-0.13.0/src/libopensc/pkcs15-tcos.c =================================================================== --- opensc-0.13.0.orig/src/libopensc/pkcs15-tcos.c +++ opensc-0.13.0/src/libopensc/pkcs15-tcos.c @@ -504,7 +504,12 @@ int sc_pkcs15emu_tcos_init_ex( sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "unable to get ICCSN\n"); return SC_ERROR_WRONG_CARD; } - sc_bin_to_hex(serialnr.value, serialnr.len , serial, sizeof(serial), 0); + r = sc_bin_to_hex(serialnr.value, serialnr.len , serial, sizeof(serial), 0); + if (r != SC_SUCCESS) { + sc_log(ctx, "serial number invalid"); + return SC_ERROR_INTERNAL; + } + serial[19] = '\0'; p15card->tokeninfo->serial_number = strdup(serial); Index: opensc-0.13.0/src/pkcs15init/pkcs15-lib.c =================================================================== --- opensc-0.13.0.orig/src/pkcs15init/pkcs15-lib.c +++ opensc-0.13.0/src/pkcs15init/pkcs15-lib.c @@ -3159,6 +3159,9 @@ sc_pkcs15init_get_transport_key(struct s memcpy(pinbuf, data.key_data, data.len); *pinsize = data.len; + } else { + /* pinbuf and pinsize were not filled */ + LOG_TEST_RET(ctx, SC_ERROR_INTERNAL, "Get transport key error"); } memset(&auth_info, 0, sizeof(auth_info));
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor