Re: [PATCH] crypto: ccree: Fix use after free in cc_cipher_exit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 03, 2022 at 10:23:37AM +0800, Jianglei Nie wrote:
> kfree_sensitive(ctx_p->user.key) will free the ctx_p->user.key. But
> ctx_p->user.key is still used in the next line, which will lead to a
> use after free.
> 
> We can call kfree_sensitive() after dev_dbg() to avoid the uaf.
> 
> Signed-off-by: Jianglei Nie <niejianglei2021@xxxxxxx>
> ---
>  drivers/crypto/ccree/cc_cipher.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux