Access of Resource Using Incompatible Type ('Type Confusion')
There is a type confusion vulnerability relating to X.400 address processing inside an X.509 GeneralName. X.400 addresses were parsed as an "ASN1_STRING" but the public structure definition for "GENERAL_NAME" incorrectly specified the type of the x400Address field as "ASN1_TYPE". This field is subsequently interpreted by the OpenSSL function "GENERAL_NAME_cmp" as an "ASN1_TYPE" rather than an "ASN1_STRING". When CRL checking is enabled (i.e. the application sets the "X509_V_FLAG_CRL_CHECK" flag), this vulnerability may allow an attacker to pass arbitrary pointers to a memcmp call, enabling them to read memory contents or enact a denial of service. In most cases, the attack requires the attacker to provide both the certificate chain and CRL, neither of which need to have a valid signature. If the attacker only controls one of these inputs, the other input must already contain an X.400 address as a CRL distribution point, which is uncommon. As such, this vulnerability is most likely to only affect applications that have implemented their own functionality for retrieving CRLs over a network.This vulnerability affects OpenSSL versions 1.0.2-beta1 through 1.0.2u, 1.1.1-pre1 through 1.1.1s, and 3.0.0-alpha1 through 3.0.7.
CWE-843 - Access of Resource Using Incompatible Type ('Type Confusion')
The program allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.