mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
67cc2bae02
Currently, critical bugs prevent using SM2 signatures through the `EVP_PKEY` interface: any application that managed to satisfy the requirement of forcing SM3 as the message digest – even if this is currently not possible transparently through the `EVP_PKEY` interface and requires manually forcing the MD selection – would crash with a segmentation fault upon calling the `SM2_sign()` function. This is easily verified using the OpenSSL CLI to execute this critical code path under the right conditions: `openssl dgst -sm3 -hex -sign sm2.eckey /path/to/file/to/sign` The issue is caused by a double free at the end of `SM2_sign()` in `crypto/sm2/sm2_sign.c` in case of successful signature generation. In addition, even if the double free was not causing segfaults, the function returns the wrong return value in case of success (it would return 0 rather than 1). This patch fixes both problems. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6066) |
||
---|---|---|
.. | ||
aes | ||
aria | ||
asn1 | ||
async | ||
bf | ||
bio | ||
blake2 | ||
bn | ||
buffer | ||
camellia | ||
cast | ||
chacha | ||
cmac | ||
cms | ||
comp | ||
conf | ||
ct | ||
des | ||
dh | ||
dsa | ||
dso | ||
ec | ||
engine | ||
err | ||
evp | ||
hmac | ||
idea | ||
include/internal | ||
kdf | ||
lhash | ||
md2 | ||
md4 | ||
md5 | ||
mdc2 | ||
modes | ||
objects | ||
ocsp | ||
pem | ||
perlasm | ||
pkcs7 | ||
pkcs12 | ||
poly1305 | ||
rand | ||
rc2 | ||
rc4 | ||
rc5 | ||
ripemd | ||
rsa | ||
seed | ||
sha | ||
siphash | ||
sm2 | ||
sm3 | ||
sm4 | ||
srp | ||
stack | ||
store | ||
ts | ||
txt_db | ||
ui | ||
whrlpool | ||
x509 | ||
x509v3 | ||
alphacpuid.pl | ||
arm64cpuid.pl | ||
arm_arch.h | ||
armcap.c | ||
armv4cpuid.pl | ||
build.info | ||
c64xpluscpuid.pl | ||
cpt_err.c | ||
cryptlib.c | ||
ctype.c | ||
cversion.c | ||
dllmain.c | ||
ebcdic.c | ||
ex_data.c | ||
ia64cpuid.S | ||
init.c | ||
LPdir_nyi.c | ||
LPdir_unix.c | ||
LPdir_vms.c | ||
LPdir_win32.c | ||
LPdir_win.c | ||
LPdir_wince.c | ||
mem_clr.c | ||
mem_dbg.c | ||
mem_sec.c | ||
mem.c | ||
mips_arch.h | ||
o_dir.c | ||
o_fips.c | ||
o_fopen.c | ||
o_init.c | ||
o_str.c | ||
o_time.c | ||
pariscid.pl | ||
ppc_arch.h | ||
ppccap.c | ||
ppccpuid.pl | ||
s390x_arch.h | ||
s390xcap.c | ||
s390xcpuid.pl | ||
sparc_arch.h | ||
sparccpuid.S | ||
sparcv9cap.c | ||
threads_none.c | ||
threads_pthread.c | ||
threads_win.c | ||
uid.c | ||
vms_rms.h | ||
x86_64cpuid.pl | ||
x86cpuid.pl |