Add PSS parameter check.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 2 Oct 2015 11:35:19 +0000 (12:35 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 3 Dec 2015 14:32:05 +0000 (14:32 +0000)
Avoid seg fault by checking mgf1 parameter is not NULL. This can be
triggered during certificate verification so could be a DoS attack
against a client or a server enabling client authentication.

Thanks to Loïc Jonas Etienne (Qnective AG) for discovering this bug.

CVE-2015-3194

Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/rsa/rsa_ameth.c

index ca3922e6c298314f234a2bc972afa863c261b002..4e0621827cf3edea539f3c8570523a226b84ea41 100644 (file)
@@ -268,7 +268,7 @@ static X509_ALGOR *rsa_mgf1_decode(X509_ALGOR *alg)
 {
     const unsigned char *p;
     int plen;
-    if (alg == NULL)
+    if (alg == NULL || alg->parameter == NULL)
         return NULL;
     if (OBJ_obj2nid(alg->algorithm) != NID_mgf1)
         return NULL;