Skip to content

Commit 66edb90

Browse files
committed
Merge tag 'v7.1-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu: - Reject algorithms with authsizes that are too short in authencesn * tag 'v7.1-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: authencesn - reject short ahash digests during instance creation
2 parents 4c2ed2a + 5db6ef9 commit 66edb90

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

crypto/authencesn.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,11 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl,
390390
auth = crypto_spawn_ahash_alg(&ctx->auth);
391391
auth_base = &auth->base;
392392

393+
if (auth->digestsize > 0 && auth->digestsize < 4) {
394+
err = -EINVAL;
395+
goto err_free_inst;
396+
}
397+
393398
err = crypto_grab_skcipher(&ctx->enc, aead_crypto_instance(inst),
394399
crypto_attr_alg_name(tb[2]), 0, mask);
395400
if (err)

0 commit comments

Comments
 (0)