Skip to content

Commit

Permalink
crypto/ipsec_mb: fix buffer overrun
Browse files Browse the repository at this point in the history
[ upstream commit 4582f79 ]

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: 8c83501 ("crypto/ipsec_mb: support ZUC-256 for aesni_mb")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
  • Loading branch information
pablodelara authored and kevintraynor committed Feb 21, 2022
1 parent 13aab9f commit 98ec926
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 98ec926

Please sign in to comment.