PKCS#7: avoid NULL pointer dereferences with missing content
authorEmilia Kasper <emilia@openssl.org>
Fri, 27 Feb 2015 15:52:23 +0000 (16:52 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 19 Mar 2015 12:59:31 +0000 (12:59 +0000)
commite2acb69c760f681b070a20defe5510272492a7e8
tree0d9c1097e09117cfb63444acf87165647c2e575f
parentc982285ab63adeb473197d54d246d120bf60778b
PKCS#7: avoid NULL pointer dereferences with missing content

In PKCS#7, the ASN.1 content component is optional.
This typically applies to inner content (detached signatures),
however we must also handle unexpected missing outer content
correctly.

This patch only addresses functions reachable from parsing,
decryption and verification, and functions otherwise associated
with reading potentially untrusted data.

Correcting all low-level API calls requires further work.

CVE-2015-0289

Thanks to Michal Zalewski (Google) for reporting this issue.

Reviewed-by: Steve Henson <steve@openssl.org>
crypto/pkcs7/pk7_doit.c
crypto/pkcs7/pk7_lib.c