Skip to content

Commit

Permalink
crypto: lrw - Free rctx->ext with kzfree
Browse files Browse the repository at this point in the history
The buffer rctx->ext contains potentially sensitive data and should
be freed with kzfree.

Cc: <[email protected]>
Fixes: 700cb3f ("crypto: lrw - Convert to skcipher")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Mar 30, 2018
1 parent 2b12273 commit 8c9bdab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/lrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,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)
Expand Down

0 comments on commit 8c9bdab

Please sign in to comment.