summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2018-03-23 08:14:44 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-08 14:29:50 +0200
commitc48f60c1a9854acc2fb9adcb4429043002dd4e6f (patch)
tree1f436e04aba883c6acc813f71e6535177068c302
parent190c7b3d162d2967ce17d2cc97070744312b0c7d (diff)
crypto: lrw - Free rctx->ext with kzfree
commit 8c9bdab21289c211ca1ca6a5f9b7537b4a600a02 upstream. The buffer rctx->ext contains potentially sensitive data and should be freed with kzfree. Cc: <stable@vger.kernel.org> Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--crypto/lrw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c
index cbbd7c50ad19..1d813a6d3fec 100644
--- a/crypto/lrw.c
+++ b/crypto/lrw.c
@@ -313,7 +313,7 @@ static void exit_crypt(struct skcipher_request *req)
rctx->left = 0;
if (rctx->ext)
- kfree(rctx->ext);
+ kzfree(rctx->ext);
}
static int do_encrypt(struct skcipher_request *req, int err)