Home
last modified time | relevance | path

Searched hist:"3 d950c34" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/crypto/ccree/
H A Dcc_cipher.c3d950c34 Wed Mar 02 20:23:37 CST 2022 Jianglei Nie <niejianglei2021@163.com> 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: 63ee04c8b491 ("crypto: ccree - add skcipher support")
Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>