]> git.ipfire.org Git - thirdparty/openssl.git/commit
Add some tests for various PKCS12 files with NULL ContentInfo
authorMatt Caswell <matt@openssl.org>
Fri, 19 Jan 2024 14:32:18 +0000 (14:32 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 25 Jan 2024 15:35:12 +0000 (15:35 +0000)
commit453c44b15c1c3bd8f39bc9b76451edf7ccbb1786
treeb28d7fb722f25c8f6c92f4e5bcbba0d9c259567b
parent09df4395b5071217b76dc7d3d2e630eb8c5a79c2
Add some tests for various PKCS12 files with NULL ContentInfo

PKCS7 ContentInfo fields held within a PKCS12 file can be NULL, even if the
type has been set to a valid value. CVE-2024-0727 is a result of OpenSSL
attempting to dereference the NULL pointer as a result of this.

We add test for various instances of this problem.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23362)

(cherry picked from commit febb086d0fc1ea12181f4d833aa9b8fdf2133b3b)
test/recipes/80-test_pkcs12.t
test/recipes/80-test_pkcs12_data/bad1.p12 [new file with mode: 0644]
test/recipes/80-test_pkcs12_data/bad2.p12 [new file with mode: 0644]
test/recipes/80-test_pkcs12_data/bad3.p12 [new file with mode: 0644]