Issue summary: A type confusion vulnerability exists in the signature verification of signed PKCS#7 data where an ASN1_TYPE union member is accessed without first validating the type, causing an invalid or NULL pointer dereference when processing malformed PKCS#7 data.
Impact summary: An application performing signature verification of PKCS#7 data or calling directly the PKCS7_digest_from_attributes() function can be caused to dereference an invalid or NULL pointer when reading, resulting in a Denial of Service.
The function PKCS7_digest_from_attributes() accesses the message digest attribute value without validating its type. When the type is not V_ASN1_OCTET_STRING, this results in accessing invalid memory through the ASN1_TYPE union, causing a crash.
Exploiting this vulnerability requires an attacker to provide a malformed signed PKCS#7 to an application that verifies it. The impact of the exploit is just a Denial of Service, the PKCS7 API is legacy and applications should be using the CMS API instead. For these reasons the issue was assessed as Low severity.
The FIPS modules in 3.5, 3.4, 3.3 and 3.0 are not affected by this issue, as the PKCS#7 parsing implementation is outside the OpenSSL FIPS module boundary.
OpenSSL 3.6, 3.5, 3.4, 3.3, 3.0, 1.1.1 and 1.0.2 are vulnerable to this issue.
The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | RedHat | openssl-1:3.5.1-7.el10_1 | * |
| Red Hat Enterprise Linux 9 | RedHat | openssl-1:3.5.1-7.el9_7 | * |
| Red Hat Enterprise Linux 9 | RedHat | openssl-1:3.5.1-7.el9_7 | * |
| Edk2 | Ubuntu | plucky | * |
| Nodejs | Ubuntu | esm-apps/jammy | * |
| Nodejs | Ubuntu | jammy | * |
| Openssl | Ubuntu | devel | * |
| Openssl | Ubuntu | esm-infra-legacy/trusty | * |
| Openssl | Ubuntu | esm-infra/bionic | * |
| Openssl | Ubuntu | esm-infra/focal | * |
| Openssl | Ubuntu | esm-infra/xenial | * |
| Openssl | Ubuntu | fips-preview/jammy | * |
| Openssl | Ubuntu | fips-updates/bionic | * |
| Openssl | Ubuntu | fips-updates/focal | * |
| Openssl | Ubuntu | fips-updates/jammy | * |
| Openssl | Ubuntu | fips-updates/xenial | * |
| Openssl | Ubuntu | fips/bionic | * |
| Openssl | Ubuntu | fips/focal | * |
| Openssl | Ubuntu | fips/xenial | * |
| Openssl | Ubuntu | jammy | * |
| Openssl | Ubuntu | noble | * |
| Openssl | Ubuntu | plucky | * |
| Openssl | Ubuntu | questing | * |
| Openssl | Ubuntu | upstream | * |
| Openssl1.0 | Ubuntu | esm-infra/bionic | * |
The programmer may assume that certain events or conditions will never occur or do not need to be worried about, such as low memory conditions, lack of access to resources due to restrictive permissions, or misbehaving clients or components. However, attackers may intentionally trigger these unusual conditions, thus violating the programmer’s assumptions, possibly introducing instability, incorrect behavior, or a vulnerability. Note that this entry is not exclusively about the use of exceptions and exception handling, which are mechanisms for both checking and handling unusual or unexpected conditions.