]> git.ipfire.org Git - thirdparty/openssl.git/commit
Add NULL check before accessing PKCS7 encrypted algorithm
authorViliam Lejčík <lejcik@gmail.com>
Mon, 19 Feb 2024 20:39:05 +0000 (21:39 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 25 Mar 2024 17:26:24 +0000 (18:26 +0100)
commita4cbffcd8998180b98bb9f7ce6065ed37d079d8b
treef37869b64e67b54d8d516e8233e8732099f5d0c0
parent87e747000fef07c9ec43877bc5e9f2ca34f76a3b
Add NULL check before accessing PKCS7 encrypted algorithm

Printing content of an invalid test certificate causes application crash, because of NULL dereference:

user@user:~/openssl$ openssl pkcs12 -in test/recipes/80-test_pkcs12_data/bad2.p12 -passin pass: -info
MAC: sha256, Iteration 2048
MAC length: 32, salt length: 8
PKCS7 Encrypted data: Segmentation fault (core dumped)

Added test cases for pkcs12 bad certificates

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23632)
apps/pkcs12.c
test/recipes/80-test_pkcs12.t