projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25ca4a8
)
crypto: starfive - Do not free stack buffer
author
Jia Jie Ho
<jiajie.ho@starfivetech.com>
Mon, 29 Apr 2024 06:06:39 +0000
(14:06 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Fri, 10 May 2024 09:15:24 +0000
(17:15 +0800)
RSA text data uses variable length buffer allocated in software stack.
Calling kfree on it causes undefined behaviour in subsequent operations.
Cc: <stable@vger.kernel.org> #6.7+
Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/starfive/jh7110-rsa.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/starfive/jh7110-rsa.c
b/drivers/crypto/starfive/jh7110-rsa.c
index 4d7eb3d1e764b3c82ed652249a726b046bb9a229..33093ba4b13afe74daca8c21063742dceedc467a 100644
(file)
--- a/
drivers/crypto/starfive/jh7110-rsa.c
+++ b/
drivers/crypto/starfive/jh7110-rsa.c
@@
-276,7
+276,6
@@
static int starfive_rsa_enc_core(struct starfive_cryp_ctx *ctx, int enc)
err_rsa_crypt:
writel(STARFIVE_RSA_RESET, cryp->base + STARFIVE_PKA_CACR_OFFSET);
- kfree(rctx->rsa_data);
return ret;
}