]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: ccm - Set rfc4309 maxauthsize from child
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 20 Jul 2026 01:34:21 +0000 (11:34 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 30 Jul 2026 07:30:50 +0000 (17:30 +1000)
Set the maxauthsize of rfc4309 using that of the child algorithm.

Fixes: 4a49b499dfa0 ("[CRYPTO] ccm: Added CCM mode")
Reported-by: Seohyeon Maeng <bioloidgp@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ccm.c

index 2ae929ffdef8e632e609c35816a2ba809d68e91f..916441e4f2b863a19d408364694b1f6506d314e8 100644 (file)
@@ -747,7 +747,7 @@ static int crypto_rfc4309_create(struct crypto_template *tmpl,
 
        inst->alg.ivsize = 8;
        inst->alg.chunksize = crypto_aead_alg_chunksize(alg);
-       inst->alg.maxauthsize = 16;
+       inst->alg.maxauthsize = crypto_aead_alg_maxauthsize(alg);
 
        inst->alg.base.cra_ctxsize = sizeof(struct crypto_rfc4309_ctx);