Initial patch set can be found here:
http://www.mail-archive.com/[email protected]/msg18185.html
This patch set is no longer related to the generalized ASN.1 parser.
Tadeusz will remove the ASN.1 parser from qat.
No changes from initial patch set.
Tudor Ambarus (2):
crypto: qat - avoid memory corruption or undefined behaviour
crypto: qat - fix address leaking of RSA public exponent
drivers/crypto/qat/qat_common/qat_asym_algs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
1.8.3.1
memcopying to a (null pointer + offset) will result
in memory corruption or undefined behaviour.
Signed-off-by: Tudor Ambarus <[email protected]>
---
drivers/crypto/qat/qat_common/qat_asym_algs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c b/drivers/crypto/qat/qat_common/qat_asym_algs.c
index e5c0727..8dbbf084 100644
--- a/drivers/crypto/qat/qat_common/qat_asym_algs.c
+++ b/drivers/crypto/qat/qat_common/qat_asym_algs.c
@@ -593,7 +593,7 @@ int qat_rsa_get_d(void *context, size_t hdrlen, unsigned char tag,
ret = -ENOMEM;
ctx->d = dma_zalloc_coherent(dev, ctx->key_sz, &ctx->dma_d, GFP_KERNEL);
- if (!ctx->n)
+ if (!ctx->d)
goto err;
memcpy(ctx->d + (ctx->key_sz - vlen), ptr, vlen);
--
1.8.3.1
Signed-off-by: Tudor Ambarus <[email protected]>
---
drivers/crypto/qat/qat_common/qat_asym_algs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c b/drivers/crypto/qat/qat_common/qat_asym_algs.c
index 8dbbf084..05f49d4 100644
--- a/drivers/crypto/qat/qat_common/qat_asym_algs.c
+++ b/drivers/crypto/qat/qat_common/qat_asym_algs.c
@@ -711,7 +711,7 @@ static void qat_rsa_exit_tfm(struct crypto_akcipher *tfm)
}
qat_crypto_put_instance(ctx->inst);
ctx->n = NULL;
- ctx->d = NULL;
+ ctx->e = NULL;
ctx->d = NULL;
}
--
1.8.3.1
On Wed, Mar 23, 2016 at 05:06:38PM +0200, Tudor Ambarus wrote:
> Initial patch set can be found here:
> http://www.mail-archive.com/[email protected]/msg18185.html
>
> This patch set is no longer related to the generalized ASN.1 parser.
> Tadeusz will remove the ASN.1 parser from qat.
>
> No changes from initial patch set.
All applied.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt