diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-05-02 12:31:43 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-05-02 12:31:43 -0700 |
| commit | 66edb901bf874d9e0787326ba12d3548b2da8700 (patch) | |
| tree | 73fa19f9659b81c65f2fc32aa87e92e5cbd90822 /crypto | |
| parent | 4c2ed2a3dbda5cad4d7b2f5f394c91522abbaa92 (diff) | |
| parent | 5db6ef9847717329f12c5ea8aba7e9f588a980c0 (diff) | |
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
Diffstat (limited to 'crypto')
| -rw-r--r-- | crypto/authencesn.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/authencesn.c b/crypto/authencesn.c index af3d584e584f..522df41365d8 100644 --- a/crypto/authencesn.c +++ b/crypto/authencesn.c @@ -390,6 +390,11 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl, auth = crypto_spawn_ahash_alg(&ctx->auth); auth_base = &auth->base; + if (auth->digestsize > 0 && auth->digestsize < 4) { + err = -EINVAL; + goto err_free_inst; + } + err = crypto_grab_skcipher(&ctx->enc, aead_crypto_instance(inst), crypto_attr_alg_name(tb[2]), 0, mask); if (err) |
