From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: roy.fan.zhang@intel.com, ciara.power@intel.com
Cc: dev@dpdk.org, Pablo de Lara <pablo.de.lara.guarch@intel.com>,
stable@dpdk.org
Subject: [PATCH] crypto/ipsec_mb: fix buffer overrun
Date: Thu, 20 Jan 2022 17:04:55 +0000 [thread overview]
Message-ID: <20220120170455.41407-1-pablo.de.lara.guarch@intel.com> (raw)
Memory for ZUC cipher/auth key in session had to be expanded to 32 bytes,
instead of 16 bytes, when adding ZUC-256 support.
However, impact is low as this memory is part of a union
with bigger size than 32 bytes.
Coverity issue: 374374
Coverity issue: 374379
Fixes: 8c835018de84 ("crypto/ipsec_mb: support ZUC-256 for aesni_mb")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
index d37cc787a0..d177961ea5 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
@@ -848,7 +848,7 @@ struct aesni_mb_session {
struct gcm_key_data gcm_key;
/* *< Expanded GCM key */
- uint8_t zuc_cipher_key[16];
+ uint8_t zuc_cipher_key[32];
/* *< ZUC cipher key */
snow3g_key_schedule_t pKeySched_snow3g_cipher;
/* *< SNOW3G scheduled cipher key */
@@ -893,7 +893,7 @@ struct aesni_mb_session {
/* *< k3. */
} cmac;
/* *< Expanded XCBC authentication keys */
- uint8_t zuc_auth_key[16];
+ uint8_t zuc_auth_key[32];
/* *< ZUC authentication key */
snow3g_key_schedule_t pKeySched_snow3g_auth;
/* *< SNOW3G scheduled authentication key */
--
2.25.1
next reply other threads:[~2022-01-20 17:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 17:04 Pablo de Lara [this message]
2022-01-24 16:08 ` Power, Ciara
2022-02-08 21:25 ` Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220120170455.41407-1-pablo.de.lara.guarch@intel.com \
--to=pablo.de.lara.guarch@intel.com \
--cc=ciara.power@intel.com \
--cc=dev@dpdk.org \
--cc=roy.fan.zhang@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).