Skip to content

Conversation

@LocutusOfBorg
Copy link
Contributor

convert int bMatch = -1 into size_t bMatch = 0, this fixes errors such as: card-entersafe.c: In function ‘entersafe_select_file’: card-entersafe.c:649:28: error: ‘__memcpy_chk’ writing between 18446744073709551608 and 18446744073709551613 bytes into a region of size 64 [-Werror=stringop-overflow=]
649 | memcpy(new_path.value, &(path[bMatch+2]), new_path.len);
| ^
card-entersafe.c:639:38: note: destination object ‘new_path’ of size 64
639 | sc_path_t new_path;
| ^~~~~~~~
/bin/bash ../../libtool --tag=CC --tag CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -D'OPENSC_CONF_PATH="/etc/opensc/opensc.conf"' -D'DEFAULT_SM_MODULE_PATH="/usr/lib/powerpc64le-linux-gnu"' -D'DEFAULT_SM_MODULE="libsmm-local.so"' -I../../src -Wdate-time -D_FORTIFY_SOURCE=3 -I/usr/include/PCSC -Wall -Wextra -Wno-unused-parameter -Werror -Wstrict-aliasing=2 -g -O3 -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<>=/usr/src/opensc-0.25.1-2 -Wno-error=maybe-uninitialized -c -o libopensc_la-card-coolkey.lo test -f 'card-coolkey.c' || echo './'card-coolkey.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -DOPENSC_CONF_PATH="/etc/opensc/opensc.conf" -DDEFAULT_SM_MODULE_PATH="/usr/lib/powerpc64le-linux-gnu" -DDEFAULT_SM_MODULE="libsmm-local.so" -I../../src -Wdate-time -D_FORTIFY_SOURCE=3 -I/usr/include/PCSC -Wall -Wextra -Wno-unused-parameter -Werror -Wstrict-aliasing=2 -g -O3 -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<>=/usr/src/opensc-0.25.1-2 -Wno-error=maybe-uninitialized -c card-coolkey.c -fPIC -DPIC -o .libs/libopensc_la-card-coolkey.o
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1756: libopensc_la-card-entersafe.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -DOPENSC_CONF_PATH="/etc/opensc/opensc.conf" -DDEFAULT_SM_MODULE_PATH="/usr/lib/powerpc64le-linux-gnu" -DDEFAULT_SM_MODULE="libsmm-local.so" -I../../src -Wdate-time -D_FORTIFY_SOURCE=3 -I/usr/include/PCSC -Wall -Wextra -Wno-unused-parameter -Werror -Wstrict-aliasing=2 -g -O3 -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<>=/usr/src/opensc-0.25.1-2 -Wno-error=maybe-uninitialized -c card-coolkey.c -o libopensc_la-card-coolkey.o >/dev/null 2>&1
In file included from /usr/include/string.h:548,
from card-epass2003.c:30:
In function ‘memcpy’,
inlined from ‘epass2003_select_path’ at card-epass2003.c:2080:4,
inlined from ‘epass2003_select_file’ at card-epass2003.c:2148:10:
/usr/include/powerpc64le-linux-gnu/bits/string_fortified.h:29:10: error: ‘__memcpy_chk’ specified bound between 18446744073709551608 and 18446744073709551613 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1763: libopensc_la-card-epass2003.lo] Error 1
make[4]: Leaving directory '/<>/src/libopensc'
make[3]: *** [Makefile:483: all-recursive] Error 1
make[3]: Leaving directory '/<>/src'
make[2]: *** [Makefile:626: all-recursive] Error 1

Fix: #3243

Checklist
  • Documentation is added or updated
  • New files have a LGPL 2.1 license statement
  • PKCS#11 module is tested
  • Windows minidriver is tested
  • macOS tokend is tested

@LocutusOfBorg LocutusOfBorg force-pushed the master branch 2 times, most recently from f881800 to b158a07 Compare December 29, 2024 09:46
convert int bMatch = -1 into size_t bMatch = 0, this fixes errors such as:
card-entersafe.c: In function ‘entersafe_select_file’:
card-entersafe.c:649:28: error: ‘__memcpy_chk’ writing between 18446744073709551608 and 18446744073709551613 bytes into a region of size 64 [-Werror=stringop-overflow=]
  649 |                            memcpy(new_path.value, &(path[bMatch+2]), new_path.len);
      |                            ^
card-entersafe.c:639:38: note: destination object ‘new_path’ of size 64
  639 |                            sc_path_t new_path;
      |                                      ^~~~~~~~
/bin/bash ../../libtool  --tag=CC --tag CC  --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -D'OPENSC_CONF_PATH="/etc/opensc/opensc.conf"' -D'DEFAULT_SM_MODULE_PATH="/usr/lib/powerpc64le-linux-gnu"' -D'DEFAULT_SM_MODULE="libsmm-local.so"' -I../../src -Wdate-time -D_FORTIFY_SOURCE=3    -I/usr/include/PCSC   -Wall -Wextra -Wno-unused-parameter -Werror -Wstrict-aliasing=2 -g -O3 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/opensc-0.25.1-2 -Wno-error=maybe-uninitialized -c -o libopensc_la-card-coolkey.lo `test -f 'card-coolkey.c' || echo './'`card-coolkey.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -DOPENSC_CONF_PATH=\"/etc/opensc/opensc.conf\" -DDEFAULT_SM_MODULE_PATH=\"/usr/lib/powerpc64le-linux-gnu\" -DDEFAULT_SM_MODULE=\"libsmm-local.so\" -I../../src -Wdate-time -D_FORTIFY_SOURCE=3 -I/usr/include/PCSC -Wall -Wextra -Wno-unused-parameter -Werror -Wstrict-aliasing=2 -g -O3 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/opensc-0.25.1-2 -Wno-error=maybe-uninitialized -c card-coolkey.c  -fPIC -DPIC -o .libs/libopensc_la-card-coolkey.o
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1756: libopensc_la-card-entersafe.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -DOPENSC_CONF_PATH=\"/etc/opensc/opensc.conf\" -DDEFAULT_SM_MODULE_PATH=\"/usr/lib/powerpc64le-linux-gnu\" -DDEFAULT_SM_MODULE=\"libsmm-local.so\" -I../../src -Wdate-time -D_FORTIFY_SOURCE=3 -I/usr/include/PCSC -Wall -Wextra -Wno-unused-parameter -Werror -Wstrict-aliasing=2 -g -O3 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/opensc-0.25.1-2 -Wno-error=maybe-uninitialized -c card-coolkey.c -o libopensc_la-card-coolkey.o >/dev/null 2>&1
In file included from /usr/include/string.h:548,
                 from card-epass2003.c:30:
In function ‘memcpy’,
    inlined from ‘epass2003_select_path’ at card-epass2003.c:2080:4,
    inlined from ‘epass2003_select_file’ at card-epass2003.c:2148:10:
/usr/include/powerpc64le-linux-gnu/bits/string_fortified.h:29:10: error: ‘__memcpy_chk’ specified bound between 18446744073709551608 and 18446744073709551613 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1763: libopensc_la-card-epass2003.lo] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/src/libopensc'
make[3]: *** [Makefile:483: all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[2]: *** [Makefile:626: all-recursive] Error 1

Fix: OpenSC#3243
@xhanulik
Copy link
Member

xhanulik commented Jan 7, 2025

@LocutusOfBorg could you please take a look at the comment above? It would be nice to have this fixed in upcoming 0.26.1.

@xhanulik xhanulik mentioned this pull request Jan 7, 2025
@xhanulik xhanulik merged commit 643d4c1 into OpenSC:master Jan 14, 2025
50 of 54 checks passed
@xhanulik
Copy link
Member

Merging for now, so it can go to 0.26.1.

dangowrt added a commit to dangowrt/packages that referenced this pull request Apr 26, 2025
New in 0.26.1; 2025-01-14
General improvements

    Align allocations of sc_mem_secure_alloc (OpenSC/OpenSC#3281)
    Fix -O3 gcc optimization failure on amd64 and ppc64el (OpenSC/OpenSC#3299)

pkcs11-spy

    Avoid crash while spying C_GetInterface() (OpenSC/OpenSC#3275)

TCOS

    Fix reading certificate (OpenSC/OpenSC#3296)

New in 0.26.0; 2024-11-13
Security

    CVE-2024-45615: Usage of uninitialized values in libopensc and pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-45616: Uninitialized values after incorrect check or usage of APDU response values in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45617: Uninitialized values after incorrect or missing checking return values of functions in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45618: Uninitialized values after incorrect or missing checking return values of functions in pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-45619: Incorrect handling length of buffers or files in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45620: Incorrect handling of the length of buffers or files in pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-8443: Heap buffer overflow in OpenPGP driver when generating key (OpenSC/OpenSC#3219)

General improvements

    Fix reselection of DF after error in PKCSOpenSC/OpenSC#15 layer (OpenSC/OpenSC#3067)
    Unify OpenSSL logging throughout code (OpenSC/OpenSC#2922)
    Extend the p11test to support kryoptic (OpenSC/OpenSC#3141)
    Fix for error in PCSC reconnection (OpenSC/OpenSC#3150)
    Fixed various issues reported by OSS-Fuzz and Coverity in drivers, PKCS#11 and PKCS#15 layer

PKCS#15

    Documentation for PKCS#15 profile files (OpenSC/OpenSC#3132)

minidriver

    Support PinCacheAlwaysPrompt usable for PIV cards (OpenSC/OpenSC#3167)

pkcs11-tool

    Show URI when listing token information (OpenSC/OpenSC#3125) and objects (OpenSC/OpenSC#3130)
    Do not limit size of objects to 5000 bytes (OpenSC/OpenSC#3174)
    Add support for AES CMAC (OpenSC/OpenSC#3184)
    Add support for AES GCM encryption (OpenSC/OpenSC#3195)
    Add support for RSA OAEP encryption (OpenSC/OpenSC#3175)
    Add support for HKDF (OpenSC/OpenSC#3193)
    Implement better support for wrapping and unwrapping (OpenSC/OpenSC#3198)
    Add support for EdDSA sign and verify (OpenSC/OpenSC#2979)

pkcs15-crypt

    Fix PKCS#1 encoding function to correctly detect padding type (OpenSC/OpenSC#3075)

piv-tool

    Fix RSA key generation (OpenSC/OpenSC#3158)
    Avoid possible state change when matching unknown card (OpenSC/OpenSC#3112)

sc-hsm-tool

    Cleanse buffer with plaintext key share (OpenSC/OpenSC#3226)

pkcs11-register

    Fix pkcs11-register defaults on macOS and Windows (OpenSC/OpenSC#3053)

IDPrime

    Fix identification of IDPrime 840 cards (OpenSC/OpenSC#3146)
    Fix container mapping for IDPrime 940 cards (OpenSC/OpenSC#3220)
    Reorder ATRs for matching cards (OpenSC/OpenSC#3154)

OpenPGP

    Fix state tracking after erasing card (OpenSC/OpenSC#3024)

Belpic

    Disable Applet V1.8 (OpenSC/OpenSC#3109)

MICARDO

    Deactivate driver (OpenSC/OpenSC#3152)

SmartCard-HSM

    Fix signing with secp521r1 signature (OpenSC/OpenSC#3157)

eOI

    Set model via sc_card_ctl function (OpenSC/OpenSC#3189)

Rutoken

    increase the minimum PIN size to support Rutoken ECP BIO (OpenSC/OpenSC#3208)

JPKI

    Adjust parameters for public key in PKCS#15 emulator (OpenSC/OpenSC#3182)

D-Trust

    Add support for ECDSA signatures and ECDH key agreement for D-Trust Signatures Cards 4.1/4.4 (OpenSC/OpenSC#3240, OpenSC/OpenSC#openwrt#3248)

Signed-off-by: Daniel Golle <[email protected]>
dangowrt added a commit to dangowrt/packages that referenced this pull request Apr 26, 2025
New in 0.26.1; 2025-01-14
General improvements

    Align allocations of sc_mem_secure_alloc (OpenSC/OpenSC#3281)
    Fix -O3 gcc optimization failure on amd64 and ppc64el (OpenSC/OpenSC#3299)

pkcs11-spy

    Avoid crash while spying C_GetInterface() (OpenSC/OpenSC#3275)

TCOS

    Fix reading certificate (OpenSC/OpenSC#3296)

New in 0.26.0; 2024-11-13
Security

    CVE-2024-45615: Usage of uninitialized values in libopensc and pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-45616: Uninitialized values after incorrect check or usage of APDU response values in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45617: Uninitialized values after incorrect or missing checking return values of functions in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45618: Uninitialized values after incorrect or missing checking return values of functions in pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-45619: Incorrect handling length of buffers or files in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45620: Incorrect handling of the length of buffers or files in pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-8443: Heap buffer overflow in OpenPGP driver when generating key (OpenSC/OpenSC#3219)

General improvements

    Fix reselection of DF after error in PKCSOpenSC/OpenSC#15 layer (OpenSC/OpenSC#3067)
    Unify OpenSSL logging throughout code (OpenSC/OpenSC#2922)
    Extend the p11test to support kryoptic (OpenSC/OpenSC#3141)
    Fix for error in PCSC reconnection (OpenSC/OpenSC#3150)
    Fixed various issues reported by OSS-Fuzz and Coverity in drivers, PKCS#11 and PKCS#15 layer

PKCS#15

    Documentation for PKCS#15 profile files (OpenSC/OpenSC#3132)

minidriver

    Support PinCacheAlwaysPrompt usable for PIV cards (OpenSC/OpenSC#3167)

pkcs11-tool

    Show URI when listing token information (OpenSC/OpenSC#3125) and objects (OpenSC/OpenSC#3130)
    Do not limit size of objects to 5000 bytes (OpenSC/OpenSC#3174)
    Add support for AES CMAC (OpenSC/OpenSC#3184)
    Add support for AES GCM encryption (OpenSC/OpenSC#3195)
    Add support for RSA OAEP encryption (OpenSC/OpenSC#3175)
    Add support for HKDF (OpenSC/OpenSC#3193)
    Implement better support for wrapping and unwrapping (OpenSC/OpenSC#3198)
    Add support for EdDSA sign and verify (OpenSC/OpenSC#2979)

pkcs15-crypt

    Fix PKCS#1 encoding function to correctly detect padding type (OpenSC/OpenSC#3075)

piv-tool

    Fix RSA key generation (OpenSC/OpenSC#3158)
    Avoid possible state change when matching unknown card (OpenSC/OpenSC#3112)

sc-hsm-tool

    Cleanse buffer with plaintext key share (OpenSC/OpenSC#3226)

pkcs11-register

    Fix pkcs11-register defaults on macOS and Windows (OpenSC/OpenSC#3053)

IDPrime

    Fix identification of IDPrime 840 cards (OpenSC/OpenSC#3146)
    Fix container mapping for IDPrime 940 cards (OpenSC/OpenSC#3220)
    Reorder ATRs for matching cards (OpenSC/OpenSC#3154)

OpenPGP

    Fix state tracking after erasing card (OpenSC/OpenSC#3024)

Belpic

    Disable Applet V1.8 (OpenSC/OpenSC#3109)

MICARDO

    Deactivate driver (OpenSC/OpenSC#3152)

SmartCard-HSM

    Fix signing with secp521r1 signature (OpenSC/OpenSC#3157)

eOI

    Set model via sc_card_ctl function (OpenSC/OpenSC#3189)

Rutoken

    increase the minimum PIN size to support Rutoken ECP BIO (OpenSC/OpenSC#3208)

JPKI

    Adjust parameters for public key in PKCS#15 emulator (OpenSC/OpenSC#3182)

D-Trust

    Add support for ECDSA signatures and ECDH key agreement for D-Trust Signatures Cards 4.1/4.4 (OpenSC/OpenSC#3240, OpenSC/OpenSC#openwrt#3248)

Signed-off-by: Daniel Golle <[email protected]>
dangowrt added a commit to dangowrt/packages that referenced this pull request Apr 26, 2025
New in 0.26.1; 2025-01-14
General improvements

    Align allocations of sc_mem_secure_alloc (OpenSC/OpenSC#3281)
    Fix -O3 gcc optimization failure on amd64 and ppc64el (OpenSC/OpenSC#3299)

pkcs11-spy

    Avoid crash while spying C_GetInterface() (OpenSC/OpenSC#3275)

TCOS

    Fix reading certificate (OpenSC/OpenSC#3296)

New in 0.26.0; 2024-11-13
Security

    CVE-2024-45615: Usage of uninitialized values in libopensc and pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-45616: Uninitialized values after incorrect check or usage of APDU response values in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45617: Uninitialized values after incorrect or missing checking return values of functions in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45618: Uninitialized values after incorrect or missing checking return values of functions in pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-45619: Incorrect handling length of buffers or files in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45620: Incorrect handling of the length of buffers or files in pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-8443: Heap buffer overflow in OpenPGP driver when generating key (OpenSC/OpenSC#3219)

General improvements

    Fix reselection of DF after error in PKCSOpenSC/OpenSC#15 layer (OpenSC/OpenSC#3067)
    Unify OpenSSL logging throughout code (OpenSC/OpenSC#2922)
    Extend the p11test to support kryoptic (OpenSC/OpenSC#3141)
    Fix for error in PCSC reconnection (OpenSC/OpenSC#3150)
    Fixed various issues reported by OSS-Fuzz and Coverity in drivers, PKCS#11 and PKCS#15 layer

PKCS#15

    Documentation for PKCS#15 profile files (OpenSC/OpenSC#3132)

minidriver

    Support PinCacheAlwaysPrompt usable for PIV cards (OpenSC/OpenSC#3167)

pkcs11-tool

    Show URI when listing token information (OpenSC/OpenSC#3125) and objects (OpenSC/OpenSC#3130)
    Do not limit size of objects to 5000 bytes (OpenSC/OpenSC#3174)
    Add support for AES CMAC (OpenSC/OpenSC#3184)
    Add support for AES GCM encryption (OpenSC/OpenSC#3195)
    Add support for RSA OAEP encryption (OpenSC/OpenSC#3175)
    Add support for HKDF (OpenSC/OpenSC#3193)
    Implement better support for wrapping and unwrapping (OpenSC/OpenSC#3198)
    Add support for EdDSA sign and verify (OpenSC/OpenSC#2979)

pkcs15-crypt

    Fix PKCS#1 encoding function to correctly detect padding type (OpenSC/OpenSC#3075)

piv-tool

    Fix RSA key generation (OpenSC/OpenSC#3158)
    Avoid possible state change when matching unknown card (OpenSC/OpenSC#3112)

sc-hsm-tool

    Cleanse buffer with plaintext key share (OpenSC/OpenSC#3226)

pkcs11-register

    Fix pkcs11-register defaults on macOS and Windows (OpenSC/OpenSC#3053)

IDPrime

    Fix identification of IDPrime 840 cards (OpenSC/OpenSC#3146)
    Fix container mapping for IDPrime 940 cards (OpenSC/OpenSC#3220)
    Reorder ATRs for matching cards (OpenSC/OpenSC#3154)

OpenPGP

    Fix state tracking after erasing card (OpenSC/OpenSC#3024)

Belpic

    Disable Applet V1.8 (OpenSC/OpenSC#3109)

MICARDO

    Deactivate driver (OpenSC/OpenSC#3152)

SmartCard-HSM

    Fix signing with secp521r1 signature (OpenSC/OpenSC#3157)

eOI

    Set model via sc_card_ctl function (OpenSC/OpenSC#3189)

Rutoken

    increase the minimum PIN size to support Rutoken ECP BIO (OpenSC/OpenSC#3208)

JPKI

    Adjust parameters for public key in PKCS#15 emulator (OpenSC/OpenSC#3182)

D-Trust

    Add support for ECDSA signatures and ECDH key agreement for D-Trust Signatures Cards 4.1/4.4 (OpenSC/OpenSC#3240, OpenSC/OpenSC#openwrt#3248)

Signed-off-by: Daniel Golle <[email protected]>
dangowrt added a commit to openwrt/packages that referenced this pull request Apr 27, 2025
New in 0.26.1; 2025-01-14
General improvements

    Align allocations of sc_mem_secure_alloc (OpenSC/OpenSC#3281)
    Fix -O3 gcc optimization failure on amd64 and ppc64el (OpenSC/OpenSC#3299)

pkcs11-spy

    Avoid crash while spying C_GetInterface() (OpenSC/OpenSC#3275)

TCOS

    Fix reading certificate (OpenSC/OpenSC#3296)

New in 0.26.0; 2024-11-13
Security

    CVE-2024-45615: Usage of uninitialized values in libopensc and pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-45616: Uninitialized values after incorrect check or usage of APDU response values in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45617: Uninitialized values after incorrect or missing checking return values of functions in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45618: Uninitialized values after incorrect or missing checking return values of functions in pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-45619: Incorrect handling length of buffers or files in libopensc (OpenSC/OpenSC#3225)
    CVE-2024-45620: Incorrect handling of the length of buffers or files in pkcs15init (OpenSC/OpenSC#3225)
    CVE-2024-8443: Heap buffer overflow in OpenPGP driver when generating key (OpenSC/OpenSC#3219)

General improvements

    Fix reselection of DF after error in PKCSOpenSC/OpenSC#15 layer (OpenSC/OpenSC#3067)
    Unify OpenSSL logging throughout code (OpenSC/OpenSC#2922)
    Extend the p11test to support kryoptic (OpenSC/OpenSC#3141)
    Fix for error in PCSC reconnection (OpenSC/OpenSC#3150)
    Fixed various issues reported by OSS-Fuzz and Coverity in drivers, PKCS#11 and PKCS#15 layer

PKCS#15

    Documentation for PKCS#15 profile files (OpenSC/OpenSC#3132)

minidriver

    Support PinCacheAlwaysPrompt usable for PIV cards (OpenSC/OpenSC#3167)

pkcs11-tool

    Show URI when listing token information (OpenSC/OpenSC#3125) and objects (OpenSC/OpenSC#3130)
    Do not limit size of objects to 5000 bytes (OpenSC/OpenSC#3174)
    Add support for AES CMAC (OpenSC/OpenSC#3184)
    Add support for AES GCM encryption (OpenSC/OpenSC#3195)
    Add support for RSA OAEP encryption (OpenSC/OpenSC#3175)
    Add support for HKDF (OpenSC/OpenSC#3193)
    Implement better support for wrapping and unwrapping (OpenSC/OpenSC#3198)
    Add support for EdDSA sign and verify (OpenSC/OpenSC#2979)

pkcs15-crypt

    Fix PKCS#1 encoding function to correctly detect padding type (OpenSC/OpenSC#3075)

piv-tool

    Fix RSA key generation (OpenSC/OpenSC#3158)
    Avoid possible state change when matching unknown card (OpenSC/OpenSC#3112)

sc-hsm-tool

    Cleanse buffer with plaintext key share (OpenSC/OpenSC#3226)

pkcs11-register

    Fix pkcs11-register defaults on macOS and Windows (OpenSC/OpenSC#3053)

IDPrime

    Fix identification of IDPrime 840 cards (OpenSC/OpenSC#3146)
    Fix container mapping for IDPrime 940 cards (OpenSC/OpenSC#3220)
    Reorder ATRs for matching cards (OpenSC/OpenSC#3154)

OpenPGP

    Fix state tracking after erasing card (OpenSC/OpenSC#3024)

Belpic

    Disable Applet V1.8 (OpenSC/OpenSC#3109)

MICARDO

    Deactivate driver (OpenSC/OpenSC#3152)

SmartCard-HSM

    Fix signing with secp521r1 signature (OpenSC/OpenSC#3157)

eOI

    Set model via sc_card_ctl function (OpenSC/OpenSC#3189)

Rutoken

    increase the minimum PIN size to support Rutoken ECP BIO (OpenSC/OpenSC#3208)

JPKI

    Adjust parameters for public key in PKCS#15 emulator (OpenSC/OpenSC#3182)

D-Trust

    Add support for ECDSA signatures and ECDH key agreement for D-Trust Signatures Cards 4.1/4.4 (OpenSC/OpenSC#3240, OpenSC/OpenSC##3248)

Signed-off-by: Daniel Golle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opensc FTBFS on amd64 and ppc64el with -O3

3 participants