Re: [PATCH] crypto: ccree - use crypto_memneq() to compare AEAD tag

From: Herbert Xu

Date: Fri Sep 04 2026 - 06:49:03 EST


On Sat, Aug 15, 2026 at 07:09:58PM +0200, David C.C.M. Gall wrote:
> cc_aead_complete() compares the computed MAC against the received ICV
> with memcmp(), which short-circuits on the first differing byte and
> leaks tag-match length via timing. Use crypto_memneq() instead.
>
> Assisted-by: gregkh_clanker_t1000
> Signed-off-by: David C.C.M. Gall <david.ccm.gall@xxxxxxxxxxxxxx>
> ---
> drivers/crypto/ccree/cc_aead.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt