Commit ee509efc authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: skcipher - Zap type in crypto_alloc_sync_skcipher



The type needs to be zeroed as otherwise the user could use it to
allocate an asynchronous sync skcipher.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5ab6c06d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);