summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2014-12-17 12:25:28 +0100
committerEmilia Kasper <emilia@openssl.org>2014-12-17 14:56:25 +0100
commit036df29387e994d665259065e5c11c0e5b41f826 (patch)
tree482e749b500ccf320372685b14eb1102e11d6c11 /crypto
parent60b7d3bbb509e2be874824c8fa1a0fa2379ed5ff (diff)
Add a comment noting the padding oracle.
Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit 03af843039af758fc9bbb4ae6c09ec2bc715f2c5)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/evp/evp_enc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index e3e1147969..2e863ac542 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -533,6 +533,11 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
return(0);
}
OPENSSL_assert(b <= sizeof ctx->final);
+
+ /*
+ * The following assumes that the ciphertext has been authenticated.
+ * Otherwise it provides a padding oracle.
+ */
n=ctx->final[b-1];
if (n == 0 || n > (int)b)
{