Commit 8c9bdab2 authored by Herbert Xu's avatar Herbert Xu

crypto: lrw - Free rctx->ext with kzfree

The buffer rctx->ext contains potentially sensitive data and should
be freed with kzfree.

Cc: <stable@vger.kernel.org>
Fixes: 700cb3f5 ("crypto: lrw - Convert to skcipher")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 2b122730
...@@ -317,7 +317,7 @@ static void exit_crypt(struct skcipher_request *req) ...@@ -317,7 +317,7 @@ static void exit_crypt(struct skcipher_request *req)
rctx->left = 0; rctx->left = 0;
if (rctx->ext) if (rctx->ext)
kfree(rctx->ext); kzfree(rctx->ext);
} }
static int do_encrypt(struct skcipher_request *req, int err) static int do_encrypt(struct skcipher_request *req, int err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment