diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2018-03-22 20:14:44 -0400 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-03-30 13:33:10 -0400 |
| commit | 8c9bdab21289c211ca1ca6a5f9b7537b4a600a02 (patch) | |
| tree | f2aa157ec468bda59368cf413558027ae91c60b2 /crypto | |
| parent | 2b1227301a8e4729409694e323b72c064c47cb6b (diff) | |
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: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
| -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 a09cdaa6ddf3..954a7064a179 100644 --- a/crypto/lrw.c +++ b/crypto/lrw.c | |||
| @@ -317,7 +317,7 @@ static void exit_crypt(struct skcipher_request *req) | |||
| 317 | rctx->left = 0; | 317 | rctx->left = 0; |
| 318 | 318 | ||
| 319 | if (rctx->ext) | 319 | if (rctx->ext) |
| 320 | kfree(rctx->ext); | 320 | kzfree(rctx->ext); |
| 321 | } | 321 | } |
| 322 | 322 | ||
| 323 | static int do_encrypt(struct skcipher_request *req, int err) | 323 | static int do_encrypt(struct skcipher_request *req, int err) |
