Closed nv-dmd closed 1 year ago
OpenSSL 3.0, 3.1, master
Function v2i_issuer_sign_tool() (crypto\x509\v3_ist.c) uses function ASN1_STRING_set() to set the ASN1 string, but the result of ASN1_STRING_set() execution is not checked, although it may fail.
v2i_issuer_sign_tool()
ASN1_STRING_set()
if (strcmp(cnf->name, "signTool") == 0) { ist->signTool = ASN1_UTF8STRING_new(); if (ist->signTool == NULL) { ERR_raise(ERR_LIB_X509V3, ERR_R_ASN1_LIB); ISSUER_SIGN_TOOL_free(ist); return NULL; } ASN1_STRING_set(ist->signTool, cnf->value, strlen(cnf->value)); }
Maybe need to add a check for the result of function ASN1_STRING_set() in v2i_issuer_sign_tool()?
Yes, this is a bug. Please create a PR.
OpenSSL 3.0, 3.1, master
Function
v2i_issuer_sign_tool()
(crypto\x509\v3_ist.c) uses functionASN1_STRING_set()
to set the ASN1 string, but the result ofASN1_STRING_set()
execution is not checked, although it may fail.Maybe need to add a check for the result of function
ASN1_STRING_set()
inv2i_issuer_sign_tool()
?