From: Pablo de Lara Date: Fri, 27 Jan 2017 13:16:08 +0000 (+0000) Subject: crypto/aesni_mb: add missing digest length X-Git-Tag: spdx-start~4513 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a196eda4310eb6b345ef0c22f7da14c8db74be39;p=dpdk.git crypto/aesni_mb: add missing digest length AESNI MB now supports authentication only operations, but the array containing all the possible digest lengths was not updated to reflect the new algorithm NULL_HASH, causing an "Out-of-bounds access". Coverity issue: 140977 Fixes: 8772c3f713e2 ("crypto/aesni_mb: add single operation functionality") Signed-off-by: Pablo de Lara Acked-by: Declan Doherty --- diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h index 5f125b26ec..eb4b2ad626 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h @@ -88,6 +88,7 @@ static const unsigned auth_truncated_digest_byte_lengths[] = { [SHA_384] = 24, [SHA_512] = 32, [AES_XCBC] = 12, + [NULL_HASH] = 0 }; /** @@ -111,6 +112,7 @@ static const unsigned auth_digest_byte_lengths[] = { [SHA_384] = 48, [SHA_512] = 64, [AES_XCBC] = 16, + [NULL_HASH] = 0 }; /**