crypto: ccree - Fix use after free in cc_cipher_exit()
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. Fixes: 63ee04c8 ("crypto: ccree - add skcipher support") Signed-off-by: NJianglei Nie <niejianglei2021@163.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
Showing
想要评论请 注册 或 登录