diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2018-03-23 08:14:44 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-08 14:26:31 +0200 |
commit | 77827f3d63d0b12d840ed27b362f877e049dbbf5 (patch) | |
tree | 5ae0f17888f500fc3ac41060812042e6119702bb | |
parent | 3c6096ca8e491a2c5a6d578fd4f191e94961dc20 (diff) | |
download | linux-stable-77827f3d63d0b12d840ed27b362f877e049dbbf5.tar.gz linux-stable-77827f3d63d0b12d840ed27b362f877e049dbbf5.tar.bz2 linux-stable-77827f3d63d0b12d840ed27b362f877e049dbbf5.zip |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c index eb681e9fe574..fdba6dd6db63 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) |