Thread (4 messages) 4 messages, 2 authors, 2017-02-09

Re: [PATCH] crypto/aesni_mb: add missing digest length

From: De Lara Guarch, Pablo <hidden>
Date: 2017-01-27 13:15:45

quoted hunk ↗ jump to hunk
-----Original Message-----
From: De Lara Guarch, Pablo
Sent: Friday, January 27, 2017 1:16 PM
To: adrien.mazarguil@6wind.com; Wu, Jingjing
Cc: dev@dpdk.org; De Lara Guarch, Pablo
Subject: [PATCH] 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 <redacted>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 2 ++
 1 file changed, 2 insertions(+)
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 5f125b2..eb4b2ad 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
 };

 /**
--
2.7.4
Wrong maintainer, Sending to right one  now. Sorry about that.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help