]> git.droids-corp.org - dpdk.git/commitdiff
crypto/cnxk: prevent out-of-bound access in capabilities
authorGowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Thu, 21 Apr 2022 07:58:19 +0000 (13:28 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Thu, 28 Apr 2022 10:09:35 +0000 (12:09 +0200)
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 <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
drivers/crypto/cnxk/cnxk_cryptodev.h

index fe2904b61983e05993b504b15ece855d7e2cf098..b75d68118510394fc0cabf6e8a3f9d7bd4789c7b 100644 (file)
@@ -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