Skip to content

Commit d38efad

Browse files
tititiou36herbertx
authored andcommitted
crypto: lrw - Check for incorrect cipher name
If the cipher name does not start with 'ecb(' we should bail out, as done in the 'create()' function in 'crypto/xts.c'. Fixes: 700cb3f ("crypto: lrw - Convert to skcipher") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 616129c commit d38efad

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎crypto/lrw.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,8 @@ static int create(struct crypto_template *tmpl, struct rtattr **tb)
614614
err = -ENAMETOOLONG;
615615
goto err_drop_spawn;
616616
}
617-
}
617+
} else
618+
goto err_drop_spawn;
618619

619620
inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC;
620621
inst->alg.base.cra_priority = alg->base.cra_priority;

0 commit comments

Comments
 (0)