Skip to content

Commit 3524a29

Browse files
andrewkdinht8m
authored andcommitted
PKCS12_item_decrypt_d2i_ex(): Check oct argument for NULL
Fixes CVE-2025-69421 Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org> Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> MergeDate: Mon Jan 26 19:56:08 2026 (cherry picked from commit 2c13bf1)
1 parent 564fd9c commit 3524a29

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎crypto/pkcs12/p12_decr.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ void *PKCS12_item_decrypt_d2i_ex(const X509_ALGOR *algor, const ASN1_ITEM *it,
146146
void *ret;
147147
int outlen = 0;
148148

149+
if (oct == NULL) {
150+
ERR_raise(ERR_LIB_PKCS12, ERR_R_PASSED_NULL_PARAMETER);
151+
return NULL;
152+
}
153+
149154
if (!PKCS12_pbe_crypt_ex(algor, pass, passlen, oct->data, oct->length,
150155
&out, &outlen, 0, libctx, propq))
151156
return NULL;

0 commit comments

Comments
 (0)