From: Gowrishankar Muthukrishnan Date: Thu, 21 Apr 2022 07:58:19 +0000 (+0530) Subject: crypto/cnxk: prevent out-of-bound access in capabilities X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=59f8c378a131d48cbcfa2ac80134f589cff0ee65;p=dpdk.git crypto/cnxk: prevent out-of-bound access in capabilities In a situation where crypto_caps elements are checked only for RTE_CRYPTO_OP_TYPE_UNDEFINED until valid op defined, there is possibility for an out of bound access. Add this array by one element for current capabilities. Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Anoob Joseph --- diff --git a/drivers/crypto/cnxk/cnxk_cryptodev.h b/drivers/crypto/cnxk/cnxk_cryptodev.h index fe2904b619..b75d681185 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev.h +++ b/drivers/crypto/cnxk/cnxk_cryptodev.h @@ -10,7 +10,7 @@ #include "roc_cpt.h" -#define CNXK_CPT_MAX_CAPS 34 +#define CNXK_CPT_MAX_CAPS 35 #define CNXK_SEC_CRYPTO_MAX_CAPS 12 #define CNXK_SEC_MAX_CAPS 9 #define CNXK_AE_EC_ID_MAX 8