Skip to content

Commit

Permalink
crypto: lrw - Check for incorrect cipher name
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
tititiou36 authored and herbertx committed Oct 12, 2017
1 parent 616129c commit d38efad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/lrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,8 @@ static int create(struct crypto_template *tmpl, struct rtattr **tb)
err = -ENAMETOOLONG;
goto err_drop_spawn;
}
}
} else
goto err_drop_spawn;

inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC;
inst->alg.base.cra_priority = alg->base.cra_priority;
Expand Down

0 comments on commit d38efad

Please sign in to comment.