mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 00:12:52 +00:00
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: 63ee04c8b4 ("crypto: ccree - add skcipher support")
Signed-off-by: Jianglei Nie <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>