Fix boolean return value if an empty RSA signature is detected in gmp plugin
authorMartin Willi <martin@revosec.ch>
Mon, 7 May 2012 11:51:46 +0000 (13:51 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 31 May 2012 15:38:59 +0000 (17:38 +0200)
Fixes CVE-2012-2388.

src/libstrongswan/plugins/gmp/gmp_rsa_public_key.c

index a7ba801..898892f 100644 (file)
@@ -137,7 +137,7 @@ static bool verify_emsa_pkcs1_signature(private_gmp_rsa_public_key_t *this,
 
        if (signature.len == 0 || signature.len > this->k)
        {
-               return INVALID_ARG;
+               return FALSE;
        }
 
        /* unpack signature */