projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ab6c06
)
crypto: skcipher - Zap type in crypto_alloc_sync_skcipher
author
Herbert Xu
<herbert@gondor.apana.org.au>
Sat, 15 Feb 2025 00:57:51 +0000
(08:57 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Sat, 22 Feb 2025 07:56:03 +0000
(15:56 +0800)
The type needs to be zeroed as otherwise the user could use it to
allocate an asynchronous sync skcipher.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/skcipher.c
patch
|
blob
|
history
diff --git
a/crypto/skcipher.c
b/crypto/skcipher.c
index
e3751cc
..
cdf0f11
100644
(file)
--- a/
crypto/skcipher.c
+++ b/
crypto/skcipher.c
@@
-682,6
+682,7
@@
struct crypto_sync_skcipher *crypto_alloc_sync_skcipher(
/* Only sync algorithms allowed. */
mask |= CRYPTO_ALG_ASYNC | CRYPTO_ALG_SKCIPHER_REQSIZE_LARGE;
+ type &= ~(CRYPTO_ALG_ASYNC | CRYPTO_ALG_SKCIPHER_REQSIZE_LARGE);
tfm = crypto_alloc_tfm(alg_name, &crypto_skcipher_type, type, mask);